IBM Support

Generating IBM MQ Explorer trace

Troubleshooting


Problem

This document explains how to generate an IBM MQ Explorer trace on Windows and Linux systems in order to investigate a problem.

Cause

Traces can capture the root cause of many MQ Explorer problems. It is important to limit how long tracing is active in order to avoid affecting performance or generating excessively large trace files. For other MQ traces refer to:


Resolving The Problem


IBM MQ Explorer (SupportPac MS0T)

The IBM MQ Explorer is provided on Windows, Linux x86 and Linux x86-64 systems both as part of a standard IBM MQ installation and also as a stand-alone install:




SupportPac MS0T is regularly updated to provide the latest available IBM MQ Explorer. If you downloaded SupportPac MS0T a long time ago, you might not be running the current version. You can determine the installed version either by looking at the IBM MQ Explorer splash screen or by examining the contents of the build_level.txt file in the top-level directory of the IBM MQ Explorer installation. For example, both of the following examples show the IBM MQ Explorer at version 8.0, built on 2014-04-29:

    IBM MQ Explorer Splash Screen





    IBM MQ Explorer build_level.txt File


    p000-L140429.1


Once you know which version of the IBM MQ Explorer you installed from SupportPac MS0T, you can follow the appropriate instructions below to trace it. If you are running an old version of the IBM MQ Explorer, you should first download and test the current version to see if the problem is already resolved.





IBM MQ V8.0 and WebSphere MQ V7.5 and V7.1 Explorer Trace



  1. Close the IBM MQ Explorer if it is currently running.


  2. Start the IBM MQ Explorer using the runwithtrace command, which has no command-line parameters. The runwithtrace command determines where to write traces based on your installation and system permissions, then prints the location of the trace files. If you are using the IBM MQ Explorer provided by an IBM MQ installation, the runwithtrace command is located in the mqexplorer/eclipse subdirectory of that installation, for example:

    1. IBM MQ Explorer on Linux


      sh> /opt/mqm75/mqexplorer/eclipse/runwithtrace
      Confirming write access to the MQ trace directory /var/mqm/trace
      Trace will be written to the MQ trace directory /var/mqm/trace
      Launching ../../bin/MQExplorer...

      IBM MQ Explorer on Windows


      C:\> "C:\Program Files (x86)\IBM\WebSphere MQ\MQExplorer\eclipse\runwithtrace.cmd"
      Confirming write access to the MQ trace directory C:\Program Files (x86)\IBM\WebSphere MQ\trace
      Trace will be written to the MQ trace directory C:\Program Files (x86)\IBM\WebSphere MQ\trace
      Launching ..\..\bin\MQExplorer.exe...


  3. If you are using the standalone IBM MQ Explorer from SupportPac MS0T, the runwithtrace command is located in the top-level installation directory, for example:

    1. IBM MQ Explorer (SupportPac MS0T) on Linux


      sh> /opt/ibm/WebSphere_MQ_Explorer/runwithtrace
      Confirming write access to the MQ trace directory /var/mqm/trace
      /opt/ibm/WebSphere_MQ_Explorer/runwithtrace: line 54: /tmp/mq_trace.properties: Permission denied
      Trace will be written to the temporary directory /tmp
      Launching ./MQExplorer...

      IBM MQ Explorer (SupportPac MS0T) on Windows


      C:\> "C:\Program Files (x86)\IBM\WebSphere MQ Explorer\runwithtrace.cmd"
      Confirming write access to the MQ trace directory C:\Program Files (x86)\IBM\WebSphere MQ\trace
      Trace will be written to the MQ trace directory C:\Program Files (x86)\IBM\WebSphere MQ\trace
      Launching MQExplorer.exe...


  4. Use the IBM MQ Explorer to demonstrate the problem. Record the steps you took and the results you saw, if necessary saving a screenshot of the problem. Try to keep the duration of the trace as short as possible.


  5. Close the IBM MQ Explorer to stop tracing. The trace files created by the IBM MQ Explorer will be in the directory printed by the runwithtrace command and will be named like AMQxxx.FDC and AMQxxx.TRC.n, where xxx is a timestamp and n is a counter. The most recent trace file will have a counter value n=0, while older traces may show n=1 and higher.




WebSphere MQ File Transfer Edition V7.0 Explorer Plug-In Trace



  1. Close the WebSphere MQ Explorer if it is currently running.


  2. Create a text file called .options in your current directory on Windows, or in /opt/mqm/eclipseSDK33/eclipse on Linux with the following contents:

    1. WebSphere MQ Explorer options file contents


      # WebSphere MQ FTE trace options
      com.ibm.wmqfte.explorer/debug=true
      com.ibm.wmqfte.explorer/debug/level==all



  3. From that directory, start the WebSphere MQ Explorer in debug mode:

    1. Starting the WebSphere MQ Explorer in debug mode on Linux and Windows


      strmqcfg -x



  4. Use the WebSphere MQ Explorer to demonstrate the problem. Once the problem has been reproduced, exit the WebSphere MQ Explorer and delete the .options file to stop tracing.


  5. The files created by the WebSphere MQ Explorer File Transfer plug-in trace are located in the WebSphere MQ File Transfer Edition directory tree. For example:

    1. WebSphere MQ Explorer File Transfer plug-in traces on Linux


      /var/IBM/WMQFTE/config/gui/logs/trace*.txt

      WebSphere MQ Explorer File Transfer plug-in traces on Windows (may vary)

      C:\Documents and Settings\All Users\Application Data\IBM\WMQFTE\config\gui\logs\trace*.txt




WebSphere MQ V7.0 and WebSphere MQ V6.0 Explorer Trace



  1. Close the WebSphere MQ Explorer if it is currently running.


  2. If you are running WebSphere MQ V7.0.0.0 you should upgrade to a later fix pack before tracing in order to avoid a known hang:



  3. Create a text file called internal.properties in a temporary directory with the contents suggested below. Change the Destination.Pathname and Destination.Filename values in the examples below to point to a temporary directory on your system. On Linux you should use a directory like /tmp and make sure the internal.properties file is readable to the user who will start the WebSphere MQ Explorer, for example:

      Linux /tmp/internal.properties File


      Diagnostics.MQ=enabled
      Diagnostics.Java=explorer,wmqjavaclasses,all
      Diagnostics.Java.Trace.Detail=high
      Diagnostics.Java.Trace.Destination.File=enabled
      Diagnostics.Java.Trace.Destination.Console=disabled
      Diagnostics.Java.Trace.Destination.Pathname=/tmp
      Diagnostics.Java.FFDC.Destination.Pathname=/tmp
      Diagnostics.Java.Errors.Destination.Filename=/tmp/AMQJERR.LOG


    On Windows you can use a directory like C:\Temp, or you can use your personal temporary directory (e.g. the value of the TEMP environment variable, as in the example below). You must use double-backslashes for the path separator in the config.properties file on Windows:

      Windows C:\Users\username\AppData\Local\Temp\internal.properties File


      Diagnostics.MQ=enabled
      Diagnostics.Java=explorer,wmqjavaclasses,all
      Diagnostics.Java.Trace.Detail=high
      Diagnostics.Java.Trace.Destination.File=enabled
      Diagnostics.Java.Trace.Destination.Console=disabled
      Diagnostics.Java.Trace.Destination.Pathname=C:\\Users\\username\\AppData\\Local\\Temp
      Diagnostics.Java.FFDC.Destination.Pathname=C:\\Users\\username\\AppData\\Local\\Temp
      Diagnostics.Java.Errors.Destination.Filename=C:\\Users\\username\\AppData\\Local\\Temp\\AMQJERR.LOG


  4. Make a backup copy of the runmqcfg and runmqcfg_rcp commands provided by WebSphere MQ. Both commands are located in the same directory, which is /opt/mqm/bin on Linux and the bin subdirectory of the WebSphere MQ installation location on Windows, by default C:\Program Files (x86)\IBM\WebSphere MQ\bin.


  5. Modify the runmqcfg and runmqcfg_rcp command files.

    On Linux, modify both the runmqcfg and runmqcfg_rcp files by replacing the single line AMQ_EXPLORER="./eclipse" with the following two lines below, depending on your version of WebSphere MQ. The AMQ_EXPLORER variable should include the path to the internal.properties file you created earlier:

    1. WebSphere MQ V7.0 for Linux runmqcfg and runmqcfg_rcp Changes


      AMQECLIPSE="/opt/mqm/eclipseSDK33/eclipse"
      AMQ_EXPLORER="$AMQECLIPSE/eclipse -Dcom.ibm.mq.commonservices=/tmp/internal.properties"

      WebSphere MQ V6.0 for Linux runmqcfg and runmqcfg_rcp Changes


      AMQECLIPSE="/opt/mqm/ies30/eclipse"
      AMQ_EXPLORER="$AMQECLIPSE/eclipse -Dcom.ibm.mq.commonservices=/tmp/internal.properties"


    On Windows, modify both the runmqcfg.cmd and runmqcfg_rcp.cmd files by replacing the single line AMQ_EXPLORER="%AMQECLIPSE%\eclipse" with the two set lines below. The AMQECLIPSE variable should point to the eclipse path located under the WebSphere MQ installation, while the AMQ_EXPLORER variable should point to the internal.properties file you created earlier, and both paths should use single-backslashes for path separators. In addition, change the start "WebSphere MQ Explorer" %AMQ_EXPLORER% line at the bottom of each script to enclose %AMQ_EXPLORER% in double quotes. The following changes are typical for WebSphere MQ V7.0 and V6.0 installations, but use the path names appropriate to your system:

      WebSphere MQ V7.0 for Windows runmqcfg.cmd and runmqcfg_rcp.cmd Changes


      set AMQECLIPSE="C:\Program Files (x86)\IBM\WebSphere MQ\eclipseSDK33\eclipse"
      set AMQ_EXPLORER="%AMQECLIPSE%\eclipse -Dcom.ibm.mq.commonservices=C:\Users\username\AppData\Local\Temp\internal.properties"

      ...

      start "WebSphere MQ Explorer" "%AMQ_EXPLORER%"


      WebSphere MQ V6.0 for Windows runmqcfg.cmd and runmqcfg_rcp.cmd Changes


      set AMQECLIPSE="C:\Program Files (x86)\IBM\Eclipse SDK30\eclipse"
      set AMQ_EXPLORER="%AMQECLIPSE%\eclipse -Dcom.ibm.mq.commonservices=C:\Users\username\AppData\Local\Temp\internal.properties"

      ...

      start "WebSphere MQ Explorer" "%AMQ_EXPLORER%"



  6. Start the WebSphere MQ Explorer by running strmqcfg:

    1. WebSphere MQ Explorer on Linux


      sh> /opt/mqm/bin/strmqcfg

      WebSphere MQ Explorer on Windows


      C:\> "C:\Program Files (x86)\IBM\WebSphere MQ\bin\strmqcfg"



  7. Use the WebSphere MQ Explorer to demonstrate the problem. Record the steps you took and the results you saw, if necessary saving a screenshot of the problem. Try to keep the duration of the trace as short as possible.


  8. Close the WebSphere MQ Explorer to stop tracing. The files created by the WebSphere MQ Explorer will be named like AMQxxx.n.FDC and AMQxxx.n.JC.TRC, where xxx is a timestamp and n is a counter. Files are numbered sequentially, with n=0 being the oldest files and higher value of n the newer files.


  9. When you are done gathering traces, revert the changes to the runmqcfg and runmqcfg_rcp command files by restoring the backup copies you created earlier.



Additional Information



[{"Product":{"code":"SSFKSJ","label":"WebSphere MQ"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Problem Determination","Platform":[{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"8.0;7.5;7.1;7.0;6.0","Edition":"All Editions","Line of Business":{"code":"LOB45","label":"Automation"}}]

Product Synonym

WebSphere MQ WMQ

Document Information

Modified date:
15 June 2018

UID

swg21673509