[Solved] RHEL 7 installs Oracle RAC 11.2.0.4, executes root.sh error ohasd: failed to start

RHEL 7 installs Oracle RAC 11.2.0.4, executes root.sh and reports an error ohasd failed to start

Error reporting reason:

Because RHEL 7 uses SYSTEMd instead of initd to run and restart processes, while root.sh runs ohad processes through traditional initd.

Solution:
in RHEL 7, ohasd needs to be set as a service before running the script root.sh
the steps are as follows:

1. Create service file as root user
[root@rac1 ~]# touch /usr/lib/systemd/system/ohas.service
[root@rac1 ~]# chmod 777 /usr/lib/systemd/system/ohas.service
2. Add the following to the newly created ohas.service file
[root@rac1 init.d]# cat /usr/lib/systemd/system/ohas.service
[Unit]
Description=Oracle High Availability Services
After=syslog.target

[Service]
ExecStart=/etc/init.d/init.ohasd run >/dev/null 2>&1 Type=simple
Restart=always

[Install]
WantedBy=multi-user.target

3. Run the following command as root user
systemctl daemon-reload
systemctl enable ohas.service
systemctl start ohas.service
4. View running status
[root@rac1 init.d]# systemctl status ohas.service

Run root.sh after the service is up
if the ohad failed to start error is still reported, it may be that ohas.service does not start immediately after init.ohad is created by the root.sh script. Refer to the following for solutions:

When running root.sh, refresh/etc/init. D until the init.ohasd file appears. Start ohas.service manually immediately. The service command is systemctl start ohas.service

Read More: