共計 4354 個字符,預計需要花費 11 分鐘才能閱讀完成。
行業資訊
數據庫
關系型數據庫
RHEL 7 安裝 oracle rac 11.2.0.4 執行 root.sh 報錯 ohasd failed to start 怎么辦
這篇文章主要為大家展示了“RHEL 7 安裝 oracle rac 11.2.0.4 執行 root.sh 報錯 ohasd failed to start 怎么辦”,內容簡而易懂,條理清晰,希望能夠幫助大家解決疑惑,下面讓丸趣 TV 小編帶領大家一起研究并學習一下“RHEL 7 安裝 oracle rac 11.2.0.4 執行 root.sh 報錯 ohasd failed to start 怎么辦”這篇文章吧。
報錯信息:
[root@rac1 ~]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions
of /u01/app/oraInventory.
Adding read,write permissions for
group.
Removing read,write,execute permissions for world.
Changing
groupname of /u01/app/oraInventory to oinstall.
The execution of the script
is complete.
[root@zjdb1 ~]# /u01/app/11.2.0/grid/root.sh
Performing root
user operation for Oracle 11g
The following environment variables
are set as:
ORACLE_OWNER= grid
ORACLE_HOME=
/u01/app/11.2.0/grid
Enter the full pathname of the local bin
directory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin …
Copying oraenv to /usr/local/bin …
Copying coraenv to /usr/local/bin
…
Creating /etc/oratab file…
Entries will be added to the
/etc/oratab file as needed by
Database Configuration Assistant when a
database is created
Finished running generic part of root script.
Now
product-specific root actions will be performed.
Using configuration
parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
Creating
trace directory
User ignored Prerequisites during installation
Installing
Trace File Analyzer
OLR initialization – successful
root wallet
root wallet cert
root cert export
peer wallet
profile reader
wallet
pa wallet
peer wallet keys
pa wallet keys
peer cert
request
pa cert request
peer cert
pa cert
peer root cert
TP
profile reader root cert TP
pa root cert TP
peer pa cert
TP
pa peer cert TP
profile reader pa cert TP
profile reader peer
cert TP
peer user cert
pa user cert
Adding Clusterware entries to
inittab
ohasd failed to start
Failed
to start the Clusterware. Last 20 lines of the alert log follow:
2015-05-23
23:37:45.460:
[client(13782)]CRS-2101:The OLR was formatted using version
3.
報錯原因:
因為 RHEL 7 使用 systemd 而不是 initd 運行進程和重啟進程,而 root.sh 通過傳統的 initd 運行 ohasd 進程。
解決方法:
在 RHEL
7 中 ohasd 需要被設置為一個服務,在運行腳本 root.sh 之前。
步驟如下:
以 root 用戶創建服務文件
#touch /usr/lib/systemd/system/ohas.service
#chmod 777 /usr/lib/systemd/system/ohas.service
2. 將以下內容添加到新創建的 ohas.service 文件中
[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
以 root 用戶運行下面的命令
systemctl
daemon-reload
systemctl enable
ohas.service
systemctl start
ohas.service
4.
查看運行狀態
[root@rac1
init.d]# systemctl status ohas.service
ohas.service – Oracle High
Availability Services
Loaded: loaded
(/usr/lib/systemd/system/ohas.service; enabled)
Active: failed (Result: start-limit) since Fri 2015-09-11
16:07:32 CST; 1s ago
Process: 5734 ExecStart=/etc/init.d/init.ohasd run
/dev/null 2 1 Type=simple (code=exited, status=203/EXEC)
Main
PID: 5734 (code=exited, status=203/EXEC)
Sep 11 16:07:32 rac1
systemd[1]: Starting Oracle High Availability Services…
Sep 11 16:07:32
rac1 systemd[1]: Started Oracle High Availability Services.
Sep 11 16:07:32
rac1 systemd[1]: ohas.service: main process exited, code=exited,
status=203/EXEC
Sep 11 16:07:32 rac1 systemd[1]: Unit ohas.service entered
failed state.
Sep 11 16:07:32 rac1 systemd[1]: ohas.service holdoff time
over, scheduling restart.
Sep 11 16:07:32 rac1 systemd[1]: Stopping Oracle
High Availability Services…
Sep 11 16:07:32 rac1 systemd[1]: Starting
Oracle High Availability Services…
Sep 11 16:07:32 rac1 systemd[1]:
ohas.service start request repeated too quickly, refusing to start.
Sep 11
16:07:32 rac1 systemd[1]: Failed to start Oracle High Availability
Services.
Sep 11 16:07:32 rac1 systemd[1]: Unit ohas.service entered failed
state.
此時狀態為失敗,原因是現在還沒有 /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 start
ohas.service
[root@rac1
init.d]# systemctl status ohas.service
ohas.service – Oracle High
Availability Services
Loaded: loaded
(/usr/lib/systemd/system/ohas.service; enabled)
Active: active (running) since Fri 2015-09-11 16:09:05
CST; 3s ago
Main PID: 6000 (init.ohasd)
CGroup:
/system.slice/ohas.service
6000 /bin/sh /etc/init.d/init.ohasd run
/dev/null 2 1 Type=simple
6026 /bin/sleep
10
Sep 11 16:09:05 rac1 systemd[1]: Starting Oracle High Availability
Services…
Sep 11 16:09:05 rac1 systemd[1]: Started Oracle High Availability
Services.
Sep 11 16:09:05 rac1 su[6020]: (to grid) root on
none
以上是“RHEL 7 安裝 oracle rac 11.2.0.4 執行 root.sh 報錯 ohasd failed to start 怎么辦”這篇文章的所有內容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內容對大家有所幫助,如果還想學習更多知識,歡迎關注丸趣 TV 行業資訊頻道!