Wednesday, February 27, 2008

Apache / Jserv Obtaining the Logfiles

Turn on debugging and please upload the zip file as asked in the format
that is explained in Step # 9 below.


--------------------------------------------------------------------------
BEGIN -- Step by Step Instructions for Obtaining the Logfiles --
BEGIN

--------------------------------------------------------------------------

0. Make sure the iAS / Jserv have been shutdown prior to
implementing debugging.


1. Delete the existing logfiles.

( From an Unix shell where the Apps environment has been sourced )

a-1. $ cd $IAS_ORACLE_HOME/Apache/Apache/logs
b-1. $ pwd (verify that you are in the "logs directory")
c-1. $ rm -r *

a-2. $ cd $IAS_ORACLE_HOME/Apache/Jserv/logs/jvm
b-2. $ pwd (verify that you are in the "jvm" directory)
c-2. $ rm -r *

a-3. $ cd $IAS_ORACLE_HOME/Apache/Jserv/logs
b-3. $ pwd (verify that you are in the "logs" directory)
c-3. $ rm *


2. Edit the httpd.conf file to enable debug for apache.

Using your favorite text editor, find the following section in the apache
configuration file and set the LogLevel to debug. You may want to make a
backup of this file before you edit.


Sample Excerpt from .../iAS/Apache/Apache/conf/httpd.conf:
-----------------------------------------------------------------


# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a
# container, error messages relating to that virtual host will be
# logged here. If you *do* define an error logfile for a
# container, that host's errors will be logged there and not here.
#
ErrorLog /space/v1154/visora/iAS/Apache/Apache/logs/error_log

#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error,crit,
# alert, emerg.
#
*** LogLevel debug

......


# Logging:
# The home of the dedicated SSL protocol logfile. Errors are
# additionally duplicated in the general error log file. Put
# this somewhere where it cannot be used for symlink attacks on
# a real server (i.e. somewhere where only root can write).
# Log levels are (ascending order: higher ones include lower ones):
# none, error, warn, info, trace, debug.
SSLLog /space/v1154/visora/iAS/Apache/Apache/logs/ssl_engine_log
*** SSLLogLevel trace



3. Edit the .../iAS/Apache/Jserv/etc/jserv.conf to enable debug for the jserv
module.

Again using your favorite text editor, find the following section
in jserv.conf and set the LogLevel to debug. Windows users be advised that
you also have a .../iAS/Apache/Jserv/conf/jserv.conf that should be ignored
in favor of the jserv.conf in the .../etc directory. You may want to make
a backup of this file before you edit.


Sample Excerpt from jserv.conf:
-----------------------------------------------------------------


# Note: when set to "DISABLED", the log will be redirected to Apache
# error log
*** ApJServLogFile /space/v1154/visora/iAS/Apache/Jserv/logs/mod_jserv.log

# Log Level for this module
# Syntax: ApJServLogLevel
# [debug|info|notice|warn|error|crit|alert|emerg]
# Default: info (unless compiled w/ JSERV_DEBUG, in which case it's
# debug)
*** ApJServLogLevel debug


4. Edit the .../iAS/Apache/Jserv/etc/jserv.properties to enable debug for the java
portion of the Apache jserv.

Once again using your favorite text editor, find the following section in
jserv.properties and set log=true, log.timestamp=true, and the logging for
the channels to true. You may want to make a backup of this file before
you edit.


Sample Excerpt from jserv.properties:
-----------------------------------------------------------------


# Enable/disable Apache JServ logging.
# WARNING: logging is a very expensive operation in terms of
# performance. You should reduced the generated log to a minumum or
# even disable it if fast execution is an issue. Note that if all log
# channels (see below) are enabled, the log may become really big since
# each servlet request may generate many Kb of log. Some log channels
# are mainly for debugging purposes and should be disabled in a
# production environment.
# Syntax: log=[true,false] (boolean)
# Default: true
*** log=true

# Set the name of the trace/log file. To avoid possible confusion about
# the location of this file, an absolute pathname is recommended.
#
# This log file is different than the log file that is in the
# jserv.conf file. This is the log file for the Java portion of Apache
# JServ.
#
# On Unix, this file must have write permissions by the owner of the JVM
# process. In other words, if you are running Apache JServ in manual mode
# and Apache is running as user nobody, then the file must have its
# permissions set so that that user can write to it.
# Syntax: log.file=[log path and filename] (String)
# Default: NONE
# Note: if the file could not be opened, try using absolute paths.
*** log.file=/space/v1154/visora/iAS/Apache/Jserv/logs/jserv.log

# Enable the timestamp before the log message
# Syntax: log.timestamp=[true,false] (boolean)
# Default: true
*** log.timestamp=true

......

# Enable/disable logging the channel name
# Default: false
*** log.channel=true

# Info channel - quite a lot of informational messages
# hopefully you don't need them under normal circumstances
*** log.channel.info=true

# Servlets exception, i.e. exception caught during
# servlet.service() processing are monitored here
# you probably want to have this one switched on
*** log.channel.servletException=true

# JServ exception, caught internally in jserv
# we suggest to leave it on
*** log.channel.jservException=true

# Warning channel, it catches all the important
# messages that don't cause JServ to stop, leave it on
*** log.channel.warning=true

# Servlet log
# All messages logged by servlets. Probably you want
# this one to be switched on.
*** log.channel.servletLog=true

# Critical errors
# Messages produced by critical events causing jserv to stop
*** log.channel.critical=true

# Debug channel
# Only for internal debugging purposes
*** log.channel.debug=true

# XML Gateway Parameters
*** wrapper.bin.parameters=-DOXTALogDebugMsg=true



5. Edit the .../iAS/Apache/Jserv/etc/zone.properties to enable
debug for framework provider in portal. Search for "OACore Framework"
and add the following line to the end of the section.

servlet.framework.initArgs=debuglevel=2


Sample Excerpt from zone.properties:
-----------------------------------------------------------------


# ----- OACore Framework -----

servlet.framework.code=oracle.apps.fnd.framework.provider.OAFrameworkHttpProvider


servlet.framework.initArgs=dbcFileName=/visappl/fnd/11.5.0/secure/buffett_lvis.dbc
servlet.framework.initArgs=sessiontimeout=1800000
servlet.framework.initArgs=appPath=/OA_HTML
servlet.framework.initArgs=appRealPath=/lviscomn/html
*** servlet.framework.initArgs=debuglevel=2



6. Start the apache server. UNIX users will typically use
"adapcctl.sh start" or "apachectl start" while windows users will simply start the
service from the services applet.

7. Reproduce the problem


8. Immediately shutdown the apache server as in step 1.


9. If you intend to upload these files to Metalink for analysis
by Oracle support it is vitally important that the above list of files
be obtained all at the same time. A disjointed collection of files
spanning several days is of little value, hence the careful detailing of this note!

Gather up all of the following logfiles and configuration files
for analysis put these into the following zip file, which will be placed
under /tmp directory...


zip -r /tmp/`uname -n`_`date +%m%d%y.%H%M`_iAS.zip \
$IAS_ORACLE_HOME/Apache/Apache/conf/* \
$IAS_ORACLE_HOME/Apache/Apache/logs/* \
$IAS_ORACLE_HOME/Apache/Jserv/etc/* \
$IAS_ORACLE_HOME/Apache/Jserv/logs/*



Note:
apache conf directory $IAS_ORACLE_HOME/Apache/Apache/conf
apache log directory $IAS_ORACLE_HOME/Apache/Apache/logs

jserv etc directory $IAS_ORACLE_HOME/Apache/Jserv/etc
jserv log directory $IAS_ORACLE_HOME/Apache/Jserv/logs


10. Remember to turn the more verbose aspects of logging off
before starting Apache again e.g.; set LogLevel to something like "warn",
log.channel.info to false, etc. When running something other than this simple
test (such as a live prod system) the highly verbose logging results in HUGE
logfiles and a corresponding performance drain.

----------------------------------------------------------------------
END -- Step by Step Instructions for Obtaining the Logfiles -- END
----------------------------------------------------------------------

No comments: