FFDC log in websphere - unix1998/technical_notes GitHub Wiki

The First Failure Data Capture (FFDC) logs in WebSphere Application Server are designed to capture diagnostic information when a failure occurs. This helps in quickly identifying and diagnosing problems by capturing data at the moment an error happens. Here’s how you can use and understand the FFDC logs:

Location of FFDC Logs

FFDC logs are typically located in the FFDC directory within your server profile logs directory. The path might look something like this:

<WAS_PROFILE_ROOT>/logs/ffdc

Understanding FFDC Logs

FFDC logs capture detailed diagnostic information when an exception or error occurs. Each log file is named with a timestamp and contains information relevant to the failure. For example:

ffdc_12.12.2024_13.45.12.12345678.txt

Using FFDC Logs

  1. Identify the Problem: FFDC logs capture detailed information about failures, including stack traces, environment variables, and other context that can help in diagnosing the issue.

  2. Check the Timestamp: The timestamp in the file name helps correlate the log with the time the failure occurred, which can be useful when reviewing logs to understand the sequence of events.

  3. Analyze the Content: Open the FFDC log file with a text editor to analyze its content. The log will include:

    • Exception Information: Details about the exception or error that occurred.
    • Stack Trace: A full stack trace showing the method calls leading up to the failure.
    • Environment Information: Information about the environment, such as JVM properties and WebSphere configuration details.
    • Additional Data: Other relevant data that can help in understanding the context of the failure.

Example of FFDC Log Analysis

Here’s a simplified example of what you might find in an FFDC log file:

Exception = java.lang.NullPointerException
Source = com.ibm.ws.webcontainer.WebContainer
ProbeID = 1234
Stack Dump = java.lang.NullPointerException
  at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:987)
  at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:600)
  ...
Java Virtual Machine Information:
  JVM Version = 1.8.0
  JVM Vendor = IBM Corporation
  JVM Arguments = -Xms256m -Xmx1024m
  ...

In this example:

  • Exception: Indicates the type of exception that occurred.
  • Source: Shows the component or class where the exception originated.
  • Stack Dump: Provides the stack trace, which is critical for debugging.
  • JVM Information: Includes details about the JVM configuration.

Steps to Use FFDC Logs Effectively

  1. Correlate with Other Logs: Use the timestamp and stack trace to correlate the FFDC log with other logs, such as SystemOut.log and SystemErr.log.
  2. Reproduce the Issue: If possible, try to reproduce the issue in a controlled environment to gather more data.
  3. Consult Documentation: Refer to WebSphere documentation and support resources for information about the specific error and potential solutions.
  4. Seek Help: If you’re unable to resolve the issue, consider reaching out to IBM support, providing them with the FFDC logs and any other relevant information.

Enabling and Configuring FFDC

FFDC is enabled by default in WebSphere. However, you can configure the FFDC settings via the WebSphere administrative console:

  1. Log in to the WebSphere administrative console.
  2. Navigate to Troubleshooting -> FFDC.
  3. Configure the settings as needed, such as the maximum number of log files and the directory for storing FFDC logs.

By effectively using FFDC logs, you can significantly streamline the process of diagnosing and resolving issues in WebSphere Application Server.