Your Doorstep to the Temple of Oracle

Oracle EBS

Oracle Apps – Apache Issues and troubleshooting -1

Posted by appsdba11i on July 15, 2011

File Locations
==============

1) apachectl, startJserv.sh, stopJserv.sh located at “$APACHE_TOP/Apache/bin ”

Note: adapcctl.sh has apachectl.sh embedded in it, and calls from within.please check this

bash-3.00$ pwd
/devtest/applmgr/common/admin/scripts/$CONTEXT_NAME
bash-3.00$
bash-3.00$ grep apachectl adapcctl.sh
# | To use the complete functionality of the apachectl script, source
# | apachectl script directly.
APACHEEXE=/devtest/product/$CONTEXT_NAME/iAS/Apache/Apache/bin/apachectl
# Pass through the arguments to the apachectl script
# Pass through the arguments to the apachectl script

2) httpd.conf, httpd_pls.conf located at $APACHE_TOP/Apache/conf
3) adapcctl.sh logfile located at $COMMON_TOP/admin/log/adapcctl.txt

–> While adapcctl.sh is running to start apache, you can monitor $COMMON_TOP/admin/log/adapcctl.txt to check the progress.

Monitoring the log:
===================

tail -f $COMMON_TOP/admin/log/adapcctl.txt

ISSUE : Apache listener not running
===================================================================

There might be several reasons for this to happen.Few reasons which I had encountered in real time are as below:

a) Check and verify PIDfile and lockfile details in httpd.conf.

[

* Note 1: The LockFile directive sets the path to the lockfile used when Apache is compiled with either USE_FCNTL_SERIALIZED_ACCEPT or USE_FLOCK_SERIALIZED_ACCEPT. This directive should normally be left at its default value. The main reason for changing it is if the logs directory is NFS mounted, since the lockfile must be stored on a local disk.

* Note 2: The PidFile directive sets the file to which the server records the process id of the daemon.It is often useful to be able to send the server a signal, so that it closes and then reopens its ErrorLog and TransferLog, and re-reads its configuration files.

]

Troubleshooting:
—————-

Below are few issues I’ve encountered in real time.

CAUSE 1
========

Both locations(PIDfile and LOCKfile) should be valid in the respective configurations files, and the user from which you are starting apache should have proper permissions on the directories where respective log files are being written.

for example:

The log files pertailing to httpd.pid would be directed to a location…say …/var/opt/$CONTEXT_NAME/Apache/logs

-rw-r–r– 1 iatest iatest 6 Jan 14 03:20 /var/opt/$CONTEXT_NAME/Apache/logs/httpd.pid

and when I was monitoring $COMMON_TOP/admin/log/adapcctl.txt, I found the following error:

***********************************************************************************
01/14/11-03:50:29 :: Apache Web Server Listener is not running.

01/14/11-03:50:29 :: Starting Apache Web Server Listener (dedicated HTTP) …

cat: /var/opt/$CONTEXT_NAME/Apache/logs/httpd.pid: Permission denied
************************************************************************************

I changed the permissions as follows

bash-3.00$ cd /var/opt/$CONTEXT_NAME/Apache/logs
bash-3.00$ chmod 777 httpd.pid

bash-3.00$ id
uid=60002(iatest) gid=60002(iatest) groups=50000(orocc),60002(iatest)

-rwxrwxrwx 1 iatest iatest 6 Jan 14 03:20 /var/opt/$CONTEXT_NAME/Apache/logs/httpd.pid

–> and now issue resolved.

CAUSE 2
========

Sometimes when your instance is refreshed from prod to test or dev:

If the refresh is not done properly, the PIDfile and Lockfile directives in apache configuration files would still point to prod for a dev or test instance.In such cases,performing the following:

> cd $APACHE_TOP/Apache/conf
> cp httpd.conf httpd.conf_bkp

–> edit all prod pointers to dev or test instance as required.

For example, if dev instance name is “DEVTEST” and location details in httpd.conf files are as

LockFile /var/opt/PRODTEST_auohprod02/Apache/logs/httpd.lock

change it as below

LockFile /var/opt/DEVTEST_auohprod02/Apache/logs/httpd.lock

> restart apache.

CAUSE 3
========

Note : here I am using “iatest” user for DISCO server, and “aptest” user apps

If you have two servers, with different users like “aptest” and “iatest”.Both have apache running, and you are using a common storage to store files …like say a filer and have common mount points mounted.

if for “iatest” user :

PidFile /var/opt/$CONTEXT_NAME/Apache/logs/httpd.pid

if for “aptest” user:

PidFile /var/opt/$CONTEXT_NAME/Apache/logs/httpd.pid.

Though adapcctl.sh will exit with status 0 , apache web listeners will not start.

so…do the following…

as iatest
edit /test/disco/product/disco_1012/Apache/Apache/conf/httpd.conf

set
Lockfile /var/opt/$CONTEXT_NAME/Apache/logs/httpd_disco.lock

PidFile /var/opt/$CONTEX_NAME/Apache/logs/httpd_disco.pid

stop Apache (disco)

remove /var/opt/$CONTEXT_NAME/Apache/logs/httpd.pid

Start Apache on Disco server as well as apps server

============================================================================================

With Regards,
Sriwidu

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

 
%d bloggers like this: