n this Document
Applies to:
Oracle Database - Enterprise Edition - Version 11.2.0.1 and later
Information in this document applies to any platform.
Purpose
本文档的目的是总结可能阻止 Grid Infrastructure (GI) 成功启动的 5 大问题。
Scope
本文档仅适用于 11gR2 Grid Infrastructure。
要确定 GI 的状态,请运行以下命令:
1. $GRID_HOME/bin/crsctl check crs
2. $GRID_HOME/bin/crsctl stat res -t -init
3. $GRID_HOME/bin/crsctl stat res -t
4. ps -ef | egrep 'init|d.bin'
Details
问题 1:CRS-4639:无法连接 Oracle 高可用**,ohasd.bin 未运行或 ohasd.bin 虽在运行但无 init.ohasd 或其他进程
症状:
1. 命令“$GRID_HOME/bin/crsctl check crs”返回错误:
CRS-4639: Could not contact Oracle High Availability Services
2. 命令“ps -ef | grep init”不显示类似于如下所示的行:
root 4878 1 0 Sep12 ? 00:00:02 /bin/sh /etc/init.d/init.ohasd run
3. 命令“ps -ef | grep d.bin”不显示类似于如下所示的行:
root 21350 1 6 22:24 ? 00:00:01 /u01/app/11.2.0/grid/bin/ohasd.bin reboot
或者它只显示 "ohasd.bin reboot" 进程而没有其他进程
可能的原因:
1. 文件“/etc/inittab”并不包含行
h1:35:respawn:/etc/init.d/init.ohasd run >/dev/null 2>&1 2. 未达到运行级别 3,一些 rc3 脚本挂起
3. Init 进程 (pid 1) 并未衍生 /etc/inittab (h1) 中定义的进程,或 init.ohasd 之前的不当输入,如 xx:wait: 阻碍了 init.ohasd 的启动
4. CRS 自动启动已禁用
5. Oracle 本地注册表 ($GRID_HOME/cdata/.olr) 丢失或损坏
解决方案:
1. 将以下行添加至 /etc/inittab
h1:35:respawn:/etc/init.d/init.ohasd run >/dev/null 2>&1 并以 root 用户身份运行“init q”。
2. 运行命令“ps -ef | grep rc”,并kill看起来受阻的所有 rc3 脚本。
3. 删除 init.ohasd 前的不当输入。如果“init q”未衍生“init.ohasd run”进程,请咨询 OS 供应商
4. 启用 CRS 自动启动:
# crsctl enable crs
# crsctl start crs
5. 以 root 用户身份从备份中恢复 OLR(Oracle 本地注册表):
# touch $GRID_HOME/cdata/.olr
# chown root:oinstall $GRID_HOME/cdata/.olr
# ocrconfig -local -restore$GRID_HOME/cdata//backup__.olr
# crsctl start crs
如果出于某种原因