数据库:oracle11.2.0.4
系统:CentOS7.9
环境:ASM单实例
问题描述:集群服务不随系统的启动而自动开启,告警日志报错如下:
2022-07-2410:21:20.779:
[ohasd(2107)]CRS-0715:OracleHigh Availability Service has timed out waiting for init.ohasd to be started.
临时解决方案:
Clear all sockets under /var/tmp/.oracle or /tmp/.oracle if any and thenopen two terminals of the same node, where stack is not coming up.
会话1:
[root@leo~]# /u01/app/grid/product/11.2.0/grid/bin/crsctl start has
CRS-4123:Oracle High Availability Services has been started.
会话1执行starthas后,马上在会话2执行以下语句,待has启动成功后,按CTRL+C终止dd命令.
[root@leo.oracle]# dd if=/var/tmp/.oracle/npohasd of=/dev/null bs=1024 count=1
问题:如何实现集群服务随系统的启动而自动开启呢?
以下解决此问题:
[root@leo~]# vi /etc/init.d/ohasd
红颜色高亮为新增部分
if [ -r $AUTOSTARTFILE ]
th