Google it ....

Showing posts with label High Availabilty. Show all posts
Showing posts with label High Availabilty. Show all posts

Monday, May 15, 2017

CRS-4124: Oracle High Availability Services startup failed - ohasd failed to start: Inappropriate ioctl for device on Linux 6

During Automatic storage Management (ASM) installation occurred error
CRS-4124: Oracle High Availability Services startup failed 
ohasd failed to start: Inappropriate ioctl for device
Environment : 
OS : CentOS release 6.7
Grid : Oracle Grid Infrastructure 11g Release 2 (11.2.0.1.0) for Linux x86
This happened because in Linux 6 is not supported Oracle 11g Release 2 (11.2.0.1.0) 
Solution :  Here I''ll show you how to solve this problem.
1) open $GRID_HOME/crs/install/s_crsconfig_lib.pm file
2)Add the following lines before the # Start OHASD
my $UPSTART_OHASD_SERVICE = "oracle-ohasd";
my $INITCTL = "/sbin/initctl";

($status, @output) = system_cmd_capture ("$INITCTL start $UPSTART_OHASD_SERVICE");
if (0 != $status)
{
error ("Failed to start $UPSTART_OHASD_SERVICE, error: $!");
return $FAILED;
}
# Start OHASD
vi s_crsconfig_lib.pm
/Start OHASD  --- for search string in vi
3) create file with /etc/init/oracle-ohasd.conf file with below entries
# Oracle OHASD start
start on runlevel [35]
stop on runlevel [!35]
respawn
exec /etc/init.d/init.ohasd run >/dev/null 2>&1
4) De configuration of Oracle Restart stack with root user : 
[root@testdb install]# cd $GRID_HOME/crs/install/
[root@testdb install]# ./roothas.pl -deconfig -force -verbose
Checking for super user privileges
User has super user privileges
Parsing the host name
Using configuration parameter file: ./crsconfig_params
CRS-4535: Cannot communicate with Cluster Ready Services
CRS-4000: Command Stop failed, or completed with errors.
CRS-4535: Cannot communicate with Cluster Ready Services
CRS-4000: Command Delete failed, or completed with errors.
CRS-2791: Starting shutdown of Oracle High Availability Services-managed 
resources on 'testdb'
CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'testdb'
CRS-2673: Attempting to stop 'ora.evmd' on 'testdb'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'testdb'
CRS-2673: Attempting to stop 'ora.gpnpd' on 'testdb'
CRS-2677: Stop of 'ora.cssdmonitor' on 'testdb' succeeded
CRS-2677: Stop of 'ora.evmd' on 'testdb' succeeded
CRS-2677: Stop of 'ora.gpnpd' on 'testdb' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'testdb'
CRS-2677: Stop of 'ora.mdnsd' on 'testdb' succeeded
CRS-2677: Stop of 'ora.gipcd' on 'testdb' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources 
on 'testdb' has completed
CRS-4133: Oracle High Availability Services has been stopped.
Successfully deconfigured Oracle Restart stack
5) run again root.sh script with root user and make overwrite "Y"

[root@testdb ~]# cd $GRID_HOME/
[root@testdb 11.2.0]# ./root.sh
................
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying dbhome to /usr/local/bin ...
The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
...............

That's all OHASD service started and working.

Wednesday, March 5, 2014

CRS-0184: Cannot communicate with the CRS daemon CRS-4639: Could not contact Oracle High Availability Services

After restarted server and I was starting ASM instance appear error :
CRS-0184: Cannot communicate with the CRS daemon 
CRS-4639: Could notcontact Oracle High Availability Services
I will show you how to solve this, there may be many reasons I'll write here which is very often.
First of all check services and if they aren't started try to start:
crs_stat -t
CRS-4639: Could not contact Oracle High Availability Services

CRS-4000: Command Status failed, or completed with errors.

crsctl start resource ora.cssd
 

If there still error then try loging with root user and remove all files under /tmp/.oracle or /var/tmp/.oracle, because sometimes when CRS server reboot it try to create sockets under /tmp/.oracle or /var/tmp/.oracle and there are already previous socket files...which are protecting to create new sockets. restart CRS on faulty node or even reboot that machine!.

if it is not enough then check $ORACLE_HOME/bin/oracle executable file permissions it must have:
[oracle@oel5 ~]$ ls -lrt $ORACLE_HOME/bin/oracle
-rwsr-s--x 1 oracle dba 210824714 May 21  2012 /u0/app/oracle/product/11.2.0/dbhome_1/bin/oracle

If it is not same permission as shown above change it with:
chmod 6751 $ORACLE_HOME/bin/oracle


If there is still errors try
crsctl enable has
crsctl start has


If the errors still try with root
[root@oel5 ~]# /etc/init.d/syslog start
[root@oel5 ~]# /etc/init.d/ohasd start


I think it will be helpful for you,
thank you.