具体版本为10203,发现一台当机后,vip漂移到别的节点上,但是telnet该vip地址1521端口不通,netstat -nl| grep 1521发现oracle只监听了本结点实际ip和vip的1521端口,没有对漂移过来的vip的1521监听。
[oracle@NHDB4 orcl]$ netstat -nl | grep 1521
tcp 0 0 222.73.121.6:1521 0.0.0.0:* LISTEN
tcp 0 0 192.168.0.6:1521 0.0.0.0:* LISTEN
检查listener.ora文件发现oracle生成listener.ora可能发生问题
原来文件:
# listener.ora.nhdb1 Network Configuration File: /u01/app/product/10.2.0/db_1/network/admin/listener.ora.nhdb1
# Generated by Oracle configuration tools.
SID_LIST_LISTENER_NHDB1 =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/product/10.2.0/db_1)
(PROGRAM = extproc)
)
)
LISTENER_NHDB1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = NHDB1-VIP)(PORT = 1521)(IP = FIRST))
(ADDRESS = (PROTOCOL = TCP)(HOST = 222.73.121.3)(PORT = 1521)(IP = FIRST))
)
)
修改把主机ip用主机名代替:
LISTENER_NHDB1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = NHDB1)(PORT = 1521)(IP = FIRST))
(ADDRESS = (PROTOCOL = TCP)(HOST = NHDB1-VIP)(PORT = 1521)(IP = FIRST))
)
)
然后发现正常:
[oracle@NHDB1 admin]$ netstat -nl | grep 1521
tcp 0 0 0.0.0.0:1521 0.0.0.0:* LISTEN
也可以删除listener.ora,让oracle监听所有1521端口
发现如果使用lsnrctl stop 再start后,crs_stat -t看到的监听状态居然是offline,再用srvctl start下状态又好了。。。而如果修改完listener.ora直接用srvctl start启动监听的话,仍然只会监听固定ip的1521。。。。最后把主机名改成了localhost,搞定
猜想问题在指定的ip上,这个估计也是RAC自动生成listener.ora的小错误,可能与OS的网络配置有关,下次继续
[@more@]5