Collect and analyze WebSphere MQ data to solve problems with Java or JMS applications

Technote (troubleshooting)


Problem(Abstract)

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.

Environment

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:

  1. 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.

  2. 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.

  3. 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 V7.0.1.8 or later, V7.1.0.1 or later, or V7.5, otherwise follow the manual instructions:


  1. Diagnostic data from your Java or JMS application.


Collect data from applications running in WebSphere Application Server

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:



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.

Collect data from applications running elsewhere

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:

  • The mqjms.log file found by default in the application's current working directory.
  • The mqjms_PID.trc trace file from the same directory if you gathered a trace in Step 1.
  • Any FDC files in the FFDC subdirectory where you found the mqjms.log and trace files.



  1. WebSphere MQ data from the queue managers used by your application.


Collect WebSphere MQ data automatically with runmqras


WebSphere MQ includes an automated data collection tool called runmqras which you can use if you are running WebSphere MQ V7.0.1.8 or later, V7.1.0.1 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


Examples

  1. To collect basic information from queue manager QMA:

    runmqras -section defs -qmlist QMA


  2. If you generated queue manager traces, be sure to collect them:

    runmqras -section defs,trace -qmlist QMA


  3. 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

Collect WebSphere MQ data manually


  1. 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

    Windows
    C:\> C:\Program Files (x86)\IBM\WebSphere MQ\bin\setmqenv -s

  2. Record the operating system version and maintenance level on both systems.

  3. Record the WebSphere MQ version and maintenance level on both systems.

  4. 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.

  5. 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


  6. 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


  7. 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


  8. 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


  9. 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.

  10. 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

    Windows
    C:\> netstat -an


  1. 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:

  1. Review the IBM Support Assistant findings.
  2. Check for similar issues on the WebSphere MQ Support Portal.
  3. Use IBM Service Request to open a problem record with IBM.
  4. Send your data to IBM for further analysis.



  • 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.

Product Alias/Synonym

WMQ MQ

Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

WebSphere MQ
Java

Software version:

5.3, 6.0, 7.0, 7.1, 7.5

Operating system(s):

AIX, HP-UX, IBM i, Linux, Solaris, Windows

Software edition:

All Editions

Reference #:

1290340

Modified date:

2013-04-01

Translate my page

Machine Translation

Content navigation