Tuesday, March 1, 2016

R12 Service Management - OPMN

R12 Service Management - OPMN

How Mid-Tier services are managed in R12??

R12 uses 10.1.3 fusion middle-ware AS stack, hence services in R12 is managed by OPMN(Oracle Process Manager and Notification Server). OPMN consists of two main components (Oracle Process Manager) and (Oracle Notification Server).

Oracle Process Manager is responsible for

1) starting
2) stopping
3) restarting
4) monitoring the services it manages (this includes death detection and automatic restart of the process)

Oracle Notification Server is the transport mechanism for failure, recovery, startup, and other related notifications between components in AS.

Single configuration file(opmn.xml) is used OPMN to manage the services. Config file location is given as $ORA_CONFIG_HOME/10.1.3/opmn/conf/opmn.xml

Services managed by opmn are (grep process-type opmn.xml)

1) HTTP_Server
2) oacore
3) forms
4) oafm

There are many benefits because of OPMN. To give an example:

Consider the scenario where one of your OC4J process has died. OPMN detects the death of the process which it manages and brings up in almost no time.

to elucidate this here is an example

-bash-2.05b$ ./adopmnctl.sh status

You are running adopmnctl.sh version 120.4

Checking status of OPMN managed processes...

Processes in Instance: r12test_ap6155rt.ap6155rt.us.oracle.com
-------------------+--------------------+---------+---------
ias-component | process-type | pid | status
-------------------+--------------------+---------+---------
OC4J | oafm | 30031 | Alive
OC4J | forms | 29934 | Alive
OC4J | oacore | 10444 | Alive
HTTP_Server| HTTP_Server| 29795 | Alive
ASG | ASG | N/A | Down


adopmnctl.sh: exiting with status 0

adopmnctl.sh: check the logfile /slot01/appmgr/R12/inst/apps/r12test_ap6155rt/logs/appl/admin/log/adopmnctl.txt for more information ...

-bash-2.05b$

All the OPMN managed processes are alive. Lets see, how opmn reacts to the death of the oacore OC4J process. I have killed the process with PID - 10444

-bash-2.05b$ kill -9 10444
-bash-2.05b$ ./adopmnctl.sh status

You are running adopmnctl.sh version 120.4

Checking status of OPMN managed processes...

Processes in Instance: r12test_ap6155rt.ap6155rt.us.oracle.com
-------------------+--------------------+---------+---------
ias-component | process-type | pid | status
-------------------+--------------------+---------+---------
OC4J | oafm | 30031 | Alive
OC4J | forms | 29934 | Alive
OC4J | oacore | 18813 | Init
HTTP_Server| HTTP_Server| 29795 | Alive
ASG | ASG | N/A | Down


adopmnctl.sh: exiting with status 0

adopmnctl.sh: check the logfile /slot01/appmgr/R12/inst/apps/r12test_ap6155rt/logs/appl/admin/log/adopmnctl.txt for more information ...

-bash-2.05b$

-bash-2.05b$ ./adopmnctl.sh status

You are running adopmnctl.sh version 120.4

Checking status of OPMN managed processes...

Processes in Instance: r12test_ap6155rt.ap6155rt.us.oracle.com
-------------------+--------------------+---------+---------
ias-component | process-type | pid | status
-------------------+--------------------+---------+---------
OC4J | oafm | 30031 | Alive
OC4J | forms | 29934 | Alive
OC4J | oacore | 18813 | Alive
HTTP_Server| HTTP_Server| 29795 | Alive
ASG | ASG | N/A | Down


adopmnctl.sh: exiting with status 0

adopmnctl.sh: check the logfile /slot01/appmgr/R12/inst/apps/r12test_ap6155rt/logs/appl/admin/log/adopmnctl.txt for more information ...

-bash-2.05b$

Within no time, OPMN detects the death and restarts the process it manages.(one or two seconds users will face the failures due to the process unavailability to serve the requests)

$LOG_HOME/ora/10.1.3/opmn/opmn.log is appened with the information ( it dumps the death detection and restart information)

08/01/21 07:09:45 [pm-process] Process Crashed: OC4J~oacore~default_group~1 (1238509304:10444) - Restarting
08/01/21 07:09:45 [pm-process] Starting Process: OC4J~oacore~default_group~1 (1238509305:0)
08/01/21 07:09:56 [pm-process] Process Alive: OC4J~oacore~default_group~1 (1238509305:18813)

This is one of greatest advantage you will get when you have R12, Even if oacore JVM crashes due to out of memory issue, opmn restarts after it detects OC4J has died.

What algorithm OPMN uses to detect the death?

1) OS process is checked by OPMN for every 2 seconds.
2) forward ping: periodically OPMN pings the process for every 20 seconds and expects response
3) reverse ping: every 20 seconds managed process sends OPMN a ping notification

No comments:

Post a Comment