Debugging

You can also find information about sys admin logging in Debugging.

1. Tracing SOAP messages

1.1. Using MessageLoggingHandler

The simplest method for logging SOAP messages is to add the org.globus.wsrf.handlers.MessageLoggingHandler to the request or response chain in the server-config.wsdd or client-config.wsdd files.

For example:

 <requestFlow> ... <handler
          type="java:org.globus.wsrf.handlers.MessageLoggingHandler"/> ...
          </requestFlow>

Then you must enable logging for this handler class in the appropriate log4j.properties files and change the logging level to DEBUG:

log4j.category.org.globus.wsrf.handlers.MessageLoggingHandler=DEBUG

1.2. Enabling logging for Axis classes

Another method for tracing SOAP messages is to enable logging for selected Axis classes. Add the following lines to the appropriate log4j.properties files:

 log4j.category.org.apache.client.Call=DEBUG
          log4j.category.org.apache.axis.transport.http.HTTPSender=DEBUG # enable the following
          logger for HTTPS/HTTPG transport handlers
          log4j.category.org.globus.axis.axis.transport=DEBUG

This will log Axis client side calls and Axis HTTP messages.

1.3. Using TcpMonitor

To trace SOAP messages on the wire you can use TcpMon from Apache Axis. After setting the environment using $GLOBUS_LOCATION/etc/globus-dev-env.[sh|csh|bat] run:

$ java org.apache.axis.utils.tcpmon [listenPort targetHost targetPort]

If no arguments are used, you have to fill out these values in the GUI. Make sure to also start the standalone container with the proxy server port option set to the listenPort value.

2. Debugging Java process

JVM vendors provide useful tools and troubleshooting guides for debugging Java processes. Please use those guides for debugging your programs, for example:

3. Debugging hanged Java process

If a Java process appears to hang, for example in case of the standalone container, the list of deployed services is not shown after a while or all requests to the container time out, requesting the JVM thread dump might help diagnose the problem.

To request JVM thread dump run:

kill -QUIT <JVM process id>

If this command is successful, the thread dump information should be printed to the standard output or error of the Java process. Therefore, the thread dump information might appear on the console of that process or in a file to which the standard output/error of process is redirected to. Please also note that on certain JVMs the thread dump information might be put in a separate file.

When filing bugs of such nature please always include the JVM thread dump information.

4. Debugging Log4j

If you are having problems with configuring Log4j, you can enable internal Log4j debugging by adding -Dlog4j.debug=true option on the java command line or passing it via the GLOBUS_OPTIONS environment property.