Managing Oracle Fusion Middleware Logging

Collecting and Managing Log Files

This chapter describes debugging techniques and options for the Oracle Fusion Middleware 11g components of E-Business Suite Release 12.2. These include:

This chapter provides steps to enable extra debug and automate collection of log files required for debugging the various issues that you may encounter.

Important: Any increase to logging levels should be reversed once the necessary debug information has been collected. Oracle does not recommend that detailed logging is left activated for extended periods, especially on production systems.

Collecting Log Files at Lower Debug Levels

This section should be followed if you are planning to create a service request for an issue that has already occurred or which is not easily reproducible. The procedures described do not enable additional debug information to be collected: rather, they simply collect log files at whatever debug levels are currently configured.

For some problems, the debug information collected here may not suffice: in such cases, you should follow the steps in the section Collecting Log Files at Higher Debug Levels.

Oracle Process Manager and Oracle HTTP Server Log Files

To gather the log files for OPMN and OHS services, run the following command as the owner of the application tier file system:

$ zip -r /tmp/`uname -n`_`date +%m%d%y.%H%M`_OPMN_OHS.zip $IAS_ORACLE_HOME/instances/*/diagnostics/logs/OHS/EBS_web_component/*log* $IAS_ORACLE_HOME/instances/*/diagnostics/logs/OPMN/opmn/*

This will create zip files in the /tmp directory with names including the server name, date, and time. For example: server1.example.com_092415.1405_OPMN_OHS.zip. (Here, the date is specified in MMDDYY format.) To support a service request, you may collect these files from the /tmp directory and upload them to the request.

Oracle WebLogic Server Log Files

To gather the log files for Oracle Fusion Middleware components such as Node Manager, Admin Server, forms, oacore and oafm services, run the following command as the owner of the application tier file system:

$ zip -r /tmp/`uname -n`_`date +%m%d%y.%H%M`_FMW.zip \
$IAS_ORACLE_HOME/../wlserver_10.3/common/nodemanager \
$EBS_DOMAIN_HOME/servers/oa*/logs/* \
$EBS_DOMAIN_HOME/servers/forms*/logs/* \
$EBS_DOMAIN_HOME/servers/AdminServer/logs/* \
$EBS_DOMAIN_HOME/sysman/log/*

Note: This example shows the command being split over several screen lines, with each screen line being terminated by the backslash character.

This will create zip files in the /tmp directory with names including the server name, date, and time. For example: server1.example.com_092415.1405_OPMN_OHS.zip. (Here, the date is specified in MMDDYY format.) To support a service request, you may collect these files from the /tmp directory and upload them to the request.

Collecting Log Files at Higher Debug Levels

This section describes how to enable the higher logging levels required to capture the additional debug information that is sometimes needed for resolving problems. You may be directed to this section by Oracle Support. Follow the steps below to enable debug for the appropriate component, in readiness for reproducing the issue and (typically) sending the collected log files to Oracle.

Note: Generally speaking, increasing the log levels in this way should only have a minimal impact on performance (maximum 5% degradation).

Oracle Process Manager

To enable debug for opmn, open the file $IAS_ORACLE_HOME/instances/<instance>/config/OPMN/opmn/opmn.xml with a text editor (such as vi) and change the line:

<debug comp="" rotation-size="1500000"/>

to:

<debug comp="ons[all];pm[all]" rotation-size="1500000"/>

Save your changes and exit the editor.

Alternatively, you can increase the opmn logging level for the current session by issuing the command:

$IAS_ORACLE_HOME/instances/<yourinstance>/bin/opmnctl set target=debug comp="ons[all];pm[all]"

This will enable debug for all components running under the opmn process. However, in many situations this may not be practical, so you will need to adjust the logging levels as described below.

Oracle HTTP Server Access Logging

To adjust OHS logging levels, access the Enterprise Manager console at http://server.domain:wls_admin_port/em and log in as the WLS admin user for Oracle E-Business Suite, usually weblogic.

Expand the Web Tier menu, right-click 'EBS_web_component', and choose 'Administration - Log Configuration'. Here you have the option to set the log level. Set it to 'Trace:32'.

Node Manager

To adjust the log level for Node Manager, open the file $IAS_ORACLE_HOME/../wlserver_10.3/common/nodemanager/nodemanager.properties with a text editor (such as vi) and add the line:

adjust LogLevel=INFO to LogLevel=FINEST

Start and Stop Logging

To adjust start/stop log levels, access the Enterprise Manager console at http://server.domain:wls_admin_port/em and log in as the WLS admin user for Oracle E-Business Suite, usually weblogic.

Expand 'WebLogic Domain', then expand 'EBS_domain_X'. Right-click 'AdminServer' and select 'Logs - Log Configuration'. Here you have the option to set the logging level. Set it to 'Trace:32'.

Oracle WebLogic Server Logging

Part 1: Enable Logging Level

  1. To adjust Oracle WebLogic Server logging level, access the Enterprise Manager console at http://server.domain:wls_admin_port/em and log in as the WLS admin user for Oracle E-Business Suite, usually weblogic.

  2. Expand 'Environment - Servers'.

  3. Select the servers you wish to enable debug for. Typically, this will be the oacore servers.

    Note: If you have more than one server defined in a cluster, you will need to enable debug for each server individually. Only enable logging for managed servers that are experiencing issues.

  4. Choose the 'Logging' tab, select the 'Advanced' link, and change severity level to 'Trace'.

  5. Change Severity levels for standard out and domain log broadcaster to 'Debug'.

  6. On this same configuration page, you will see the setting 'Limit number of retained files'. You may need to increase this value, as extra logging might otherwise result in log files being overwritten because of increaseed log file rotation.

Part 2: Enable Debug Areas

Continuing from Part 1 above:

  1. Select the 'Debug' tab and expand the 'WebLogic' section.

  2. Select the Servlet group for which you wish to enable debug:

    Component When to Enable Debug
    Servlet You are experiencing general issues.
    JDBC You are experiencing JDBC connection problems.
    Classloader You are experiencing issues relating to classloading, such as missing classes on startup of services.
  3. Choose 'Enable' to activate debug for these components.

Restart Application Tier Services and Clear Log Files

You are now ready to restart application tier services using the scripts located in $ADMIN_SCRIPTS_HOME.

At this stage, it is desirable to clear the existing log files. Using a new set of log files will enable the problem to be more easily pinpointed. This is especially true of production systems where logs can be large and consequently hard to debug.

Log files should be cleared while the application tier services are down. You can do this manually, or use the following script.

Script For Automatically Clearing Contents of Log Files

Source the environment, ensure the application tier services are shut down (as noted above), then run the following script as the applmgr user:

for files in $IAS_ORACLE_HOME/instances/*/diagnostics/logs/OPMN/opmn $EBS_DOMAIN_HOME/sysman/log
do
for file in `ls $files/*`
do
echo "Clearing file: " $file
cat /dev/null > $file
done
done
for files in $IAS_ORACLE_HOME/instances/*/diagnostics/logs/OHS/EBS_web_component $EBS_DOMAIN_HOME/servers/*/logs $IAS_ORACLE_HOME/../wlserver_10.3/common/nodemanager
do
for file in `ls $files/*log* $files/*out*| grep -v lck`
do
echo "Clearing file: " $file
cat /dev/null > $file
done
done

Tip: To identify the log files without making any changes, comment out the line cat /dev/null > $file by placing a # character at the beginning. When you are happy with the proposed changes, remove the # and re-run the script.

For additional information on logging definition, rotation, location, and control, refer to My Oracle Support Knowledge Document 1366187.1, Oracle Applications E-Business Suite 12.2 Fusion Middleware Log Files: Locate,View, and Control.

Reproduce Issue and Upload Log Files

You are now ready to reproduce the issue and gather the log files, typically for uploading to your service request.