enable Apache, OC4J and OPMN logging in Oracle Applications R12

How to enable Apache, OC4J and OPMN logging in Oracle Applications R12


Applies to:

Oracle Applications Technology Stack - Version 12.0.1 to 12.1.3 [Release 12.0 to 12.1]
Information in this document applies to any platform.

Goal

This note describes the following:

1. Oracle Applications R12 logging essentials.
2. Log files types.
3. Log files locations.
4. Steps to enable Apache logging.
5. Steps to enable OC4J logging.
6. Steps to enable OPMN logging.
7. Components (Services) Status & Logs

Solution

1. Oracle Applications R12 logging essentials:

Oracle Applications / E-Business Suite R12 introduces new easy way in order to enable logging for any of the components that are being used within it. Also it uses new directory structures for Oracle Home(s) either for the Database Tier or the Middle Tier.
Since this note is discussing the logging of middle tier services (Apache, OC4J & OPMN), let us give a spotlight at the following essential directory structures for the above middle tier services and its logging information.
    - Oracle Configuration Home for Apache, OC4J & OPMN
($ORA_CONFIG_HOME/10.1.3)
    - Apache server is still being used and its configuration path is as following:
$ORA_CONFIG_HOME/10.1.3/Apache/Apache/conf
    - OC4J services , by default Oracle Applications R12 creates 3 OC4J instances:
  • OACore: runs OA Framework-based applications
  • Forms: runs Forms-base applications
  • OAFM (Oracle Apps Fusion Middleware): runs web services, mapviewer, ascontrol
Configuration files path for the above 3 OC4J instances is:
$ORA_CONFIG_HOME/10.1.3/j2ee/<oacore, forms, oafm>/config
Configuration file used to adjust log file path for the above 3 OC4J instances is:
$ORA_CONFIG_HOME/10.1.3/j2ee/<oacore, forms, oafm>/application-deployments/<oacore, forms, oafm>/orion-application.xml

2. Log files types:

Oracle Applications / E-Business Suite R12 can be configured to generate one of two types of logs files as following:
    a- Plain text (default):
         - No log rotation available
         - Log files need to be manually removed
    b- Oracle Diagnostics Logging (ODL) XML:
         - Logs rotation based on filesize, directory size
    c- R12 logs by default are configured to generate plain text

3. Log files locations:

 All log files are written in one home ( $LOG_HOME ) which is by default the (logs) directory under ( $INST_TOP ).
Please note that after enbaling the logging for any of the following services you have to bounce the services in order the changes to take effect.

4. Steps to enable Apache logging:

     4.1. Apache Plain Text Logs

             a- By default the Apache log level is set to (warn) in
$ORA_CONFIG_HOME/10.1.3/Apache/Apache/conf/httpd.conf
LogLevel warn
Also you can update context variable (s_apache_loglevel) in the context file ($INST_TOP/appl/admin/<SID_HOSTNAME.xml>) to set Apache log level and then run autoconfig.
             b- You can select the desired LogLevel according to the following table:
Log LevelDescription
emerg Emergencies, system is not useable
alert Action must be taken
crit Critical conditions
error Error conditions
warn Warning conditions
notice Normal but significant condition
info Information
debug Debug level messages
             c- To enable debug set ( LogLevel  debug ) in (httpd.conf) file

             d- Apache log files will be generated in the following path:
$LOG_HOME/ora/10.1.3/Apache
 
             e- There are 2 distinct types of log files are created:
                  - Access Log (CustomLog)

                    Filename format should be like: access_log.<unique id>

                  - Error Log (ErrorLog) this includes ECID information
                     Filename format should be like: error_log.<unique id>

      4.2. Apache ODL Logs

Important Note: Please make sure that you have a directory called "oracle" under $LOG_HOME/ora/10.1.3/Apache/ before enabling the logging and if not please create it first.

             a- To enable ODL logs you should set the following parameters in (httpd.conf) file       
OraLogMode <value>
OraLogSeverity <message type>:<message level>
             b- Set (OraLogMode) to (oracle), there are 3 options as per following table:
ValueDescription
oracle Multi-line log records in XML format, provides the most information
odl Standard apache log format and ECID info.
Default setting in R12
apache Standard apache log format
             c- Set (OraLogSeverity) according to the desired log level using following syntax:
OraLogSeverity <message type>:<message level>
Message type: INTERNAL_ERROR, ERROR, WARNING, NOTIFICATION & TRACE
Message level: 1-32 (1 most severe, 32 least)
             d- Following table shows (Oracle Message Type) that can be used to set log level:
Apache Log LevelOracle Message type
emerg INTERNAL_ERROR:16
alert INTERNAL_ERROR:32
crit ERROR:16
error ERROR:32
warn WARNING:32
notice NOTIFICATION:16
info NOTIFICATION:32
debug TRACE:32

  
             e- Apache ODL log files will be generated in the following path:
$LOG_HOME/ora/10.1.3/Apache/oracle

5. Steps to enable OC4J logging:

     a- Each OC4J instance has a separate logging configuration file:
$ORA_CONFIG_HOME/10.1.3/j2ee/<oacore, forms, oafm>/config/j2ee-logging.xml
      b- By default the log level is set to something like:
<logger name='oracle' level='NOTIFICATION:1'...
     c- You can set level to the desired value as using following syntax:
<message type>:<message level>
Message type: INTERNAL_ERROR, ERROR, WARNING, NOTIFICATION & TRACE
Message level: 1-32 (1 most severe, 32 least)
     d- Each OC4J instance has file:
$ORA_CONFIG_HOME/10.1.3/j2ee/<oacore, forms, oafm>/application-deployments/<oacore,forms,oafm>/orion-application.xml
         Which contains tag like: <log> <file path=...> </log> to specify the log file name.
      e- Each OC4J has its own log file in the following path:
          - Plain Text Log:
$LOG_HOME/ora/10.1.3/j2ee/<oacore, forms, oafm>/<oacore,forms,oafm>_<default_group_1>/application.log
          - ODL Log:
$LOG_HOME/ora/10.1.3/j2ee/<oacore, forms, oafm>/<oacore,forms,oafm>_<default_group_1>/log.xml

6. Steps to enable OPMN logging:

     a- OPMN log are generated in ( $LOG_HOME/ora/10.1.3/opmn).
     b- There are 3 log files generated:
          - (opmn.log): contains commands, exit status
          - (opmn.dbg): contains debug log messages
          - (opmn.out): contains stdout & stderr messages
               - Stdout messages are any messages written by application by System.out.println
               - Sterr messages are error messages recorded when opmn tries to start the services
     b- The above log files are plain text files.
     c- Rotation is enabled for the above log files based on file size only defined in:    
$ORA_CONFIG_HOME/10.1.3/opmn/conf/opmn.xml

through parameters: ( s_opmn_log_rotation_size, s_opmn_log_rotation_time )
     d- Logging is enabled per component (internal, ons or pm)
     e- Levels that can be set are (component codes) as following:
none, fatal, error, warn, notify          (written to .log)
debug1, debug2, debug3, debug4    (written to .dbg)
     f- As an example, Set level for a running opmn as one of the following:
opmnctl set target=log comp=warn     
opmnctl set target=debug comp=debug1

7. Components (Services) Status & Logs:

     a- You can check the status of the services/components by passing 'status' parameter to any AD script
          in $ADMIN_SCRIPTS_HOME.
[oracle@mzlinux04 scripts]$ adapcctl.sh status

You are running adapcctl.sh version 120.6

Checking status of OPMN managed Oracle HTTP Server (OHS) instance ...

Processes in Instance: VIS_mzlinux04.mzlinux04.uk.oracle.com
-------------------+--------------------+---------+---------
ias-component | process-type | pid | status
-------------------+--------------------+---------+---------
OC4J | oafm | 12983 | Alive
OC4J | forms | 12895 | Alive
OC4J | oacore | 11479 | Alive
HTTP_Server | HTTP_Server | 12742 | Alive
ASG | ASG | N/A | Down

adapcctl.sh: exiting with status 0
     b- The various logs written while starting and stopping the services are created in
          ($LOG_HOME/appl/admin/log/), the logs files are:
ServiceLog file name
TNS Listener Start/Stop log adalnctl.txt
Fulfillment Server Start/Stop log jtffmctl.txt
Oracle HTTP Server start/stop log adapcctl.txt
Concurrent Managers and ICM start/stop log adcmctl.txt
Forms OC4J start/stop log adformsctl.txt
OACore OC4J start/stop log adoacorectl.txt
OAFM OC4J start/stop log adoafmctl.txt
OPMN start/stop log adopmnctl.txt
(adstpall.log) and (adstrtal.log) will record the messages while starting or stopping all services.
 

No comments:

ORA-00059: Maximum Number Of DB_FILES Exceeded in 19C database

When I am adding datafile to my 19C database facing the below error. SQL> alter tablespace DATA  add datafile '/u01/data/data15.dbf&#...