Oracle 10g RAC vip 漂移問題

wenaini發表於2008-01-15

具體版本為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

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/79686/viewspace-997356/,如需轉載,請註明出處,否則將追究法律責任。

相關文章