Troubleshooting zero.core
Consult this documentation to troubleshoot problems starting and running an IBM® WebSphere® sMash application
How do I enable logging and tracing ?
IBM WebSphere sMash uses standardjava.util.logging logging specifications.
Tracing and Logging can be enabled in 2 ways.
-
Specify
-logleveland-logfileas arguments on the command line. If there is a problem running any of the zero commands specify the-logleveloption on the command line.-
zero -loglevel=ALL -
This is equivalent adding
.level=ALLin the logging.properties file. -
zero -loglevel:zero.core.config.level=ALL -loglevel:zero.core.context.level=ALL - This is equivalent of adding the following lines in
logging.properties.zero.core.config.level=ALL zero.core.context.level=ALLThis option can be specified multiple times. Optional-logilecan be set to redirect the log/traces in to the specified file rather than standard out.
-
-
Place
logging.propertiesfile in application config directory If you need to debug an application that starts without a problem, copylogging.propertiesfile from the WebSphere® sMash repository. Find this file atexpanded/zero.kernel-1.0-${rev}/config/logging.propertiesinINSTALL_ROOT/zero-repository.Place additional trace specifications at the top of the file as shown in the previous section.
How can I verify incoming requests or outgoing responses ?
IBM WebSphere sMash runtime can log all request and response traffic including headers and the payload body to help debug application code. This can be done as follows.
-
Set the
/config/requestLoggingconfiguration attribute in the application'szero.configfile totrue./config/requestLogging = trueThe WebSphere sMash runtime will write the request and response headers and, body, if any, to a log file named
request-log-"timestamp"in the logs directory of the application. One log file will be written per request. Do not set this property to true in a production environment.The maximum amount of request and response data written to the file is configurable by changing the
/config/requestLoggingLimitvalue to the maximum size of the log file. The default value of this configuration directive is16384bytes.
What do I do when I see "At least one request did not return before the stop/recycle timeout" in the logs
This means that the application could not be cleanly quiesced during a recycle because one or more requests did not complete processing.
This timeout can be adjusted by specifying the time in seconds for the configuration property /config/maxStopTime. This value
defaults to 60 seconds.
To help with identifying the requests that do not complete, you can set the configuration property /config/createDumpOnErrantRequest to
true to generate a java thread dump of the process.
The request dump files are created in the application's root directory.
Known Issues
Application does not stop using the zero stop command
If you see the following error message while trying to stop an application
MyApp1 does not match the name of the application.
Find out the configured name of the application by checking the contents of MyApp1/config/ivy.xml. The name of the application is the 'module' attribute of the
'info' tag near the top of the file. For the application to work correctly :
- Rename the application directory to match the name of the application
- Delete
.zero/shared/resolve.historyand.zero/private/resolved.properties - Run
zero resolvein the new application directory
It is being tracked under Bug 5022 This issue is being tracked under Bug 5044
SEVERE: java.io.StreamCorruptedException in the error logs
If you see the following message in the error logs after a server recycle but the application otherwise works OK, this error can be safely ignored. Ensure that it sayskey=null.