10.2.0.4以后vip不会自动relocate back回原节点

本文介绍Oracle 10.2.0.4及11.1版本中,虚拟IP (VIP) 在公共网络问题解决后不再自动回迁到原始节点的行为变化,并提供了解决方案,包括如何手动启动节点应用和服务来实现VIP的重新分配。
solution 1:
srvctl relocate service -d -s -I;
crsctl relocate resource $resource_name;
solution 2:
srvctl start nodeapps -n <node name>;

like as:
crs1:
[resdb1:/oracle]$crs_stat -t
Name           Type           Target    State     Host        
------------------------------------------------------------
ora.resdb.db   application    ONLINE    ONLINE    resdb1      
ora....b1.inst application    ONLINE    ONLINE    resdb1      
ora....b2.inst application    ONLINE    ONLINE    resdb2      
ora....B1.lsnr application    OFFLINE   OFFLINE               
ora.resdb1.gsd application    ONLINE    ONLINE    resdb1      
ora.resdb1.ons application    ONLINE    ONLINE    resdb1      
ora.resdb1.vip application    ONLINE    ONLINE    resdb1      
ora....B2.lsnr application    ONLINE    ONLINE    resdb2      
ora.resdb2.gsd application    ONLINE    ONLINE    resdb2      
ora.resdb2.ons application    ONLINE    ONLINE    resdb2      
ora.resdb2.vip application    ONLINE    ONLINE    resdb2   
[resdb1:/oracle]$srvctl start nodeapps -n resdb1
[resdb1:/oracle]$crs_stat -t
Name           Type           Target    State     Host        
------------------------------------------------------------
ora.resdb.db   application    ONLINE    ONLINE    resdb1      
ora....b1.inst application    ONLINE    ONLINE    resdb1      
ora....b2.inst application    ONLINE    ONLINE    resdb2      
ora....B1.lsnr application    ONLINE    ONLINE    resdb1      
ora.resdb1.gsd application    ONLINE    ONLINE    resdb1      
ora.resdb1.ons application    ONLINE    ONLINE    resdb1      
ora.resdb1.vip application    ONLINE    ONLINE    resdb1      
ora....B2.lsnr application    ONLINE    ONLINE    resdb2      
ora.resdb2.gsd application    ONLINE    ONLINE    resdb2      
ora.resdb2.ons application    ONLINE    ONLINE    resdb2      
ora.resdb2.vip application    ONLINE    ONLINE    resdb2 

crs2:
$  crs_stat -t
Name           Type           Target    State     Host        
------------------------------------------------------------
ora....SM1.asm application    ONLINE    ONLINE    gsioms01    
ora....01.lsnr application    ONLINE    OFFLINE               
ora....s01.gsd application    ONLINE    ONLINE    gsioms01    
ora....s01.ons application    ONLINE    ONLINE    gsioms01    
ora....s01.vip application    ONLINE    ONLINE    gsioms02    
ora....SM2.asm application    ONLINE    ONLINE    gsioms02    
ora....02.lsnr application    ONLINE    ONLINE    gsioms02    
ora....s02.gsd application    ONLINE    ONLINE    gsioms02    
ora....s02.ons application    ONLINE    ONLINE    gsioms02    
ora....s02.vip application    ONLINE    ONLINE    gsioms02    
ora.gssa.db    application    ONLINE    ONLINE    gsioms02    
ora....a1.inst application    ONLINE    ONLINE    gsioms01    
ora....a2.inst application    ONLINE    ONLINE    gsioms02    


$ lsnrctl start LISTENER_GSIOMS01
LSNRCTL for HPUX: Version 10.2.0.5.0 - Production on 25-MAY-2016 04:32:4
Copyright (c) 1991, 2010, Oracle.  All rights reserved.
Starting /oracle/product/ora10g/bin/tnslsnr: please wait...
TNSLSNR for HPUX: Version 10.2.0.5.0 - Production
System parameter file is /oracle/product/ora10g/network/admin/listener.ora
Log messages written to /oracle/product/ora10g/network/log/listener_gsioms01.log
Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=gsioms01-vip)(PORT=1521)(IP=FIRST)))
TNS-12545: Connect failed because target host or object does not exist
 TNS-12560: TNS:protocol adapter error
  TNS-00515: Connect failed because target host or object does not exist
   HPUX Error: 227: Can't assign requested address
Listener failed to start. See the error message(s) above...

$ srvctl start nodeapps -n gsioms01
CRS-0233: Resource or relatives are currently involved with another operation.
$  crs_stat -t
Name           Type           Target    State     Host        
------------------------------------------------------------
ora....SM1.asm application    ONLINE    ONLINE    gsioms01    
ora....01.lsnr application    ONLINE    ONLINE    gsioms01    
ora....s01.gsd application    ONLINE    ONLINE    gsioms01    
ora....s01.ons application    ONLINE    ONLINE    gsioms01    
ora....s01.vip application    ONLINE    ONLINE    gsioms01    
ora....SM2.asm application    ONLINE    ONLINE    gsioms02    
ora....02.lsnr application    ONLINE    ONLINE    gsioms02    
ora....s02.gsd application    ONLINE    ONLINE    gsioms02    
ora....s02.ons application    ONLINE    ONLINE    gsioms02    
ora....s02.vip application    ONLINE    ONLINE    gsioms02    
ora.gssa.db    application    ONLINE    ONLINE    gsioms02    
ora....a1.inst application    ONLINE    ONLINE    gsioms01    
ora....a2.inst application    ONLINE    ONLINE    gsioms02    


reference(from oracle support id):

Applies to:
Oracle Server – Enterprise Edition – Version 10.2.0.4 to 11.1.0.7 [Release 10.2 to 11.1]
Information in this document applies to any platform.
Symptoms

Starting from 10.2.0.4 and 11.1, VIP does not fail-over back to the original node even after the public network problem is resolved.  This behavior is the default behavior in 10.2.0.4 and 11.1 and is different from that of 10.2.0.3
Cause

This is actually the default default behavior in 10.2.0.4 and 11.1

In 10.2.0.3, on every instance check, the instance attempted to relocate the VIP back to the preferred node (original node), but that required stopping the VIP and then attempt to restart the VIP on the original node. If the public network on the original node is still down, then the attempt to relocate VIP to the original node will fail and the VIP will fail-over back to the secondary node.  During this time, the VIP is not available, so starting from 10.2.0.4 and 11.1, the default behavior is that the instance check will not attempt to relocate the VIP back to the original node.
Solution

If the default behavior of 10.2.0.4 and 11.1 is not desired and if there is a need to have the VIP relocate back to the original node automatically when the public network problem is resolved, use the following workaround
Uncomment the line
ORA_RACG_VIP_FAILBACK=1 && export ORA_RACG_VIP_FAILBACK

in the racgwrap script in $ORACLE_HOME/bin

With the above workaround, VIP will relocate back to the original node when CRS performs the instance check, so in order for the VIP to relocate automatically, the node must have at least one instance running.

The instance needs to be restarted or CRS needs to be restarted to have the VIP start relocating back to the original node automatically if the change is being made on the existing cluster.

Relying on automatic relocation of VIP can take up to 10 minutes because the instance check is performed once every 10 minutes.  Manually relocating the VIP is only way to guarantee quick relocation of VIP back to the original node. 
To manually relocate the VIP, start the nodeapps by issuing
srvctl start nodeapps -n <node name>

Starting the nodeapps does not harm the online resources such as ons and gsd.


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/13750068/viewspace-2106370/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/13750068/viewspace-2106370/

<think> 嗯,用户这次问的是Oracle 19c RAC中第二节点VIP显示"FAILED OVER,STABLE"状态的问题。从描述看用户应该是个DBA,遇到的是生产环境的高可用性问题,语气比较急切。 我注意到用户引用了几段配置信息,其中引用[1]显示了集群节点配置,引用[2]有个时间戳的报错记录,引用[3]是补丁检查记录,引用[4]则是监听配置。这些线索都很关键。 这个"FAILED OVER,STABLE"状态很有意思。字面理解是VIP已经故障转移但处于稳定状态,实际上意味着: - VIP资源已从故障节点切换到其他节点 - 当前状态稳定但并不在预期节点 可能的因链条需要系统性地梳理。先从网络层开始,因为70%的RAC问题都是网络引起的。用户提供的配置里看到节点1和节点2都配置了VIP,但引用[2]报错指向ora.node2.vip,结合引用[4]的监听配置,很可能存在IP冲突或路由问题。 操作系统层面需要检查三个关键点:主机名解析是否同步、网络接口状态是否正常、ARP表是否有异常条目。特别是那个"HUB"参数值得注意,在Oracle集群配置里通常表示节点类型。 集群资源层要重点看crsctl的输出,用户没有提供实际状态但提到"FAILED OVER",说明资源已经触发转移。这里需要区分是VIP资源本身故障还是被节点驱逐导致的转移。 深层因可能有几种经典情况:比如网络闪断触发节点驱逐、VIP被意外绑定在其他机器、网卡冗余配置冲突等。用户提到补丁检查(引用[3]),虽然当时通过,但可能暗示之前打过补丁,需要确认是否引入了新问题。 排查方案设计需要阶梯式推进: 第一步必须立即验证客户端连接是否受影响,这是业务最关心的。 然后从底层网络到上层资源逐层排查,特别要注意第二节点和其他节点的配置差异。 最后修复时要考虑资源切的风险,避免业务中断。 预防措施那块其实更重要,用户没问但作为专业DBA应该关注。比如建议配置持续ping监控、开启更多集群日志级别等。不过这些在首次复里点到为止就好,用户当前最需要的是解决眼前故障。 用户引用的配置片段里有些细节值得玩味: - 监听配置用的192.168.200.21这个IP,需要确认是否与VIP在同一网段 - 报错日志里的时间戳2022-11-30与用户提问时间不符,可能是历史问题 - 补丁检查通过说明不是基础文件冲突 整体来看,用户提供的技术线索足够聚焦,应该是个经验丰富的DBA。复时需要保持专业深度,但要把排查步骤拆解得足够清晰,方便直接执行。对于"STABLE"这种特殊状态要特别解释,避免误解为正常状态。 </think>Oracle 19c RAC 第二节点 VIP 显示 `FAILED OVER, STABLE` 表明该 VIP 资源已被**故障转移(Failed Over)**到集群中的其他节点(通常是第一节点),且转移后的状态是**稳定(STABLE)**的。这意味着 VIP 服务当前在另一个节点上正常运行,但不在其预期的第二节点上。以下是因分析和解决方案: --- ### **主要因分析** 1. **节点驱逐或隔离** - 第二节点可能因网络闪断、`ocssd.bin` 进程崩溃、心跳超时等问题被集群驱逐。 - 触发因包括: - 网络问题(网卡/交换机故障、IP冲突)。 - 资源争用(CPU/内存耗尽)。 - 存储问题(ASM 磁盘组不可达)。 - 操作系统故障(内核崩溃)。 2. **VIP 资源故障** - 第二节点 VIP 配置错误(如子网掩码、网关错误)。 - ARP 冲突(同一子网存在重复 IP)。 - 网卡绑定(bonding)配置异常。 3. **集群资源管理异常** - `crsd`/`ohasd` 服务异常。 - 补丁冲突或 Bug(需检查 OPatch 记录 [^3])。 4. **监听器问题** - 监听器未能注册到 VIP(参考 `local_listener` 配置 [^4])。 --- ### **解决方案** #### **1. 检查节点状态与日志** ```bash # 检查集群状态 crsctl status cluster -all # 查看节点驱逐记录 ocrcheck -local grep -i "eviction" /u01/app/grid/diag/crs/$(hostname)/crs/trace/crsd.trc grep -i "failover" /u01/app/grid/diag/crs/$(hostname)/crs/trace/ohasd.trc ``` #### **2. 验证网络配置** - **检查 VIP 是否冲突**(在第二节点执行): ```bash arping -I bond0 192.168.200.22 # 替换为第二节点 VIP ``` 若收到多个响应,说明存在 IP 冲突。 - **验证网卡绑定**: ```bash cat /proc/net/bonding/bond0 # 检查绑定状态和从属网卡 ``` #### **3. 恢复 VIP 资源** ```bash # 尝试将 VIP 资源移第二节点 crsctl relocate resource ora.<节点2_VIP名称>.vip -n raclhr-19c-n2 ``` 若失败,强制重启资源: ```bash crsctl stop resource ora.<节点2_VIP名称>.vip -f crsctl start resource ora.<节点2_VIP名称>.vip -n raclhr-19c-n2 ``` #### **4. 修复监听器配置** ```sql -- 确认 local_listener 配置正确(参考引用[4]) ALTER SYSTEM SET local_listener='(ADDRESS=(PROTOCOL=TCP)(HOST=节点2_VIP)(PORT=1551))' SCOPE=BOTH SID='+ASM2'; ``` #### **5. 补丁与 Bug 检查** - 检查已知 Bug(如 Doc ID 2675702.1): ```bash opatch lspatches # 列出已安装补丁 ``` - 若存在冲突补丁(引用[3]中已检查无冲突),考虑滚或应用新补丁。 #### **6. 重启集群服务(谨慎操作)** ```bash # 在第二节点以 root 执行 crsctl stop crs -f crsctl start crs ``` --- ### **关键预防措施** 1. **网络冗余**:配置网卡绑定(bonding)和交换机堆叠。 2. **资源监控**:使用 `crsctl status res -t -w "NAME co ora.*.vip"` 实时监控 VIP 状态。 3. **定期验证**:通过 `cluvfy comp nodecon -n all` 检查集群网络健康性。 > **注意**:若故障由底层硬件(如网卡损坏)引起,需更换硬件后重新配置 VIP。 --- ### 相关问题 1. Oracle RAC 中如何诊断节点驱逐(Node Eviction)的根本因? 2. 如何配置 Oracle RAC 的网络冗余(bonding/Teaming)以提高可用性? 3. Oracle 19c RAC 中常见的 VIP 故障有哪些修复方法? 4. 如何验证 Oracle 集群的补丁兼容性以避免冲突? 5. 在 RAC 环境中,监听器无法注册到 VIP 应如何排查? [^1]: 集群节点配置 [^2]: VIP 资源执行环境变量 [^3]: 补丁冲突检查日志 [^4]: 监听器配置参数
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值