Oracle 12c RAC节点启动停滞90%时,如何通过分析GI日志识别具体阻塞资源?
- 内容介绍
- 文章标签
- 相关推荐
本文共计983个文字,预计阅读时间需要4分钟。
相关专题
crsctl start crs 卡在 90%,不是启动慢,是某个资源死锁或初始化失败导致 GI 启动流程挂起。必须立刻查 ohasd.log 和 oraagent_grid.log,而不是等、重试或盲目重启。
看 ohasd.log 确认是否卡在资源依赖链上
gi 启动到 90% 时,ohasd.bin 已拉起所有代理(oraagent.bin、orarootagent.bin),正等待关键资源就绪。此时日志末尾通常出现类似:2026-05-02 00:42:18.331: [ohasd(3421)]crs-2112:waiting for agent 'oraagent_grid' to start resource 'ora.gpnpd'
或更隐蔽的:clscall_wait: timeout waiting for 'ora.crsd' to be online
这说明阻塞点不在 ohasd 层,而在它下游的资源启动环节。
重点检查 oraagent_grid.log 中 failed/clean/restart 循环
该日志位于 $GRID_HOME/log/<hostname>/agent/ohasd/oraagent_grid/oraagent_grid.log,它是定位具体失败资源的黄金线索。常见模式包括:
- 反复出现
Start action for daemon aborted+CLSN00107错误 → 指向ora.gpnpd或ora.cssd初始化失败 - 看到
Failed to write to /u01/app/grid/12.1/gpnp/init/<hostname>.pid→ 文件权限错误(属主非 grid,目录不可写) - 大量
ORA-12547: TNS:lost contact或ORA-12170: TNS:Connect timeout→ora.asm或ora.cluster_interconnect.haip未就绪,底层网络或 ASM 磁盘不可达 - 出现
CRS-2674: Start of 'ora.asm' on '<node>' failed后紧接CRS-2679: Attempting to clean 'ora.asm'→ ASM 实例无法 mount diskgroup,需查asmalert_<hostname>.log
区分 12c 特有阻塞点:HAIP vs. GIPCD vs. GPnP
Oracle 12c RAC 默认启用 HAIP(Highly Available IP)替代传统 GIPCD 管理私网,但 HAIP 启动失败不会报 GIPCD 错误,容易误判。验证方式:
- 若日志中出现
haip: Failed to initialize network interface或CRS-2672: Attempting to start 'ora.cluster_interconnect.haip'后无后续 → 检查私网网卡状态(ifconfig -a | grep -A5 haip)、MTU 是否一致、交换机端口是否 up - 若反复报
GPnP wallet initialization failed或GPnP profile read error→ 检查$GRID_HOME/gpnp/profiles/peer/profile.xml是否损坏,或ora.gpnpd所依赖的 OCR 设备不可读(用ocrcheck -config验证) -
ora.cssd卡住且日志里只有clssnmvDHBValidateNCopy: node X has a disk HB, but no network HB→ 不是 CSSD 自身问题,是 HAIP 或底层私网不通,CSSD 在等网络心跳
绕过阻塞快速恢复 GI 的临时手段
生产环境不能长期停机,但直接 crsctl stop crs -f 可能引发驱逐。稳妥做法是:
- 先确认阻塞资源名:从
oraagent_grid.log最后一次CRS-2672记录中提取资源名,如ora.gpnpd - 手动启动该资源并观察输出:
crsctl start resource ora.gpnpd -init(-init表示以 init 模式启动,跳过依赖检查) - 若仍失败,临时禁用该资源依赖(仅限诊断):
crsctl modify resource "ora.gpnpd" -attr "ENABLED=0",再crsctl start crs看能否过 90% - 注意:
ora.cssd和ora.diskmon绝对不可禁用;ora.gpnpd禁用后 OCR 无法自动同步,需人工干预
oraagent_grid.log 里某行被忽略的权限拒绝或超时,而不是报错最显眼的那个资源。别只盯着 “failed”,要顺着 “waiting for” 和 “attempting to start” 往回翻三屏日志,找第一个没收到 “online” 确认的资源。本文共计983个文字,预计阅读时间需要4分钟。
相关专题
crsctl start crs 卡在 90%,不是启动慢,是某个资源死锁或初始化失败导致 GI 启动流程挂起。必须立刻查 ohasd.log 和 oraagent_grid.log,而不是等、重试或盲目重启。
看 ohasd.log 确认是否卡在资源依赖链上
gi 启动到 90% 时,ohasd.bin 已拉起所有代理(oraagent.bin、orarootagent.bin),正等待关键资源就绪。此时日志末尾通常出现类似:2026-05-02 00:42:18.331: [ohasd(3421)]crs-2112:waiting for agent 'oraagent_grid' to start resource 'ora.gpnpd'
或更隐蔽的:clscall_wait: timeout waiting for 'ora.crsd' to be online
这说明阻塞点不在 ohasd 层,而在它下游的资源启动环节。
重点检查 oraagent_grid.log 中 failed/clean/restart 循环
该日志位于 $GRID_HOME/log/<hostname>/agent/ohasd/oraagent_grid/oraagent_grid.log,它是定位具体失败资源的黄金线索。常见模式包括:
- 反复出现
Start action for daemon aborted+CLSN00107错误 → 指向ora.gpnpd或ora.cssd初始化失败 - 看到
Failed to write to /u01/app/grid/12.1/gpnp/init/<hostname>.pid→ 文件权限错误(属主非 grid,目录不可写) - 大量
ORA-12547: TNS:lost contact或ORA-12170: TNS:Connect timeout→ora.asm或ora.cluster_interconnect.haip未就绪,底层网络或 ASM 磁盘不可达 - 出现
CRS-2674: Start of 'ora.asm' on '<node>' failed后紧接CRS-2679: Attempting to clean 'ora.asm'→ ASM 实例无法 mount diskgroup,需查asmalert_<hostname>.log
区分 12c 特有阻塞点:HAIP vs. GIPCD vs. GPnP
Oracle 12c RAC 默认启用 HAIP(Highly Available IP)替代传统 GIPCD 管理私网,但 HAIP 启动失败不会报 GIPCD 错误,容易误判。验证方式:
- 若日志中出现
haip: Failed to initialize network interface或CRS-2672: Attempting to start 'ora.cluster_interconnect.haip'后无后续 → 检查私网网卡状态(ifconfig -a | grep -A5 haip)、MTU 是否一致、交换机端口是否 up - 若反复报
GPnP wallet initialization failed或GPnP profile read error→ 检查$GRID_HOME/gpnp/profiles/peer/profile.xml是否损坏,或ora.gpnpd所依赖的 OCR 设备不可读(用ocrcheck -config验证) -
ora.cssd卡住且日志里只有clssnmvDHBValidateNCopy: node X has a disk HB, but no network HB→ 不是 CSSD 自身问题,是 HAIP 或底层私网不通,CSSD 在等网络心跳
绕过阻塞快速恢复 GI 的临时手段
生产环境不能长期停机,但直接 crsctl stop crs -f 可能引发驱逐。稳妥做法是:
- 先确认阻塞资源名:从
oraagent_grid.log最后一次CRS-2672记录中提取资源名,如ora.gpnpd - 手动启动该资源并观察输出:
crsctl start resource ora.gpnpd -init(-init表示以 init 模式启动,跳过依赖检查) - 若仍失败,临时禁用该资源依赖(仅限诊断):
crsctl modify resource "ora.gpnpd" -attr "ENABLED=0",再crsctl start crs看能否过 90% - 注意:
ora.cssd和ora.diskmon绝对不可禁用;ora.gpnpd禁用后 OCR 无法自动同步,需人工干预
oraagent_grid.log 里某行被忽略的权限拒绝或超时,而不是报错最显眼的那个资源。别只盯着 “failed”,要顺着 “waiting for” 和 “attempting to start” 往回翻三屏日志,找第一个没收到 “online” 确认的资源。
