IBM Support

Setting up a trace in WebSphere Application Server

Troubleshooting


Problem

Use this document to set up IBM WebSphere® Application Server trace with trace strings that are specified in WebSphere MustGather documents.

Resolving The Problem

image 12979 The trace string you use depends on the module or component in WebSphere Application Server that you need to trace, or the problem that you are attempting to troubleshoot.  To determine the trace string you need, see MustGather: Read first for WebSphere Application Server for a listing of product components that matches your symptom.
image 12978 The trace Maximum file size and Maximum number of historical files suggested in this document is sufficient for most cases. For large environments, set the Maximum number of historical files to 30.  Setting the Maximum number of historical files to 30 captures approximately 3GB of trace.

image 12981 To set up trace for WebSphere Application Server Liberty instead, see Set up trace and get a full dump for WebSphere Liberty.

image-20240206120550-1 Common trace actions

  • Set up static trace
    1. In the administrative console, click Troubleshooting > Logs and Trace.
    2. On the Logging and Tracing page, click the application server that you want to trace.
    3. Click Diagnostic Trace.
    4. On the Configuration tab, under Trace Output, click File, then
      • Increase the Maximum File Size to 100 MB
      • Increase the Maximum Number of Historical Files to 10
      • (Optional) Replace the default File Name
        image 12978 If you do not specify path, but just the file name, then the default location of the file is under the application server's profile directory.
    5. Unless otherwise specified by support, choose Basic (Compatible) for the Trace Output Format.
    6. Click Apply.
    7. Under Additional Properties, click Change Log Detail Levels.
    8. On the Configuration tab, in the box under Change log detail levels, enter trace string for the specific MustGather for which you are collecting data.
    9. Click OK, then Save your configuration (choose the Synchronize changes with Nodes option)
    10. Restart the server to begin tracing.
  • Set up dynamic trace
    1. In the administrative console, click Troubleshooting > Logs and Trace.
    2. On the Logging and Tracing page, click the application server that you want to trace.
    3. Click Diagnostic Trace.
    4. Click the Runtime tab
      image 12977 If the server is not running, the Runtime tab does not display.
      image 12980 If you do not want your runtime setting to become permanent, do not click Save Runtime Changes to Configuration as well on the panel.
    5. Under Trace Output, click File, then
      • Set the Maximum file size to 100 MB
      • Set the Maximum number of historical files to 10.
      • (Optional) Replace the default File Name
        image 12978 If you do not specify path, but just the file name, then the default location of the file is under the application server's profile directory.
    6. Click Apply.
    7. Under Additional Properties, click Change Log Detail Levels.
    8. In the box under Change log detail levels, enter trace string for the specific MustGather for which you are collecting data.
      image 12980 If you do not want your runtime setting to become permanent, do not click Save Runtime Changes to Configuration as well.
    9. Click OK, then Save your configuration (choose the Synchronize changes with Nodes option).
    10. The server does not require a restart; it starts tracing immediately.
  • Stop trace
    1. In the administrative console, click Troubleshooting > Logs and Trace.
    2. Click the application server on which you want to stop trace.
    3. Click Diagnostic Trace.
    4. Depending on the trace type that you want to disable, click the Configuration -or- Runtime tab
    5. Remove the contents from the box under Change log detail levels.
    6. Click OK, then Save your configuration (choose the Synchronize changes with Nodes option).
    7. If you disabled a static trace (through the Configuration tab), the tracing does not stop until the server is restarted.


image-20240206120550-1 Other trace actions

  • Set up COMM trace
  • Set up JSSE client-side trace

    JSSE client-side traces are required when you are observing SSL issues with a Java application that is interacting with a running WebSphere Application Server process.

    If you are asked to run JSSE client-side traces o the following for your Operating System:

    • Unix
      • If you are working on SSL issues with wsadmin ou can use the -javaoption sp;command-line argument to enable JSSE tracing.
        Note: You can debug most client-side SSL issues with wsadmin
        1. Navigate to the bin directory of the profile
        2. Run the following command:
          ./wsadmin.sh -trace -javaoption -Djavax.net.debug=all
      • If you need to debug one of the other WebSphere client commands, like stopServer  and  serverStatus ou can enable traces with the following technique:
        1. Open a Unix shell, then set the following environment variables:
          export WAS_TRACE="-Djavax.net.debug=all"
          export WAS_DEBUG="-Djavax.net.debug=all"
        2. Put timestamp and host information in the log file:
          1. Navigate to the bin directory of the profile
          2. Run the following command:
            date +"%m/%d/%Y %H:%M:%S $HOSTNAME" >>clientSSL.log 2>&1
        3. Run the client-side command, redirecting the output to the log file, for example:
          ./serverStatus.sh server1 -trace -user (USERNAME) -password (PASSWORD) >>clientSSL.log 2>&1
        4. To turn tracing off, unset the environment variables:
          unset WAS_TRACE
          unset WAS_DEBUG
          Note: You can use echo to show what environment variables are set to, for example: " echo $WAS_TRACE $WAS_DEBUG /li>
      • Alternatively you can modify the calling script to add javax.net.debug=all
        Modify the calling script to add the following to where Java is called:
        -Djavax.net.debug=all

        image-20240206122211-1 Send the resulting clientSSL.log e located in the profile's bin directory to IBM, along with any additional information that was requested.
      • Windows
        • If you are working on SSL issues with wsadmin ou can use the -javaoption mand-line argument to enable JSSE tracing.
          Note: You can debug most client-side SSL issues with wsadmin
          1. Navigate to the bin directory of the profile
          2. Run the following command:
            wsadmin -trace -javaoption -Djavax.net.debug=all
        • If you need to debug one of the other WebSphere client commands, like stopServer nd  serverStatus bsp;you can enable traces with the following technique:
          1. Open a command window, then set the following environment variables:
            set WAS_TRACE="-Djavax.net.debug=all"
            set WAS_DEBUG="-Djavax.net.debug=all"
          2. Put timestamp and host information in the log file:
            1. Navigate to the bin directory of the profile
            2. Run the following commands:
              echo %date% %time% %computername% >>clientSSL.log 2>&1
              tzutil /g >>clientSSL.log 2>&1
          3. Run the client-side command, redirecting the output to the log file, for example:
            serverStatus server1 -trace -user (USERNAME) -password (PASSWORD) >>clientSSL.log 2>&1
          4. To turn tracing off, unset the environment variables:
            set WAS_TRACE=
            set WAS_DEBUG=
            Note: You can use echo to show what environment variables are set to, for example: " set WAS /li>
        • Alternatively you can modify the calling script to add javax.net.debug=all
          Modify the calling script to add the following to where Java is called:
          -Djavax.net.debug=all

          image-20240206122211-1 Send the resulting clientSSL.log e located in the profile's bin directory to IBM, along with any additional information that was requested.

      [{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Component":"General","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"9.0;8.5","Edition":"Base;Express;Network Deployment","Line of Business":{"code":"LOB67","label":"IT Automation \u0026 App Modernization"}},{"Product":{"code":"SSNVBF","label":"Runtimes for Java Technology"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Java SDK","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB36","label":"IBM Automation"}}]

      Document Information

      Modified date:
      06 February 2024

      UID

      swg21254706