11gR2; Troubleshooting OHAS error – autorun file for ohasd is missing
Introduction:
The present document provides a list of steps to solve OHAS error – autorun file for ohasd is missing.
Environment:
The database server version is 11.2.0.3.4 running on Oracle Enterprise Linux 6. The Oracle clusterware version is 11.2.0.3.4 with Patch Set Update 4 applied.
Problem:
The cluster resources cannot start automatically after a server reboot.
crsctl start res -all gives CRS-4000: Command Get failed, or completed with errors
/var/log/messages file shows the followings messages:
- Oct 26 18:27:52 srv300db1 logger: autorun file for ohasd is missing
- Oct 26 18:28:02 srv300db1 logger: autorun file for ohasd is missing
- Oct 26 18:28:12 srv300db1 logger: autorun file for ohasd is missing
- Oct 26 18:28:22 srv300db1 logger: autorun file for ohasd is missing
- Oct 26 18:28:32 srv300db1 logger: autorun file for ohasd is missing
- Oct 26 18:28:42 srv300db1 logger: autorun file for ohasd is missing
- Oct 26 18:28:52 srv300db1 logger: autorun file for ohasd is missing
- Oct 26 18:29:02 srv300db1 logger: autorun file for ohasd is missing
- Oct 26 18:29:12 srv300db1 logger: autorun file for ohasd is missing
- Oct 26 18:29:22 srv300db1 logger: autorun file for ohasd is missing
- Oct 26 18:29:32 srv300db1 logger: autorun file for ohasd is missing
- Oct 26 18:29:42 srv300db1 logger: autorun file for ohasd is missing
- Oct 26 18:29:52 srv300db1 logger: autorun file for ohasd is missing
- Oct 26 18:30:02 srv300db1 logger: autorun file for ohasd is missing
- Oct 26 18:30:12 srv300db1 logger: autorun file for ohasd is missing
- Oct 26 18:30:22 srv300db1 logger: autorun file for ohasd is missing
- Oct 26 18:30:32 srv300db1 logger: autorun file for ohasd is missing
- Oct 26 18:30:42 srv300db1 logger: autorun file for ohasd is missing
Solution
Follow the steps below to fix the issue;
- -bash-4.1# id
- uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)
- --- Deconfigure Oraclem Restart , OHA stack
- -bash-4.1# /opt/11.2.0/grid/crs/install/roothas.pl -verbose -deconfig -f
- Using configuration parameter file: /opt/11.2.0/grid/crs/install/crsconfig_params
- CRS-4639: Could not contact Oracle High Availability Services
- CRS-4000: Command Stop failed, or completed with errors.
- CRS-4639: Could not contact Oracle High Availability Services
- CRS-4000: Command Delete failed, or completed with errors.
- CRS-4544: Unable to connect to OHAS
- CRS-4000: Command Stop failed, or completed with errors.
- Successfully deconfigured Oracle Restart stack
- --- Configure the OHA stack
- -bash-4.1# /opt/11.2.0/grid/crs/install/roothas.pl -verbose
- Using configuration parameter file: /opt/11.2.0/grid/crs/install/crsconfig_params
- LOCAL ADD MODE
- Creating OCR keys for user 'grid', privgrp 'oinstall'..
- Operation successful.
- LOCAL ONLY MODE
- Successfully accumulated necessary OCR keys.
- Creating OCR keys for user 'root', privgrp 'root'..
- Operation successful.
- CRS-4664: Node srv300db1 successfully pinned.
- Adding Clusterware entries to upstart
- srv300db1 2012/10/27 03:31:04 /opt/11.2.0/grid/cdata/srv300db1/backup_20121027_033104.olr
- Successfully configured Oracle Grid Infrastructure for a Standalone Server
- -bash-4.1#
- -bash-4.1# su - grid
- -bash-4.1$ crsctl check css
- CRS-4530: Communications failure contacting Cluster Synchronization Services daemon
- -bash-4.1$ crsctl status res -t
- --------------------------------------------------------------------------------
- NAME TARGET STATE SERVER STATE_DETAILS
- --------------------------------------------------------------------------------
- Local Resources
- --------------------------------------------------------------------------------
- ora.ons
- OFFLINE OFFLINE srv300db1
- --------------------------------------------------------------------------------
- Cluster Resources
- --------------------------------------------------------------------------------
- ora.cssd
- 1 OFFLINE OFFLINE
- ora.diskmon
- 1 OFFLINE OFFLINE
- ora.evmd
- 1 ONLINE ONLINE srv300db1
— add ASM resource
- -bash-4.1$ srvctl status asm
- PRCR-1001 : Resource ora.asm does not exist
- -bash-4.1$ srvctl add asm
- -bash-4.1$ srvctl status asm
- ASM is not running.
- -bash-4.1$ srvctl start asm
- -bash-4.1$ srvctl status asm
- ASM is running on srv300db1
- -bash-4.1$ crsctl status res -t
- --------------------------------------------------------------------------------
- NAME TARGET STATE SERVER STATE_DETAILS
- --------------------------------------------------------------------------------
- Local Resources
- --------------------------------------------------------------------------------
- ora.asm
- ONLINE ONLINE srv300db1 Started
- ora.ons
- OFFLINE OFFLINE srv300db1
- --------------------------------------------------------------------------------
- Cluster Resources
- --------------------------------------------------------------------------------
- ora.cssd
- 1 ONLINE ONLINE srv300db1
- ora.diskmon
- 1 OFFLINE OFFLINE
- ora.evmd
- 1 ONLINE ONLINE srv300db1
- -bash-4.1$
MOUNT THE DISKGROUPS DATA and FRA using asmca tool. Click on Mount all button to mount all diskgroups.
- -bash-4.1# su - grid
- -bash-4.1$ sqlplus / as sysasm
- SQL*Plus: Release 11.2.0.3.0 Production on Fri Oct 26 18:42:09 2012
- Copyright (c) 1982, 2011, Oracle. All rights reserved.
- Connected to:
- Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
- With the Automatic Storage Management option
- SQL> select NAME from V$ASM_DISKGROUP;
- NAME
- ------------------------------
- FRA
- DATA
- SQL>
— Check diskgroup resources added
- -bash-4.1$ crsctl status res -t
- --------------------------------------------------------------------------------
- NAME TARGET STATE SERVER STATE_DETAILS
- --------------------------------------------------------------------------------
- Local Resources
- --------------------------------------------------------------------------------
- ora.DATA.dg
- ONLINE ONLINE srv300db1
- ora.FRA.dg
- ONLINE ONLINE srv300db1
- ora.asm
- ONLINE ONLINE srv300db1 Started
- ora.ons
- OFFLINE OFFLINE srv300db1
- --------------------------------------------------------------------------------
- Cluster Resources
- --------------------------------------------------------------------------------
- ora.cssd
- 1 ONLINE ONLINE srv300db1
- ora.diskmon
- 1 OFFLINE OFFLINE
- ora.evmd
- 1 ONLINE ONLINE srv300db1
- -bash-4.1$
— add Listener resource
- -bash-4.1$ srvctl start listener
- PRCN-2044 : No listener exists
- -bash-4.1$
- bash-4.1$ srvctl add listener -l LISTENER
- -bash-4.1$ srvctl add listener -l LISTENER_2
- -bash-4.1$ srvctl start listener -l LISTENER
- -bash-4.1$ srvctl start listener -l LISTENER_2
- -bash-4.1$
- -bash-4.1$ crsctl status res -t
- --------------------------------------------------------------------------------
- NAME TARGET STATE SERVER STATE_DETAILS
- --------------------------------------------------------------------------------
- Local Resources
- --------------------------------------------------------------------------------
- ora.DATA.dg
- ONLINE ONLINE srv300db1
- ora.FRA.dg
- ONLINE ONLINE srv300db1
- ora.LISTENER.lsnr
- ONLINE ONLINE srv300db1
- ora.LISTENER_2.lsnr
- ONLINE ONLINE srv300db1
- ora.asm
- ONLINE ONLINE srv300db1 Started
- ora.ons
- OFFLINE OFFLINE srv300db1
- --------------------------------------------------------------------------------
- Cluster Resources
- --------------------------------------------------------------------------------
- ora.cssd
- 1 ONLINE ONLINE srv300db1
- ora.diskmon
- 1 OFFLINE OFFLINE
- ora.evmd
- 1 ONLINE ONLINE srv300db1
- -bash-4.1$
As Oracle user: spfile.ora file can be obtained by looking for spfile string in the alert log file, we should take the value from the last startup command…
- -bash-4.1# su - oracle
- -bash-4.1$ adrci
- ADRCI: Release 11.2.0.3.0 - Production on Fri Oct 26 18:47:42 2012
- Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
- ADR base = "/opt/app/oracle"
- adrci> show alert
- Choose the alert log from the following homes to view:
- 1: diag/tnslsnr/srv300db1/listener
- 2: diag/asm/+asm/+ASM
- 3: diag/rdbms/mytstdb/mytstdb
- Q: to quit
- Please select option: 3
- Output the results to file: /tmp/alert_7214_14033_mytstdb_1.ado
The spfile value in alrt log file shows the following ; spfile = “+DATA/mytstdb/spfilemytstdb.ora”
— add Database Instance resource
- -bash-4.1# su - oracle
- -bash-4.1$ srvctl add database -d mytstdb -o /opt/app/oracle/product/11.2.0/db_1 -p +DATA/mytstdb/spfilemytstdb.ora -s open
- -bash-4.1$ srvctl start database -d mytstdb
— Check Listener
- -bash-4.1$ lsnrctl stat
- LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 26-OCT-2012 18:51:52
- Copyright (c) 1991, 2011, Oracle. All rights reserved.
- Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
- STATUS of the LISTENER
- ------------------------
- Alias LISTENER
- Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production
- Start Date 27-OCT-2012 03:45:56
- Uptime 0 days 0 hr. 5 min. 56 sec
- Trace Level off
- Security ON: Local OS Authentication
- SNMP OFF
- Listener Parameter File /opt/11.2.0/grid/network/admin/listener.ora
- Listener Log File /opt/app/oracle/diag/tnslsnr/srv300db1/listener/alert/log.xml
- Listening Endpoints Summary...
- (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=srv300db1.oracle-class.com)(PORT=1521)))
- Services Summary...
- Service "+ASM" has 1 instance(s).
- Instance "+ASM", status READY, has 1 handler(s) for this service...
- Service "mytstdb.oracle-class.com" has 1 instance(s).
- Instance "mytstdb", status READY, has 1 handler(s) for this service...
- Service "mytstdbXDB.oracle-class.com" has 1 instance(s).
- Instance "mytstdb", status READY, has 1 handler(s) for this service...
- The command completed successfully
- -bash-4.1$
- -bash-4.1# su - grid
- -bash-4.1$ crsctl status res -t
- --------------------------------------------------------------------------------
- NAME TARGET STATE SERVER STATE_DETAILS
- --------------------------------------------------------------------------------
- Local Resources
- --------------------------------------------------------------------------------
- ora.DATA.dg
- ONLINE ONLINE srv300db1
- ora.FRA.dg
- ONLINE ONLINE srv300db1
- ora.LISTENER.lsnr
- ONLINE ONLINE srv300db1
- ora.LISTENER_2.lsnr
- ONLINE ONLINE srv300db1
- ora.asm
- ONLINE ONLINE srv300db1 Started
- ora.ons
- OFFLINE OFFLINE srv300db1
- --------------------------------------------------------------------------------
- Cluster Resources
- --------------------------------------------------------------------------------
- ora.cssd
- 1 ONLINE ONLINE srv300db1
- ora.diskmon
- 1 OFFLINE OFFLINE
- ora.evmd
- 1 ONLINE ONLINE srv300db1
- ora.mytstdb.db
- 1 ONLINE ONLINE srv300db1 Open
- -bash-4.1$
This post helps me a lot! Many thanks
ReplyDelete