記:僅配置單vip連線串,當vip對應的節點down機情況下程式無法連線上正常節點的故障
問題摘要:
昨天,生產庫RAC的二號節點倒了,但是部分程式無法連線上正常的一號節點,發現程式的連線串僅配置了二號節點的vip.
在測試環境模擬錯誤發生的情況,並找到在二號節點短時間內無法正常啟動和程式無法修改的情況下的臨時解決方法.
昨天,生產庫RAC的二號節點倒了,但是部分程式無法連線上正常的一號節點,發現程式的連線串僅配置了二號節點的vip.
在測試環境模擬錯誤發生的情況,並找到在二號節點短時間內無法正常啟動和程式無法修改的情況下的臨時解決方法.
具體實驗情況如下:
一.測試環境如下
RAC 環境:
172.16.89.229 node1
172.16.90.132 node2
172.16.90.167 node1-vip
172.16.90.168 node2-vip
192.168.126.101 node1-priv
192.168.126.102 node2-priv
一.測試環境如下
RAC 環境:
172.16.89.229 node1
172.16.90.132 node2
172.16.90.167 node1-vip
172.16.90.168 node2-vip
192.168.126.101 node1-priv
192.168.126.102 node2-priv
節點一listener.ora檔案:
LISTENER_NODE1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = node1-vip)(PORT = 1521)(IP = FIRST))
(ADDRESS = (PROTOCOL = TCP)(HOST = node1)(PORT = 1521)(IP = FIRST))
)
)
客戶端tnsnames配置如下:
NODE2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.90.168)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = racdb)
)
)
SQL> select * from v$version;
LISTENER_NODE1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = node1-vip)(PORT = 1521)(IP = FIRST))
(ADDRESS = (PROTOCOL = TCP)(HOST = node1)(PORT = 1521)(IP = FIRST))
)
)
客戶端tnsnames配置如下:
NODE2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.90.168)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = racdb)
)
)
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
PL/SQL Release 10.2.0.4.0 - Production
CORE 10.2.0.4.0 Production
TNS for Linux: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
PL/SQL Release 10.2.0.4.0 - Production
CORE 10.2.0.4.0 Production
TNS for Linux: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production
二.模擬錯誤
把節點二機器down機,節點二的vip轉移到節點一,如下
[oracle@node1 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....B1.inst application ONLINE ONLINE node1
ora....B2.inst application OFFLINE OFFLINE
ora.RACDB.db application ONLINE ONLINE node1
ora....SM1.asm application ONLINE ONLINE node1
ora....E1.lsnr application ONLINE ONLINE node1
ora.node1.gsd application ONLINE ONLINE node1
ora.node1.ons application ONLINE ONLINE node1
ora.node1.vip application ONLINE ONLINE node1
ora....SM2.asm application ONLINE OFFLINE
ora....E2.lsnr application OFFLINE OFFLINE
ora.node2.gsd application ONLINE OFFLINE
ora.node2.ons application ONLINE OFFLINE
ora.node2.vip application ONLINE ONLINE node1 --轉到節點二了.
SQL> CONN dlt/dlt@NODE2
ERROR:
ORA-12541: TNS:no listener
Warning: You are no longer connected to ORACLE.
ERROR:
ORA-12541: TNS:no listener
Warning: You are no longer connected to ORACLE.
檢視:節點一的監聽狀態
[oracle@node1 admin]$ lsnrctl status
[oracle@node1 admin]$ lsnrctl status
LSNRCTL for Linux: Version 10.2.0.4.0 - Production on 09-OCT-2012 17:44:37
Copyright (c) 1991, 2007, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER_NODE1
Version TNSLSNR for Linux: Version 10.2.0.4.0 - Production
Start Date 09-OCT-2012 17:39:28
Uptime 0 days 0 hr. 5 min. 8 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/ora10g/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /opt/ora10g/product/10.2.0/db_1/network/log/listener_node1.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.90.167)(PORT=1521))) --注意:這兒的host直接是ip
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.89.229)(PORT=1521)))
Services Summary...
...
The command completed successfully
STATUS of the LISTENER
------------------------
Alias LISTENER_NODE1
Version TNSLSNR for Linux: Version 10.2.0.4.0 - Production
Start Date 09-OCT-2012 17:39:28
Uptime 0 days 0 hr. 5 min. 8 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/ora10g/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /opt/ora10g/product/10.2.0/db_1/network/log/listener_node1.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.90.167)(PORT=1521))) --注意:這兒的host直接是ip
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.89.229)(PORT=1521)))
Services Summary...
...
The command completed successfully
並沒有監聽node2-priv,所以無法通過node2-priv連線到節點一的例項.
三.問題可以通過下面的臨時方法解決
方法一:通過lsnrctl命令重啟LISTENER_NODE1(一定不能用crs_stop ,crs_start ):
[oracle@node1 admin]$ lsnrctl stop
[oracle@node1 admin]$ lsnrctl start
[oracle@node1 admin]$ lsnrctl status
LSNRCTL for Linux: Version 10.2.0.4.0 - Production on 09-OCT-2012 17:51:40
Copyright (c) 1991, 2007, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
...
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=node1)(PORT=1521))) --注意:這兒的host為node1
Services Summary...
....
The command completed successfully
測試連線:
SQL> CONN dlt/dlt@node2;
Connected.
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
RACDB1
----------------
RACDB1
SQL>
成功連線到節點一的例項
成功連線到節點一的例項
方法二:修改節點一listener.ora檔案,增加對node2-priv的監聽.
LISTENER_NODE1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = node1-vip)(PORT = 1521)(IP = FIRST))
(ADDRESS = (PROTOCOL = TCP)(HOST = node1)(PORT = 1521)(IP = FIRST))
(ADDRESS = (PROTOCOL = TCP)(HOST = node2-vip)(PORT = 1521)(IP = FIRST)) 注:新增加內容
)
)
重啟監聽:
[oracle@node1 admin]$ crs_stop ora.node1.LISTENER_NODE1.lsnr
[oracle@node1 admin]$ crs_start ora.node1.LISTENER_NODE1.lsnr
[oracle@node1 admin]$ lsnrctl status
LISTENER_NODE1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = node1-vip)(PORT = 1521)(IP = FIRST))
(ADDRESS = (PROTOCOL = TCP)(HOST = node1)(PORT = 1521)(IP = FIRST))
(ADDRESS = (PROTOCOL = TCP)(HOST = node2-vip)(PORT = 1521)(IP = FIRST)) 注:新增加內容
)
)
重啟監聽:
[oracle@node1 admin]$ crs_stop ora.node1.LISTENER_NODE1.lsnr
[oracle@node1 admin]$ crs_start ora.node1.LISTENER_NODE1.lsnr
[oracle@node1 admin]$ lsnrctl status
LSNRCTL for Linux: Version 10.2.0.4.0 - Production on 09-OCT-2012 17:44:37
Copyright (c) 1991, 2007, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER_NODE1
Version TNSLSNR for Linux: Version 10.2.0.4.0 - Production
Start Date 09-OCT-2012 17:39:28
Uptime 0 days 0 hr. 5 min. 8 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/ora10g/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /opt/ora10g/product/10.2.0/db_1/network/log/listener_node1.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.90.167)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.89.229)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.90.168)(PORT=1521))) --注意:這兒出現我們需要的ip了
Services Summary...
...
The command completed successfully
STATUS of the LISTENER
------------------------
Alias LISTENER_NODE1
Version TNSLSNR for Linux: Version 10.2.0.4.0 - Production
Start Date 09-OCT-2012 17:39:28
Uptime 0 days 0 hr. 5 min. 8 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/ora10g/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /opt/ora10g/product/10.2.0/db_1/network/log/listener_node1.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.90.167)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.89.229)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.90.168)(PORT=1521))) --注意:這兒出現我們需要的ip了
Services Summary...
...
The command completed successfully
INSTANCE_NAME
----------------
RACDB1
----------------
RACDB1
SQL>
成功連線到節點一的例項
成功連線到節點一的例項
最後:上面的僅是臨時的解決方法,最好的方法還是把所有的vip都配置在連線串中.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/195110/viewspace-746049/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 11G RAC 一節點當機後修改監聽相關配置使通過當機節點VIP連線資料庫的客戶端可以連線資料庫客戶端
- RAC一個節點記憶體故障當機,無法訪問記憶體
- 10G RAC節點2當機通過修改listener.ora實現客戶端通過節點2VIP連線到資料庫客戶端資料庫
- RAC節點啟動失敗--ASM無法連線ASM
- Postgrsql 從節點當機,主節點執行DML語句出現等待情況SQL
- W5500多節點連線
- DataNode工作機制 & 新增節點 &下線節點
- PG12.9-Repmgr5.1.0-vip-3節點部署
- 軟連線、硬連結 和 i節點(inode)
- MGR無法連線主節點Authentication plugin 'caching_sha2_password'Plugin
- 以太坊公鏈節點連線節點超時問題排查
- rac環境vip在linux下的連線資訊Linux
- ElasticSearch兩個節點的情況下,shard是如何分配的Elasticsearch
- dom4j 根據xml節點路徑查詢節點,找到對應的目標節點下的子節點,對節點Text值進行修改XML
- weblogic 受管理服務與nodemanger節點之間連線的配置Web
- 【RAC】如何修改vip 或者vip 對應的hostname
- 使用Docker Context連線遠端節點DockerContext
- 關聯線探究,如何連線流程圖的兩個節點流程圖
- ADAMoracle採用連線多節點計算並驗證報價的方式實現避免了單點故障Oracle
- DRM特性引起的RAC節點當機
- 貝塞爾曲線(Bezier curve)實現節點連線
- [zt] JDBC連線Oracle RAC的連線串配置JDBCOracle
- oracle11gR2 RAC 環境測試修改節點VIP的測試操作記錄Oracle
- 外連線轉換為內連線的情況
- Redis筆記 — 連結串列和連結串列節點的API函式(三)Redis筆記API函式
- iOS和Android的點對點連線iOSAndroid
- 10.2.0.4以後vip不會自動relocate back回原節點
- 排查 k8s 叢集 master 節點無法正常工作的問題K8SAST
- 圖解帶頭節點的單連結串列的反轉操作圖解
- ElasticSearch(單節點)環境配置Elasticsearch
- oracle 10g cluster rac vip始終在節點2的問題處理Oracle 10g
- 伺服器的連線情況?伺服器
- windows無法配置此無線連線的解決辦法Windows
- RAC 雙節點 轉單節點流程
- 遞迴演算法-不帶頭節點的單連結串列遞迴演算法
- Mac下Rails連線Mysql的一點點心得MacAIMySql
- K個節點翻轉連結串列
- 雙向連結串列 尾節點插入