Today I got a mail from customer stating that oracle start /stops scripts are not working during system reboots.
Lets see how to trouble shoot it :-
In HP-UX system start up logs are stored in /etc/rc.log. Let's see there
Starting the Oracle Listener ...................................................................................................... N/A
Starting Oracle Database .......................................................................................................... N/A
Its saying that oracle listener and database not available ?
lets see whether oracle and listener scripts available in /sbin/rc3.d
#cd /sbin/rc3.d
#ls | grep -i oracle
S930oracle_listener S940oracle
Yes its there . Then what will be the problem
let me see the console log
Output from "/sbin/rc3.d/S930oracle_listener start":
----------------------------
"/sbin/rc3.d/S930oracle_listener start" SKIPPED
Output from "/sbin/rc3.d/S940oracle start":
----------------------------
"/sbin/rc3.d/S940oracle start" SKIPPED
Why its showing N/A in rc.log and SKIPPED in console
According to /sbin/init.d/template [template for creating start/stop scripts ]
# Allowed exit values:
# 0 = success; causes "OK" to show up in checklist.
# 1 = failure; causes "FAIL" to show up in checklist.
# 2 = skip; causes "N/A" to show up in the checklist.
# Use this value if execution of this script is overridden
# by the use of a control variable, or if this script is not
# appropriate to execute for some other reason.
# 3 = reboot; causes the system to be rebooted after execution.
# 4 = background; causes "BG" to show up in the checklist.
# Use this value if this script starts a process in background mode.
I see its skipping the oracle and listener start up. Might be some wrong configuration in start up scripts.
lrwxr-xr-x 1 root sys 28 Jan 23 13:09 S930oracle_listener -> /sbin/init.d/oracle_listener
lrwxr-xr-x 1 root sys 25 Jan 23 13:09 S940oracle -> /sbin/init.d/oracle
And this is where the start up commands comes.
# Check to see if this script is allowed to run...
if [ "$CONTROL_VARIABLE" != 1 ]; then
rval=2
else
# Execute the commands to start your subsystem
:
fi
;;
What is this CONTROL_VARIABLE, I am not able to find it defined in the start up scripts.
Its coming from below location
# cat /etc/rc.config.d/oracle_listener
# Enable system starting the Oracle Listener
ORACLE_LISTENER=1
configuration files in /etc/rc.config.d/ used to control start up behavior of deamons in HP-UX
So the customer created the start up script with CONTROL_VARIABLE instead of ORACLE_LISTENER
So I have changed CONTROL_VARIABLE to ORACLE_LISTENER and tried to manually start listener.
#/sbin/rc3.d/S930oracle_listener start
Voila its running now !!!
Made same changes in oracle start up script and started it manully.Then I rebooted the server and verified the shutdown of database,listener and start up . All working fine now...
Lets see how to trouble shoot it :-
In HP-UX system start up logs are stored in /etc/rc.log. Let's see there
Starting the Oracle Listener ...................................................................................................... N/A
Starting Oracle Database .......................................................................................................... N/A
Its saying that oracle listener and database not available ?
lets see whether oracle and listener scripts available in /sbin/rc3.d
#cd /sbin/rc3.d
#ls | grep -i oracle
S930oracle_listener S940oracle
Yes its there . Then what will be the problem
let me see the console log
Output from "/sbin/rc3.d/S930oracle_listener start":
----------------------------
"/sbin/rc3.d/S930oracle_listener start" SKIPPED
Output from "/sbin/rc3.d/S940oracle start":
----------------------------
"/sbin/rc3.d/S940oracle start" SKIPPED
Why its showing N/A in rc.log and SKIPPED in console
According to /sbin/init.d/template [template for creating start/stop scripts ]
# Allowed exit values:
# 0 = success; causes "OK" to show up in checklist.
# 1 = failure; causes "FAIL" to show up in checklist.
# 2 = skip; causes "N/A" to show up in the checklist.
# Use this value if execution of this script is overridden
# by the use of a control variable, or if this script is not
# appropriate to execute for some other reason.
# 3 = reboot; causes the system to be rebooted after execution.
# 4 = background; causes "BG" to show up in the checklist.
# Use this value if this script starts a process in background mode.
I see its skipping the oracle and listener start up. Might be some wrong configuration in start up scripts.
lrwxr-xr-x 1 root sys 28 Jan 23 13:09 S930oracle_listener -> /sbin/init.d/oracle_listener
lrwxr-xr-x 1 root sys 25 Jan 23 13:09 S940oracle -> /sbin/init.d/oracle
And this is where the start up commands comes.
# Check to see if this script is allowed to run...
if [ "$CONTROL_VARIABLE" != 1 ]; then
rval=2
else
# Execute the commands to start your subsystem
:
fi
;;
What is this CONTROL_VARIABLE, I am not able to find it defined in the start up scripts.
Its coming from below location
# cat /etc/rc.config.d/oracle_listener
# Enable system starting the Oracle Listener
ORACLE_LISTENER=1
configuration files in /etc/rc.config.d/ used to control start up behavior of deamons in HP-UX
So the customer created the start up script with CONTROL_VARIABLE instead of ORACLE_LISTENER
So I have changed CONTROL_VARIABLE to ORACLE_LISTENER and tried to manually start listener.
#/sbin/rc3.d/S930oracle_listener start
Voila its running now !!!
Made same changes in oracle start up script and started it manully.Then I rebooted the server and verified the shutdown of database,listener and start up . All working fine now...
No comments:
Post a Comment