在安装grid后跑root.sh时候遇到第一个问题:
ohasd failed to start
Failed to start the Clusterware. Last 20lines of the alert的initd调用运行ohasd进程。
解决方法也是比较简单的,按照如下步骤逐一执行即可:
4.1. 以root用户创建服务文件
touch /usr/lib/systemd/system/ohas.service
chmod 777/usr/lib/systemd/system/ohas.service
4.2. 将以下内容添加到新创建的ohas.service文件中
[root@racnode1 init.d]# vi/usr/lib/systemd/system/ohas.service
[Unit]
Description=Oracle High AvailabilityServices
After=syslog.target
[Service]
ExecStart=/etc/init.d/init.ohasd run>/dev/null 2>&1 Type=simple
Restart=always
[Install]
WantedBy=multi-user.target
4.3. 以root用户运行下面的命令
(也建议在执行root.sh脚本前先完成第一二步,然后开始执行root.sh脚本后,一直刷新/etc/init.d ,直到出现 init.ohasd 文件,
立刻执行这个第三步,这样可以顺利一次完成root.sh脚本的执行)
systemctl daemon-reload
systemctl enable ohas.service
systemctl start ohas.service
4.4. 查看运行状态
systemctl status ohas.service
?.ohas.service - Oracle High AvailabilityServices
Loaded: loaded (/usr/lib/systemd/system/ohas.service; enabled; vendorpreset: disabled)
Active: failed (Result: start-limit) since Tue 2018-12-11 15:16:26 CST;13s ago
Process: 20389 ExecStart=/etc/init.d/init.ohasd run >/dev/null2>&1 Type=simple (code=exited, status=203/EXEC)
MainPID: 20389 (code=exited, status=203/EXEC)
Dec 11 15:16:25 epsprac2 systemd[1]:ohas.service: main process exited, code=exited, status=203/EXEC
Dec 11 15:16:25 epsprac2 systemd[1]: Unitohas.service entered failed state.
Dec 11 15:16:25 epsprac2 systemd[1]:ohas.service failed.
Dec 11 15:16:26 epsprac2 systemd[1]:ohas.service holdoff time over, scheduling restart.
Dec 11 15:16:26 epsprac2 systemd[1]: startrequest repeated too quickly for ohas.service
Dec 11 15:16:26 epsprac2 systemd[1]: Failedto start Oracle High Availability Services.
Dec 11 15:16:26 epsprac2 systemd[1]: Unitohas.service entered failed state.
Dec 11 15:16:26 epsprac2 systemd[1]:ohas.service failed.
此时状态为失败,原因是现在还没有/etc/init.d/init.ohasd文件。
下面可以重新运行脚本root.sh 不会再报ohasd failed to start错误了。
如果还是报ohasd failed to start错误,可能是root.sh脚本创建了init.ohasd之后,ohas.service没有马上启动,解决方法参考以下:
/-----建议按照这个方式解决该问题,有效,连第一次报错都可以避免---------------------/
当运行root.sh时,一直刷新/etc/init.d ,直到出现 init.ohasd 文件,马上手动启动ohas.service服务 命令:systemctl startohas.service
注意:节点二执行root.sh脚本时候也需要完成如上操作
安装数据库软件的时候遇到的:(该坑是一个必然的常规坑,按照下面的方法去做据可以顺利解决)
Error in invoking target 'agent nmhs' ofmakefile
'/u01/app/oracle/product/11.2.0/db_1/sysman/lib/ins_emagent.mk'
如果是没有需要用到emagent的话,这个问题是可以忽略跳过的,一定要解决它的话,参考如下操作: