IBM Support

Set up trace and get a full dump for WebSphere Liberty



Use this document to set up trace strings and request dumps for WebSphere Application Server Liberty.

Resolving The Problem

For tracing components in traditional WebSphere Application Server refer to MustGather: Read first for WebSphere Application Server.

To request dumps for Liberty running with IBM SDK:

Run the Liberty dump command on the target Liberty server to request the desired dump files. The dump type can be any combination of thread, heap, or system. It is specified by:

  1. --include=thread
  2. --include=heap
  3. --include=system
  4. --include=thread,system,heap (or any combination)

NOTE: For HotSpot based Java's (such as Eclipse Temurin, or Oracle Java) system dumps are not available.

The location of the dump file will be 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>
  • Collect the resulting dump zip file.
    Note: The current Liberty dump command also gathers deployed applications.
Configuring Full Core Dumps
The OS must be set up to produce full system core dumps.  Please reference the appropriate information for your operating system:
"Crash on AIX produces no core or a truncated core"
** Steps 1 - 3 ONLY
"Crash on Linux produces no core or truncated core"
** Steps 1 - 3 ONLY
"MustGather: Crash on Windows"
** Section "Configuring Full Core Dumps"

Enabling Trace on Liberty:

There are 2 formats for trace output - binary or HPEL, which uses fewer resources and disk space but has to be formatted to be readable and BASIC, which is readable. Binary HPEL format requires an addition to the file before starting servers and includes binary trace in the trace specifications. Once the file is edited, trace is picked up dynamically for both formats. . The trace strings are specific to a module or component within WebSphere Liberty that you want to troubleshoot. Examples are for the BASIC format.

  1. To enable tracing on the target Liberty server:
    1. To enable binary logging, first add this line to the file in the LIBERTY_HOME/usr/servers/<server> location:

    2. Open the server.xml file in the root directory of the target server:

      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
      Add the <logging> tag to the server.xml file with the following elements:

      For example, to trace for the web container component, you would add the following snippet to the server.xml file, with the appropriate traceSpecification.  Note this example uses binaryTrace format (explanation to each of these elements is provided in the product documentation)
  2. If possible, stop the server and clear the logs under the following directory:
  3. Recreate the problem and collect the information.
  4. Follow instructions to send diagnostic information to IBM Support.

Trace specifications available

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

  • Classloading

    Also, so that native JVM classloader tracing is captured, add the following JVM argument to <LIBERTY_HOME>/usr/servers/<server name>/jvm.options Add the argument, save, and stop-restart the server:

    Note: osgi classloading issues require the use of the OSGI console see section on OSGI console
  • Configuration*=all
  • Connections/Connection Pooling/Transaction*=all:Transaction=all:ConnLeakLogic=all
  • Deploy (EAR/WAR/EBA)
  • EJB
  • Java Batch**=all
  • Java Management Extensions (JMX) or JMX client API (Server)*=all
  • Java Persistence API (JPA)
  • Java Transaction Service (JTS)
  • JavaServer Pages (JSP)
  • JAX-RS (RESTful Web Services)**=all:org.apache.wink.*=all:org.apache.cxf.*=all
  • JAX-WS (web services)
  • JNDI and Naming
  • JSF*=all:org.apache.myfaces**
  • Managed Executors and Thread Context Propagation
    If an issue with concurrency constraints (for example, max async or max queued),
    If an issue with context propagation to managed executor tasks,
    If an issue with the underlying thread pool,
  • MQJMS:
    If the IBM® MQ resource adapter is installed using either the wmqJmsClient-1.1 or wmqJmsClient-2.0 feature, 
    enable the following trace:
    If the IBM® MQ resource adapter is installed using generic JCA support, trace can be enabled by adding the following entry to the WebSphere Liberty file jvm.options:\Trace\MQRA-WLP_%PID%.trc
    This results in trace being written to a trace file called MQRA-WLP_<process identifier>.trc in the directory C:\Trace.
  • ORB:
    For IIOP and Yoko ORB issues:

    For JNDI and Naming issues:

    CosNaming issues can involve both IIOP and JNDI, so enable both sets:
  • Plug-in Generation*=all
  • PMI/Performance Tools


    In case the ConnectionPoolStats MBean is required, use the following instead of the above PMI trace string:
  • Servlet Engine/Web Container**=all:HTTPChannel=all:GenericBNF=all:HTTPDispatcher=all
  • Sessions and Session Management***=all

    In addition,:
    RRA=all (for database persistence issues)

    Additional trace for scheduler*=all:Transaction=all  
  • SIBJMS connection problems
  • SIBJMS Communications and TCP/IP*=all
  • SIBJMS Client Applications
  • SIBJMS locked messages
  • SIBJMS message format and schema
  • SIBJMS message processor
  • SIBJMS message store
  • SIBJMS performance
  • SIBJMS publish/subscribe
  • SIBJMS security
  • WebSocket

Please see the full trace specifications in the related information URL.

Related Information

[{"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:
26 October 2022