Wednesday, June 15, 2011

Restarting the Application Server After a Crash - OID Failure


Dear All,


While working with oracle application server many of the people come accross the sevirity 1 issues for OID crash issues.

I also face the same many times, so today we will discuss about possible solutions for OID crash issue.

The Oracle Application Server 10g is a group of interdependent components.  Many times the application server will not restart after a crash or improper shutdown. The culprit is almost always the Oracle Internet Directory or OID.

If you get the error "1 of 4 Components Started" when running opmnctl startall, the problem is that OID is not being started.  The only infrastructure component not dependent on OID is the Oracle HTTP Server or  OHS.  No matter how many times you reboot the server, the application server will not start correctly without OID.

This problem happens in  9iAS and AS 10g

OID is started, stopped and monitored by a process called oidmon.  Oidmon will periodically check a database table called ods.ods_process to determine if an OID process needs to be started, stopped or restarted. It is the row in the ods_process table that usually causes the problem.  If the application server
crashed or was improperly shutdown, oidmon may not have been able to update the ods_process table.  When the application server restarts, oidmon will find the row in the table identifying a running OID process and so will not start OID. The fix is to remove the row in the ods_process tables.

There are two possible fixes.

First shutdown the application server, but not the metadata repository database.

On windows make sure that all the services set to automatic are started.  

On UNIX/Linux ensure the oidmon is running.

# ps -ef |grep oid

oracle 3331 3318 0 Mar30 ? 00:00:02     /oracle/orainfra/bin/oidmon

If OID is running you will get two other process called oidldap.  If you have all three processes, then starting OID is not your issue so this solution will not solve you problem.

oidmon must be running to start OID.  If oidmon is not running, start it with the command below:

ORACLE_HOME=C:\oracle\orainfra

$ORACLE_HOME/bin/oidmon start

On windows oidmon is a service, insure the Oracle<Infra>InternetDirectory_iasdb services is started.

Solution 1.  Using Windows -UNIX/Linux

Set the environment:

For windows Environment :

c:\> set ORACLE_HOME=c:\oracle\orainfra
c:\> set ORACLE_SID=iasdb

For Unix Environment :

Login with oracle user :

export ORACLE_HOME=/oracle/orainfra

export ORACLE_SID=iasdb

Log onto the database :

c:\> SQLPLUS "/ as sysdba"

SQL> select * from ods.ods_process;

Should get one line returned. If not go to solution 2.

SQL> deleted from ods.ods_process;
one line deleted

SQL> commit;
commit complete

SQL> exit

Now reboot the server to bring up the appsvr normally.

Solution 2;

If there is no entry in the ods.ods_process table then oidmon was never told to start OID. Here we need to tell oidmon to start OID.

for windows :

c:\oracle\orainfra\bin>oidctl server=oidldapd configset=0 instance=1 start

for Unix platform :

/oracle/orainfra/bin>./oidctl server=oidldapd configset=0 instance=1 start

Now restart the application server instances using opmnctl startall.

Once the Oracle Internet Directory is running, the other components should start normally

I hope it will help you while solving OID crash issues...

Enjoy working with Middleware Technologies...

Regards,
Ajinkya

No comments:

Post a Comment