Thursday 14 April 2016

Solving the error - ohasd failed to start (While installing GRID infrastructure on OEL 5+


To solve the CRS-4124 & CRS-4000 error which is occurred during installing grid infrastructure on OEL / RHEL 5+. The error follows (cropped some of the code):
 LOCAL ADD MODE  
 Creating OCR keys for user 'oracle', privgrp 'oinstall'..  
 Operation successful.  
 CRS-4664: Node localhost successfully pinned.  
 Adding daemon to inittab  
 CRS-4124: Oracle High Availability Services startup failed.  
 CRS-4000: Command Start failed, or completed with errors.  
 ohasd failed to start: Inappropriate ioctl for device  
 ohasd failed to start: Inappropriate ioctl for device at /u01/app/oracle/product/11.2.0/grid/crs/install/roothas.pl line 296.


  • Login as oracle user and open the file $ORACLE_HOME/crs/install/s_crsconfig_lib.pm and add the following lines before the # Start OHASD. HINT- to go directly ro that line, after opening that file without pressing INSERT or I just type :1013 to go to that line.
  •  [oracle@localhost grid]$ cd /u01/app/oracle/product/11.2.0/grid/crs/install/  
     [oracle@localhost grid]$ vi s_crsconfig_lib.pm  
     . . . . . .  
     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  
     . . . . . . .  
    
  • Now login as root user and create a file /etc/init/oracle-ohasd.conf with following statements in this file.
  •  [root@localhost install]# vi /etc/init/oracle-ohasd.conf  
     [root@localhost install]# cat /etc/init/oracle-ohasd.conf  
     # Oracle OHASD Startup  
     start on runlevel [35]  
     stop on runlevel [!35]  
     respawn  
     exec /etc/init.d/init.ohasd run >/dev/null 2>&1 </dev/null  
    
  • Now to de-configure the failed configuration of Oracle Restart Server for stand-alone server.
  •  [root@localhost install]# cd $GRID_HOME/crs/install  
     [root@localhost install]# ./roothas.pl –deconfig –force –verbose  
    
  • Now run the root.sh again and now it should run without any error.
NoteIf still root.sh is throwing same error then you might have done something wrong in the above steps just recheck everything. PLEASE DON'T COPY & PASTE ANY CODE

1 comment :