Our Linux Server rebooted due to some unknown reason...
We encountered an error while bringing up the Infra[Middle Tier] and Discoverer OPMN services.
Error ::
Cause :
On being restarted after a failure, OPMN uses information in the ${ORACLE_HOME}/opmn/logs/states directory to attempt recovery. From the various files in the "states" directory it determines if a process ID (PID) of a processes it was managing before the abnormal exit is still running.
If such a process is found, OPMN will first attempt to reconnect to the process and determine it's condition (with an appropriate OPMN "ping" message).
In the event a managed process cannot be contacted it will attempt to terminate the process (first gracefully and then using "kill -9") and restart it.
In rare cases following a restart, it is possible that by pure chance:
1. a process exists which matches the PID of a previously managaged OPMN process(ie a current PID matches one listed in a file within the $ORACLE_HOME/opmn/logs/states directory).
2. the process running with this PID is NOT an OPMN managed process nor owned by the operating system account that was used to install Application Server and which governs the permissions of the current OPMN process.As a result OPMN cannot communicate meaningfully with the OPMN managed process.
Solution :
1. Fully stop opmn and all oc4j instances.
2. At this point there will be no oc4j managed processes running, so there should be need for no files in $ORACLE_HOME/opmn/logs/states directory, so it should be safe to remove these.
3. For safety, rename the current $ORACLE_HOME/opmn/logs/states directory and create a new empty states directory in it's place:
% cd $ORACLE_HOME/opmn/logs
% mv states states.old
% mkdir states
4. Restart OPMN and the desired OPMN managed processes:
% opmnctl start
% opmnctl startproc process-type=OID
% opmnctl startproc process-type=HTTP_Server
% opmnctl startproc process-type=OC4J_SECURITY
5. Confirm that all processes have started correctly using "opmnctl status -l"
The OC4J process should have a status of "Alive" and it's port section should show valid ports for ajp, rmi and jms.After confirming all processes have started and validating that the functionality of all opmn managed processes, the "states.old" directory can then be removed.
Refer Metalink note-id : 331969.1 [Unable to Start OPMN Managed Process]