oracle rac遭遇ora-12170
現象:客戶端配置了tnsname指向rac兩個節點的VIP地址,tnsping tnsname正常,使用sqlplus連線則會出現偶發的ora-12170報錯(同時觀察網路狀態一切正常)。
以前遇到過:
WARNING: inbound connection timed out (ORA-3136)
sqlnet.log:Fatal NI connect error 12170.
通過:
1.set INBOUND_CONNECT_TIMEOUT_=0 in listener.ora
2. set SQLNET.INBOUND_CONNECT_TIMEOUT = 0 in sqlnet.ora of server.
3. stop and start both listener and database.
4. Now try to connect to DB and observe the behaviour
可解決問題,但我這次碰到的顯然不是這樣的問題
WARNING: inbound connection timed out (ORA-3136)
sqlnet.log:Fatal NI connect error 12170.
通過:
1.set INBOUND_CONNECT_TIMEOUT_
2. set SQLNET.INBOUND_CONNECT_TIMEOUT = 0 in sqlnet.ora of server.
3. stop and start both listener and database.
4. Now try to connect to DB and observe the behaviour
可解決問題,但我這次碰到的顯然不是這樣的問題
在metalink中找到Doc ID:453544.1,它描述的問題跟我遇到的十分像,
---------------------------------------------------
Cause:
Client -----------> NAT firewall ----------> RAC
---------------------------------------------------
Cause:
Client -----------> NAT firewall ----------> RAC
The problem lies with the network design. Client can access RAC only via RAC's external IP address, because the connection goes via NAT firewall/router.
As part of RAC configuration, the connections may be re-directed among available nodes to have loadbalancing feature. RAC DB sends the internal IP/hostname in the redirected packet. When the client tries to connect using this internal IP address, it can not connect and thus errors out.
You will see the error if the redirection happends to other nodes. Connection will be successful if no redirection happends.
---------------------------------------------------
As part of RAC configuration, the connections may be re-directed among available nodes to have loadbalancing feature. RAC DB sends the internal IP/hostname in the redirected packet. When the client tries to connect using this internal IP address, it can not connect and thus errors out.
You will see the error if the redirection happends to other nodes. Connection will be successful if no redirection happends.
---------------------------------------------------
之後通過其Solution,解決了ora-12170問題。
解決方法:
1.設定rac每個節點的系統引數LOCAL_LISTENER
node1
-----
SQL>alter system set local_listener='(address=(protocol=tcp)(host=node1)(port=1521))' sid='ocrl1'
1.設定rac每個節點的系統引數LOCAL_LISTENER
node1
-----
SQL>alter system set local_listener='(address=(protocol=tcp)(host=node1)(port=1521))' sid='ocrl1'
node2
-----
SQL>alter system set local_listener='(address=(protocol=tcp)(host=node2)(port=1521))' sid='ocrl2'
-----
SQL>alter system set local_listener='(address=(protocol=tcp)(host=node2)(port=1521))' sid='ocrl2'
這個有點像以前遇到的ora-12545問題的解決方法,不同的是host=node1(注意是:hostname,我使用了VIP hostname)
2.檢查listener狀態
$ lsnrctl services
Service "oracle" has 2 instance(s).
Instance "oracle1", status READY, has 3 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
REMOTE SERVER
(ADDRESS=(PROTOCOL=TCP)(HOST=node1)(PORT=1521))
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
Instance "oracle2", status READY, has 2 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
REMOTE SERVER
(ADDRESS=(PROTOCOL=TCP)(HOST=node2)(PORT=1521))
$ lsnrctl services
Service "oracle" has 2 instance(s).
Instance "oracle1", status READY, has 3 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
REMOTE SERVER
(ADDRESS=(PROTOCOL=TCP)(HOST=node1)(PORT=1521))
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
Instance "oracle2", status READY, has 2 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
REMOTE SERVER
(ADDRESS=(PROTOCOL=TCP)(HOST=node2)(PORT=1521))
3.client端tns
RAC =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = node1)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = node2)(PORT = 1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = oracle)
(FAILOVER_MODE =
(TYPE = SELECT)
(METHOD = BASIC)
)
)
)
RAC =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = node1)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = node2)(PORT = 1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = oracle)
(FAILOVER_MODE =
(TYPE = SELECT)
(METHOD = BASIC)
)
)
)
4.確保client端能解析伺服器hostname(設定不同平臺下的hosts檔案)
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/17997/viewspace-617020/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- rac 遭遇GC BUFFER BUSY 處理思路GC
- ORACLE RAC 11.2.0.4 for RHEL6.8安裝遭遇PRVF 9992與DBCA遭遇ORA-19504&ORA-15001Oracle
- oracle遭遇大量SNIPED會話Oracle會話
- oracle 10.2.4 遭遇bug 當機Oracle
- ORA-12170 Windows上Oracle開放防火牆埠問題WindowsOracle防火牆
- oracle RACOracle
- oracle 10.2.0.4 rac asm磁碟組載入時遭遇 ORA-00600 kfgFinalize_2 錯誤OracleASM
- Oracle RAC Cache Fusion 系列十七:Oracle RAC DRMOracle
- Oracle RAC CacheFusion 系列十五:Oracle RAC CRServer Part TwoOracleServer
- ORACLE RAC clusterwareOracle
- oracle rac oemOracle
- oracle rac + dataguardOracle
- Oracle 11gR2 RAC 執行root.sh時遭遇 CRS-0184/PRCR-1070Oracle
- Oracle 11.2 DataGuard RAC To RAC搭建Oracle
- ORA-12170:TNS:連線超時
- ORA-12170: TNS: 連線超時
- ORA-12170 TNS 連線超時
- Oracle RAC Cache Fusion系列十八:Oracle RAC Statisticsand Wait EventsOracleAI
- Oracle RAC Cache Fusion 系列十四:Oracle RAC CR Server Part OneOracleServer
- Oracle RAC Cache Fusion 系列十:Oracle RAC Enqueues And Lock Part 1OracleENQ
- 【RAC】Oracle RAC如何修改心跳網路Oracle
- oracle rac 增加磁碟Oracle
- oracle RAC RDS on AIXOracleAI
- Oracle RAC LoadBalanceOracle
- oracle rac的特徵Oracle特徵
- Oracle RAC搭建(三)Oracle
- Oracle RAC搭建(二)Oracle
- Oracle RAC搭建(一)Oracle
- ORACLE RAC重建OCROracle
- Oracle RAC基本管理Oracle
- Oracle RAC Background processesOracle
- ORACLE RAC工作原理Oracle
- Oracle RAC TAF [zt]Oracle
- oracle rac 備份Oracle
- Oracle RAC introductionOracle
- ORACLE RAC UNKNOWNOracle
- [zt] ORACLE RAC原理Oracle
- jboss oracle rac (zt)Oracle