IBM Support

Set up trace and get a full dump for WebSphere Liberty

Troubleshooting


Problem

You might need to collect data to resolve problems that you encounter when you use IBM® WebSphere® Application Server Liberty™ (Liberty). 

Resolving The Problem

Use this document to set up trace strings and request dumps for Liberty. 
This document is specific to Liberty. For tracing components in WebSphere Application Server traditional, see MustGather: Read first for WebSphere Application Server and Liberty.

 

Requesting dumps for a Liberty server that is running with the IBM SDK:

 image-20230808141916-1 System dumps are not available for HotSpot-based Java's (such as Eclipse® Temurin™, or Oracle® Java™) .

The dump type can be any combination of thread, heap, or system, specified by:

--include=thread
--include=heap
--include=system
--include=thread,system,heap (Or any combination)
Perform the following steps on a target Liberty server that is running with an IBM SDK to request a system dump:
  1. Run the dump command:
    image 13053 The location of the dump file is returned when the command completes.
    • For Windows® platforms, run:
      <LIBERTY_HOME>\bin\server.bat dump <serverName> --include=<desired dump type>
    • For UNIX® platforms, run:
      <LIBERTY_HOME>/bin/server dump <serverName> --include=<desired dump type>
  2. Collect the resulting dump zip file.
    image 13053 The current Liberty dump command also gathers deployed applications.

 

Configuring Full Core Dumps

Your operating system must be set up to produce full system core dumps.  Reference the appropriate information for your operating system:

 

Enabling Trace

There are two formats of trace output: text-based and binary.  This document shows how to set up text-based tracing.  If you are interested in setting up binary tracing, see the Configuring binary logging in Liberty topic in IBM Docs.

For text-based tracing, there are three formats: BASICADVANCED, and ENHANCED.  This document shows how to set up BASIC text-based tracing.  See the Logging and Trace topic in IBM Docs to find more information about Liberty logging and trace.

The trace strings are specific to a module or component within WebSphere Liberty that you want to troubleshoot.

  1. Enable trace on the target Liberty server:
    1. Open the server.xml file in the root directory of the target server:
      <LIBERTY_HOME>/usr/servers/<server>/server.xml

      Where LIBERTY_HOME is the location of the extracted binary or is <AppServer>/wlp if Liberty is installed with WebSphere Application Server Version 8.5.
    2. Add a <logging> element to the server.xml file.
      • For example, to trace for the web container component with BASIC logging, add the following snippet to the server.xml file:
        <logging  traceSpecification="com.ibm.ws.webcontainer*=all:com.ibm.wsspi.webcontainer*=all:HTTPChannel=all:GenericBNF=all:HTTPDispatcher=all"
        traceFileName="trace.log"
        maxFileSize="20"
        maxFiles="10"
        traceFormat="BASIC" />
  2. If possible, stop the server and clear the logs under the following directory:
    <LIBERTY_HOME>/usr/servers/<serverName>/logs
  3. Re-create the problem and collect the information.
     
  4. Follow the instructions on Exchanging information with IBM Technical Support for problem determination to send diagnostic information to IBM support.

 

Trace specifications available

image 13053 If you cannot find a trace string for the feature that you want, check the MustGather: Read first for WebSphere Application Server and Liberty page to find a MustGather page for the feature.

The following trace strings can be used as the trace specification with the previous instructions to diagnose an issue in a specific component:

  • Class loading
    MustGather: Classloader problems for WebSphere Application Server Liberty Profile
    Note: OSGi class loading issues require the use of the OSGi console. See the Using an OSGi console topic in IBM Docs.
  • Configuration
    com.ibm.ws.config.*=all
  • Connections, Connection Pooling, and Transaction
    RRA=all:WAS.j2c=all:com.ibm.ws.jdbc.*=all:Transaction=all:ConnLeakLogic=all
  • Deploy (EAR/WAR/EBA)
    MustGather: Problems during deployment of EAR/JAR/WAR files in WebSphere Application Server Liberty
  • EJB
    EJBContainer=all:Injection=all
  • Java Batch
    com.ibm.jbatch.*=all:com.ibm.ws.jbatch.*=all
  • Java Management Extensions (JMX) or JMX client API (Server)
    jmx.rest.server.connector=all:com.ibm.ws.jmx.connector.server.rest.*=all
  • Java Persistence API (JPA)
    JPA=all
  • Java Transaction Service (JTS)
    Transaction=all:com.ibm.ws.transaction.services.WebAppTransactionCollaboratorImpl=all
  • JavaServer Pages (JSP)
    com.ibm.ws.jsp=all
  • JAX-RS (RESTful Web Services)
     *=info:com.ibm.ws.jaxrs*=all:com.ibm.websphere.jaxrs*=all:org.apache.cxf.*=all:RESTfulWS=all:io.openliberty.org.jboss.*=all:io.openliberty.restfulWS.*=all:org.jboss.resteasy.*=all
  • JAX-WS (web services)
    MustGather: JAX-WS/JAX-RPC Web Services engine problems for WebSphere Application Server
    MustGather: Web Services Security (WS-Security) problems with WebSphere Application Server
  • JNDI and Naming
    Naming=all:NamingService=all:org.apache.aries.jndi.*=all
  • JSF
    com.ibm.ws.jsf*=all:org.apache.myfaces*=all:com.ibm.ws.webcontainer*=all:com.ibm.ws.jsp=all
    • Note: If you are using the faces-4.0 feature:
      com.ibm.ws.jsf*=all:org.apache.myfaces*=all:com.ibm.ws.webcontainer*=all:io.openliberty.faces*=all
  • Managed Executors and Thread Context Propagation
    concurrent=all
    • If an issue with concurrency constraints (for example, max async or max queued:
      concurrent=all:concurrencyPolicy=all
    • If an issue with context propagation to managed executor tasks:
      concurrent=all:context=all
    • If an issue with the underlying thread pool:
      concurrent=all:concurrencyPolicy=all:Threading=all
  • MQJMS
    • If the IBM® MQ resource adapter uses either the wmqJmsClient-1.1 or wmqJmsClient-2.0 feature, enable the following trace:
      *=info:JMSApi=all:Transaction=all:WAS.j2c=all:EJBContainer=all:Injection=all
    • If the IBM® MQ resource adapter uses generic JCA support, trace can be enabled by adding the following entry to the WebSphere Liberty jvm.options file:
      -Dcom.ibm.msg.client.commonservices.trace.status=ON
      -Dcom.ibm.msg.client.commonservices.trace.outputName=C:\Trace\MQRA-WLP_%PID%.trc
      A trace file called MQRA-WLP_<process identifier>.trc is written to the C:\Trace directory.
  • ORB
    • For IIOP and Yoko ORB issues:
      IIOP=all:org.apache.yoko.*=all:yoko.verbose.*=fine
    • For JNDI and Naming issues:
      Naming=all:NamingService=all:org.apache.aries.jndi.*=all
    • CosNaming issues can involve both IIOP and JNDI, so enable both sets:
      Naming=all:NamingService=all:IIOP=all:org.apache.yoko.*=all:yoko.verbose.*=fine
  • Plug-in Generation
    com.ibm.ws.webcontainer.osgi.mbeans.*=all
  • PMI/Performance Tools
    • General:
      com.ibm.websphere.monitor.*=all:com.ibm.ws.monitor.*=all:com.ibm.websphere.pmi.*=all:com.ibm.websphere.pmi.*=all:com.ibm.ws.monitors.*=all
    • In case the ConnectionPoolStats MBean is required, use the following trace string instead:
      *=info:com.ibm.websphere.monitor.jmx.*=all:com.ibm.websphere.monitor.meters.Meter*=all:com.ibm.websphere.monitor.meters.Counter*=all:com.ibm.websphere.monitor.meters.Gauge*=all:com.ibm.websphere.monitor.meters.StatisticsMeter=all:com.ibm.websphere.monitor.meters.StatisticsReading=all:com.ibm.ws.monitor.*=all:com.ibm.websphere.pmi.*=all:com.ibm.ws.monitors.*=all
  • Security
    MustGather: Core security problems for WebSphere traditional and Liberty
    MustGather: SSL problems on WebSphere Liberty
    MustGather: Web SSO problems with WebSphere Application Server (OIDC, SAML, OAuth)
    MustGather: SPNEGO problems on WebSphere Liberty
    MustGather: Web Services Security (WS-Security) problems with WebSphere Application Server
  • Servlet Engine and Web Container
    MustGather: Web container problems in WebSphere Application Server and WebSphere Liberty
  • Sessions and Session Management
    com.ibm.ws.session.*=all:com.ibm.ws.webcontainer*=all:com.ibm.wsspi.webcontainer*=all
    • For database persistence issues, add:
      RRA=all
    • For trace scheduler problems, add:
      persistentExecutor=all:concurrent=all:EJBContainer=all:RRA=all:WAS.j2c=all:com.ibm.ws.jdbc.*=all:Transaction=all
  • SIBJMS
    • SIB Connection problems
      SIBTrm=all
    • SIB Communications and TCP/IP
      SIBCommunications=all:SIBJFapChannel=all:TCPChannel=fine:com.ibm.io.async.*=all
    • SIB Client Applications
      SIBJms*=all:SIBCommunications=all:SIBJFapChannel=all:SIBMessageTrace=all:SIBTrm=all:SIBJmsRa=all:SIBRa=all
    • SIB Locked messages
      SIBProcessor=all:SIBMessageTrace=all
    • SIB MDB
      SIBMessageTrace=all:SIBJmsRa=all:SIBRa=all
    • SIB Message format and schema
      SIBMfp=all:SIBCommunications=all
    • SIB Message processor
      SIBProcessor=all:SIBMessageTrace=all
    • SIB Message store
      SIBMessageStore=all
    • SIB Performance
      SIBMessageTrace=all
    • SIB Publish and Subscribe
      SIBMatchSpace=all:SIBProcessor=all
    • SIB Security
      SIBSecurity=all
  • WebSocket
    *=info:websockets=all:com.ibm.ws.webcontainer.*=all:com.ibm.wsspi.webcontainer.*=all:com.ibm.ws.webcontainer31.*=all:com.ibm.ws.servlet31.*=all:HTTPChannel=all:TCPChannel=all

[{"Product":{"code":"SSD28V","label":"WebSphere Application Server Liberty Core"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"--","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF012","label":"IBM i"},{"code":"PF016","label":"Linux"},{"code":"PF022","label":"OS X"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"9.0;8.5.5;8.5","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
10 August 2023

UID

swg21596714