重庆思庄Oracle、Redhat认证学习论坛
标题:
11g安装GI运行root.sh脚本时报错ohasd failed to start
[打印本页]
作者:
denglj
时间:
2022-3-2 09:44
标题:
11g安装GI运行root.sh脚本时报错ohasd failed to start
系统:
CentOS7.9
数据库:
Oracle 11.2.0.4
登录/注册后可看大图
33903621ecb80a1339.png
(124.2 KB, 下载次数: 343)
下载附件
2022-3-2 09:42 上传
安装GI在运行脚本步骤时,节点1直接运行root.sh脚本,会出现如下报错:
Adding Clusterware entries to inittab
ohasd failed to start
Failed to start the Clusterware. Last 20 lines of the alert logfollow:
2022-01-07 00:14:00.117:
[client(39969)]CRS-2101:The OLR was formatted using version 3.
原因:CentOS 7.9使用systemd而不是initd运行进程和重启进程,而root.sh是通过传统的initd运行ohasd进程,此为Linux 7安装11204版本,执行root.sh时存在的BUG.
以下为解决过程:
方案1:
在运行脚本root.sh前,在CentOS7.9 中ohasd设置一个服务:
# touch/usr/lib/systemd/system/ohas.service
# chmod 777/usr/lib/systemd/system/ohas.service
# vi/usr/lib/systemd/system/ohas.service
添加以下内容:
[Unit]
Description=OracleHigh Availability Services
After=syslog.target
[Service]
ExecStart=/etc/init.d/init.ohasdrun >/dev/null 2>&1 Type=simple
Restart=always
[Install]
WantedBy=multi-user.target
# systemctl daemon-reload
# systemctl enable ohas.service
Created symlink from/etc/systemd/system/multi-user.target.wants/ohas.service to/usr/lib/systemd/system/ohas.service.
# systemctl start ohas.service
# systemctl status ohas.service
● ohas.service - Oracle HighAvailability Services
Loaded: loaded (/usr/lib/systemd/system/ohas.service; enabled; vendorpreset: disabled)
Active: failed (Result: start-limit) since Sat 2022-01-08 14:30:24 CST;17s ago
Process: 19603 ExecStart=/etc/init.d/init.ohasd run >/dev/null2>&1 Type=simple (code=exited, status=203/EXEC)
Main PID: 19603 (code=exited, status=203/EXEC)
Jan 08 14:30:24 hisdb1 systemd[1]:Unit ohas.service entered failed state.
Jan 08 14:30:24 hisdb1 systemd[1]:ohas.service failed.
Jan 08 14:30:24 hisdb1 systemd[1]:ohas.service holdoff time over, scheduling restart.
Jan 08 14:30:24 hisdb1 systemd[1]:Stopped Oracle High Availability Services.
Jan 08 14:30:24 hisdb1 systemd[1]:start request repeated too quickly for ohas.service
Jan 08 14:30:24 hisdb1 systemd[1]:Failed to start Oracle High Availability Services.
Jan 08 14:30:24 hisdb1 systemd[1]:Unit ohas.service entered failed state.
Jan 08 14:30:24 hisdb1 systemd[1]:ohas.service failed.
说明:此时状态为failed,原因是现在还没有/etc/init.d/init.ohasd文件.
解决:运行root.sh脚本,另外开启一个会话一直刷新/etc/init.d,直到出现init.ohasd文件,然后马上手动开启ohas.service服务,语句:systemctlstart ohas.service
# /u01/app/11.2.0/grid/root.sh
Performing rootuser operation for Oracle 11g
The followingenvironment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /u01/app/11.2.0/grid
Enter the fullpathname 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 beadded to the /etc/oratab file as needed by
DatabaseConfiguration Assistant when a database is created
Finished runninggeneric part of root script.
Nowproduct-specific root actions will be performed.
Usingconfiguration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
Creating tracedirectory
User ignoredPrerequisites during installation
Installing TraceFile Analyzer
OLRinitialization - 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
AddingClusterware entries to inittab
CRS-2672:Attempting to start 'ora.mdnsd' on 'hisdb1'
CRS-2676: Startof 'ora.mdnsd' on 'hisdb1' succeeded
CRS-2672:Attempting to start 'ora.gpnpd' on 'hisdb1'
CRS-2676: Startof 'ora.gpnpd' on 'hisdb1' succeeded
CRS-2672:Attempting to start 'ora.cssdmonitor' on 'hisdb1'
CRS-2672:Attempting to start 'ora.gipcd' on 'hisdb1'
CRS-2676: Startof 'ora.cssdmonitor' on 'hisdb1' succeeded
CRS-2676: Startof 'ora.gipcd' on 'hisdb1' succeeded
CRS-2672:Attempting to start 'ora.cssd' on 'hisdb1'
CRS-2672:Attempting to start 'ora.diskmon' on 'hisdb1'
CRS-2676: Startof 'ora.diskmon' on 'hisdb1' succeeded
CRS-2676: Startof 'ora.cssd' on 'hisdb1' succeeded
ASM created andstarted successfully.
Disk Groupocr_vote created successfully.
clscfg: -installmode specified
Successfullyaccumulated necessary OCR keys.
Creating OCRkeys for user 'root', privgrp 'root'..
Operationsuccessful.
CRS-4256:Updating the profile
Successfuladdition of voting disk 73fe02a30e3d4fa9bfab2df50c5a5f75.
Successfullyreplaced voting disk group with +ocr_vote.
CRS-4256:Updating the profile
CRS-4266: Votingfile(s) successfully replaced
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 73fe02a30e3d4fa9bfab2df50c5a5f75 (/dev/asm-diskb) [OCR_VOTE]
Located 1 votingdisk(s).
CRS-2672:Attempting to start 'ora.asm' on 'hisdb1'
CRS-2676: Startof 'ora.asm' on 'hisdb1' succeeded
CRS-2672:Attempting to start 'ora.OCR_VOTE.dg' on 'hisdb1'
CRS-2676: Startof 'ora.OCR_VOTE.dg' on 'hisdb1' succeeded
Configure OracleGrid Infrastructure for a Cluster ... succeeded
说明:节点1成功跑完root.sh脚本.
方案2:
在执行root.sh前安装补丁18370031修复
18370031补丁安装(双节点执行)
上传补丁包
p18370031_112040_Linux-x86-64.zip
解压补丁包
cd /soft
unzip -qp18370031_112040_Linux-x86-64.zip
授权补丁包
chown -R grid:oinstall/soft/18370031
在grid用户下安装补丁
opatch napply -oh $ORACLE_HOME-local /soft/18370031 –silent
开始执行root脚本(双节点执行)
root用户下执行
/u01/app/oraInventory/orainstRoot.sh
/u01/app/11.2.0/grid/root.sh
说明:推荐使用方案2解决此问题.
欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/)
Powered by Discuz! X3.2