[ohasd(61322)]CRS-0715:Oracle High Availability Service has timed out waiting for init.ohasd to be..

在给中标麒麟linux 7.4搭建11g的rac时,遇到的bug是真多......其中最后才解决掉的是:机器重启后,集群不能自动起来的问题。

一开始安装grid软件时,最后执行root.sh脚本就报错。官网相关文档链接如下:

https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=202975000517167&id=1959008.1&_afrWindowMode=0&_adf.ctrl-state=16o129exbd_21

文档中提到了一个补丁包18370031,说是打完这个补丁再执行一遍root.sh,可是我并没有打成功。。。

于是按照网上的方法,在执行root.sh脚本卡住的地方,如图

执行/bin/dd if=/var/tmp/.oracle/npohasd of=/dev/null bs=1024 count=1

后来两个节点的root用户下,都执行了这条命令,且root.sh都运行成功了。但是我发现每次服务器重启后,集群都不能自动起来。

查看警报日志,如下:

于是我在网上搜,这个问题大概就是oracle 11g的rac搭在linux 7平台上的一个bug。。

暂时性解决方法:

在每次机器重启后,在两节点root用户下手动执行/bin/dd if=/var/tmp/.oracle/npohasd of=/dev/null bs=1024 count=1 再过会,集群就能起来啦。

永久性解决方法:

vi /etc/init.d/ohasd

在文件中找到如这部分,在里面添加红字部分:

if [ -r $AUTOSTARTFILE ]
  then
    case `$CAT $AUTOSTARTFILE` in
      enable*)
        $LOGERR "Oracle HA daemon is enabled for autostart." 
        /bin/dd if=/var/tmp/.oracle/npohasd of=/dev/null bs=1024 count=1 &
        my_crsctl start has -nowait
    sleep 600
    ps -ef | grep dd| grep hasd|awk '{print $2}'|xargs kill -9

        ;;
      disable*)
        $LOGERR "Oracle HA daemon is disabled for autostart." 
        ;;
      *)
        $LOGERR "Oracle HA daemon is disabled by damaged install."
        $LOGERR "Unexpected settings found in $AUTOSTARTFILE."
        ;;
    esac
  else

......

保存退出 :wq

服务器再次重启后,稍等片刻就可以看到集群自动起来啦~

猜你喜欢

转载自blog.csdn.net/DBAngelica/article/details/85002591