ocr context init failure ,error proc-44 error in network address and interface operations netword address and interface operatins error

一、错误本质与定位方法

 

1. 错误核心含义

 
完整错误提示:ocr context init failure, error proc-44: error in network address and interface operations
 
表示OCR(Oracle 集群注册表)初始化时无法完成网络相关操作,这是集群核心组件(CSSD/CRSD)启动的致命障碍,通常由以下原因导致:
 
  • 私有网络 / 公共网络配置错误或通信失败
  • oifcfg(Oracle 网络接口配置)设置与实际网络不匹配
  • 网络接口名称在节点间不一致
  • zeroconf(零配置网络)服务冲突
  • 防火墙 / SELinux 阻断集群通信端口
 

2. 关键日志定位(优先操作)

 
表格
 
日志文件路径核心作用
ocrconfig 日志 $GI_HOME/log/[节点名]/ocrconfig.log 定位 OCR 初始化失败细节
cssd 日志 $GI_HOME/log/[节点名]/cssd/ocssd.log 排查 CSSD 服务网络通信问题
ohasd 日志 $GI_HOME/log/[节点名]/ohasd/ohasd.log 查看集群初始化流程
alert 日志 $GI_HOME/log/[节点名]/alert[节点名].log 快速定位严重故障
oifcfg 配置 oifcfg getif 命令输出 检查网络接口配置
 
日志查看命令(root/grid 用户):
# 查看OCR初始化错误详情
tail -500 $GI_HOME/log/racnode1/ocrconfig.log | grep -i "proc-44\|ocr context init"

# 检查网络接口配置
oifcfg getif

# 验证CSSD网络状态
tail -200 $GI_HOME/log/racnode1/cssd/ocssd.log | grep -i "network\|interface\|gipc"
 
 

3. 基础网络状态检查

# 1. 检查所有网络接口状态
ip addr show
ifconfig -a

# 2. 验证节点间连通性(公共/私有网络)
ping -c 3 [本地公共IP]
ping -c 3 [本地私有IP]
ping -c 3 [远程节点公共IP]
ping -c 3 [远程节点私有IP]

# 3. 检查端口连通性(集群关键端口)
telnet [远程节点私有IP] 2016  # CSSD端口
telnet [远程节点公共IP] 1521   # 数据库端口

# 4. 检查防火墙状态
systemctl status firewalld
systemctl status iptables
 

二、常见故障场景与解决方案

 

场景 1:oifcfg 配置与实际网络不匹配(最常见)

 
现象oifcfg getif 显示的子网与实际网络接口配置不一致,日志中有PROCL-00109: Network address and interface operations error
 
解决方案
# 1. 停止集群(所有节点root用户)
crsctl stop crs -f

# 2. 查看当前oifcfg配置
oifcfg getif

# 3. 删除错误配置(示例:删除所有配置)
oifcfg delif -global

# 4. 添加正确配置(根据实际网络调整)
# 格式:oifcfg setif -global <网卡名>/<子网>:<网络类型>
oifcfg setif -global eth0/192.168.1.0:public
oifcfg setif -global eth1/10.0.0.0:cluster_interconnect

# 5. 验证配置
oifcfg getif

# 6. 重启集群
crsctl start crs
 

场景 2:私有网络通信异常或 IP 冲突

 
现象:节点间私有网络 ping 不通,日志中有GIPC report error [29] msg [gipcretConnectionRefused]
 
解决方案
# 1. 检查私有网络IP配置
ip addr show dev eth1  # 替换为实际私有网卡名

# 2. 检查IP冲突(在所有节点执行)
arping -I eth1 10.0.0.101  # 替换为其他节点私有IP

# 3. 检查路由表
route -n
ip route show

# 4. 修复网络配置(如需要)
nmcli connection modify eth1 ipv4.address 10.0.0.100/24
nmcli connection up eth1

# 5. 验证私有网络连通性
ping -c 5 10.0.0.101  # 其他节点私有IP
 

场景 3:zeroconf 服务冲突(CentOS/RHEL 7 + 常见)

 
现象:日志中有ORA-29701: unable to connect to Cluster Synchronization Service,同时存在 169.254.x.x 地址
 
解决方案
# 1. 禁用zeroconf服务(所有节点)
echo "NOZEROCONF=yes" >> /etc/sysconfig/network
systemctl restart network

# 2. 删除zeroconf路由(临时)
ip route del 169.254.0.0/16

# 3. 验证zeroconf已禁用
ip addr show | grep 169.254  # 不应有输出

# 4. 重启集群
crsctl stop crs -f
crsctl start crs
 

场景 4:网络接口名称在节点间不一致

 
现象:节点 1 使用 eth1 作为私有网卡,节点 2 使用 eth2,日志中有interface mismatch相关错误
 
解决方案
# 1. 统一所有节点网卡名称(示例:将eth2改为eth1)
# 编辑/etc/default/grub,添加net.ifnames=0 biosdevname=0
vi /etc/default/grub
# 重新生成grub配置
grub2-mkconfig -o /boot/grub2/grub.cfg

# 2. 重启系统使网卡名称生效
reboot

# 3. 重新配置oifcfg
oifcfg delif -global
oifcfg setif -global eth0/192.168.1.0:public
oifcfg setif -global eth1/10.0.0.0:cluster_interconnect

场景 5:防火墙 / SELinux 阻断集群通信

 
现象:网络连通性测试失败,日志中有connection refusedtimeout错误
 
解决方案: 
# 1. 临时关闭防火墙(测试用)
systemctl stop firewalld
systemctl stop iptables

# 2. 永久关闭防火墙(生产环境建议配置规则而非关闭)
systemctl disable firewalld
systemctl disable iptables

# 3. 临时关闭SELinux
setenforce 0

# 4. 永久关闭SELinux
vi /etc/selinux/config
# 将SELINUX=enforcing改为SELINUX=disabled

# 5. 重启系统使SELinux配置生效
reboot

# 6. 验证端口连通性
telnet [远程节点私有IP] 2016
 

场景 6:OCR/Voting Disk 访问异常导致网络操作失败

 
现象ocrcheck 失败,日志中有PROT-602: Failed to retrieve data from the cluster registry
 
解决方案
# 1. 检查ASM实例状态
srvctl status asm -n [节点名]

# 2. 启动ASM实例(如未启动)
srvctl start asm -n [节点名]

# 3. 检查磁盘组挂载状态
asmcmd lsdg

# 4. 挂载OCR/Voting Disk所在磁盘组(如未挂载)
asmcmd mount [磁盘组名]

# 5. 验证OCR状态
ocrcheck

# 6. 验证Voting Disk状态
crsctl query css votedisk
 

三、通用故障排查流程(推荐执行)

 
  1. 完整状态检查
    # 集群状态
    crsctl check crs
    crsctl stat res -t -init
    
    # 网络配置
    oifcfg getif
    ip addr show
    cat /etc/hosts
    
    # 日志检查
    tail -200 $GI_HOME/log/[节点名]/ocrconfig.log
    tail -200 $GI_HOME/log/[节点名]/cssd/ocssd.log
    
     
  2. 停止并清理集群
    crsctl stop crs -f
    rm -rf /var/tmp/.oracle/*
    rm -f $GI_HOME/crs/init/*.pid
    
     
  3. 修复网络基础环境
     
    • 统一所有节点网卡名称和配置
    • 确保 /etc/hosts 文件包含所有节点的正确主机名和 IP 映射
    • 禁用 zeroconf 服务
    • 关闭防火墙 / SELinux 或配置正确规则
     
  4. 重新配置 oifcfg
    oifcfg delif -global
    oifcfg setif -global eth0/192.168.1.0:public
    oifcfg setif -global eth1/10.0.0.0:cluster_interconnect
    
     
     
  5. 启动集群并监控日志
    crsctl start crs
    tail -f $GI_HOME/log/[节点名]/ohasd/ohasd.log
    
     
     
  6. 验证修复结果
    crsctl check crs
    crsctl stat res -t
    ocrcheck
    
     

四、特殊情况处理

 

情况 1:单节点集群 OCR 初始化失败

 
  1. 检查是否启用了集群模式:
    crsctl get cluster mode status
     
  2. 如为单节点集群,确保 CSS 配置正确:
    $GI_HOME/bin/localconfig delete
    $GI_HOME/bin/localconfig add
 

情况 2:升级 / 补丁后出现该错误

 
  1. 执行网络配置修复脚本:
    $GI_HOME/crs/install/rootcrs.pl -fixnetwork
     
  2. 重新配置 oifcfg 并重启集群:
     
    oifcfg delif -global
    oifcfg setif -global eth0/192.168.1.0:public
    oifcfg setif -global eth1/10.0.0.0:cluster_interconnect
    crsctl stop crs -f
    crsctl start crs
 

情况 3:主机名 / IP 修改后出现该错误

 
  1. 更新 /etc/hosts 文件,确保所有节点主机名 / IP 正确映射
  2. 重新配置 oifcfg 网络接口
  3. 执行集群配置更新:
    $GI_HOME/crs/install/rootcrs.pl -deconfig -force
    $GI_HOME/crs/install/rootcrs.pl -config

posted on 2026-05-29 09:21  数据库那些事儿  阅读(6)  评论(0)    收藏  举报