Your WebSphere MQ Java™ or JMS (Java Message Service) application is having a problem and you need to collect data to find a solution. This document explains how to generate diagnostic data when the problem is happening, how to collect the available data from the system, and how to analyze that data and share it with IBM support.
These instructions are for WebSphere MQ on AIX, HP-UX, IBM i, Linux, Solaris, and Windows systems. Return to the WebSphere MQ MustGather index for other systems.
Resolving the problem
Step 1: Generate Data
If the problem has already happened and you cannot reproduce it reliably, proceed to Step 2 to collect the information already logged by WebSphere MQ. Otherwise, please try to generate the following diagnostic data while the problem is happening:
- If your application is running in WebSphere Application Server, generate a WebSphere Application Server WebSphere MQ messaging provider JMS trace, or if you are not using the JMS classes, a WebSphere MQ base Java trace instead.
- If your application is running elsewhere, generate a WebSphere MQ classes for JMS, WebSphere MQ Resource Adapter or WebSphere MQ classes for Java trace of your application, depending on the interface it uses. Instructions are available for Java SE environments, for Java EE environments using the WebSphere MQ resource adapter, and for selected Java EE application servers.
- WebSphere MQ trace on the queue manager your application uses, taken at the same time.
Try to start and stop trace as quickly as possible in order to limit both the overhead of tracing and the size of the trace files. On systems other than IBM i and Windows, format the queue manager trace files after stopping the trace.
Step 2: Collect Data
Collect the following data for your Java or JMS problem. Use the runmqras tool if your WebSphere MQ installation is V126.96.36.199 or later, V188.8.131.52 or later, or V7.5, otherwise follow the manual instructions:
- Diagnostic data from your Java or JMS application.
If your application is running in WebSphere Application Server, run the collector tool to gather information about the system, the application server and its configuration, JNDI definitions, ffdc files, and logs and traces:
- WebSphere Application Server V8.5: Using the IBM Support Assistant Data Collector
- WebSphere Application Server V8.0: Gathering information with the collector tool
- WebSphere Application Server V7.0: Gathering information with the collector tool
- WebSphere Application Server V6.1: Gathering information with the collector tool
- WebSphere Application Server V6.0: Gathering information with the collector tool
If your WebSphere Application Server is using the WebSphere MQ V7.0 or later JMS classes, they may have written diagnostic files to the FFDC subdirectory of your profile (for example, WAS_HOME/profiles/profileName/FFDC), or to a different directory if you set a custom property. Please collect these files if they exist.
Some early levels of the WebSphere MQ V7.0 JMS classes may create mqjms.log and mqjms_ PID.trc files in your WebSphere Application Serve profile directory. Collect these files too if they exist.
If your application is running elsewhere, then collect the logs, traces and diagnostic files generated by your Java virtual machine. The name and location of these files will vary depending on whether your application is running in a Java SE environment or in a particular Java EE application server but should include:
- All information logged to the standard output stream (System.out).
- All information logged to the standard error stream (System.err).
- All information or errors logged by the Java virtual machine.
If you are using the WebSphere MQ V7.0 or later JMS classes, further information may be logged in the following new files. Please collect these files if they exist on your system:
- WebSphere MQ data from the queue managers used by your application.
WebSphere MQ includes an automated data collection tool called runmqras which you can use if you are running WebSphere MQ V184.108.40.206 or later, V220.127.116.11 or later, or V7.5.
Follow the WebSphere MQ runmqras usage instructions to gather data for your Java or JMS problem:
- Always gather object definitions on the queue manager using the section defs
- If your application uses publish/subscribe, gather topic data using the section topic
- If you generated trace files in Step 1, collect them by including the section trace
- To collect basic information from queue manager QMA:
runmqras -section defs -qmlist QMA
- If you generated queue manager traces, be sure to collect them:
runmqras -section defs,trace -qmlist QMA
- If your application accesses topics on queue managers QMA and QMB and you want to gather data and send it directly to IBM by standard FTP:
runmqras -section defs,topic,trace -qmlist QMA,QMB -pmrno 12345,67R,890 -ftp IBM
- If your system has multiple WebSphere MQ installations, issue the setmqenv command to choose the right installation. On Linux and UNIX, source setmqenv using a dot. For example:
Linux & UNIX
sh> . /path/to/mqm/bin/setmqenv -n Installation0
C:\> C:\Program Files (x86)\IBM\WebSphere MQ\bin\setmqenv -s
- Record the operating system version and maintenance level on both systems.
- Record the WebSphere MQ version and maintenance level on both systems.
- Collect the WebSphere MQ error logs as well as any WebSphere MQ FFST files. On IBM i, follow these instructions to save the necessary files and job logs.
- If your application is connecting as a client, use runmqsc to record your channels, listeners, and their status, as well as any channel authentication records. If any command gives an error, carry on to the next one.
DISPLAY CHANNEL(*) ALL
DISPLAY CHSTATUS(*) ALL
DISPLAY LISTENER(*) ALL
DISPLAY LSSTATUS(*) ALL
DISPLAY CHLAUTH(*) ALL
- Use runmqsc to record the configuration and status of the queue manager and of connected applications. If any command gives an error, carry on to the next:
DISPLAY QMGR ALL
DISPLAY QMSTATUS ALL
DISPLAY CONN(*) TYPE(*) ALL
- Use runmqsc to record the configuration and status of any queues used by your application. If any command gives an error, carry on to the next:
DISPLAY QUEUE(*) ALL
DISPLAY QSTATUS(*) TYPE(QUEUE) ALL
DISPLAY QSTATUS(*) TYPE(HANDLE) ALL
- If your application uses publish/subscribe, use runmqsc to record the status of pubsub, of any topics used by the application and of subscriptions managed by the queue manager. If any command gives an error, carry on to the next:
DISPLAY PUBSUB ALL
DISPLAY TOPIC(*) ALL
DISPLAY SUB(*) ALL
- If your application is connecting as a client, record the IP address and hostname of the queue manager system. If the queue manager system has multiple addresses or hostnames, include them all.
- If your application is having difficulty connecting as a client, use your operating system tools to list network connections on both the WebSphere Application Server and WebSphere MQ systems immediately before and after your attempt to connect:
IBM i Command Line
===> NETSTAT *CNN
Linux & UNIX
sh> netstat -an
C:\> netstat -an
- On Linux and UNIX systems, please send the output from the mqconfig script from the queue manager in addition to the other WebSphere MQ data.
Step 3: Analyze Data
You can now analyze WebSphere MQ data with IBM Support Assistant tools such as IBM Support Assistant Team Server. Using a web browser, you can see an overview of your system based on the data you collected, review problem symptoms found in the data, and search IBM's Global Knowledge Base for relevant Fix Packs, APARs and Technotes. Follow these steps until you find a solution for your Java or JMS application problem:
- Describe the system configuration, including the operating system involved and the versions of relevant software installed on them
- Tell us what errors you saw, where you saw them, and what time they happened
- Provide the names of any WebSphere MQ objects related to the problem, such as the names of any queues or topics used by your application
- Let us know if you made any changes to WebSphere MQ or the system before the problem
- Share any other observations which you think will help us to better understand the problem
Please see the IBM Software Support Handbook for more information on working with IBM support.