Oracle10g RAC, 客戶端登陸,偶爾報 ORA-12535 -- 問題解決 (防火牆問題)

tolywang發表於2007-12-14
Oracle10g RAC, 客戶端登陸,偶爾報 ORA-12535, 急!
Linux AS4.0 64bit
Oracle10g 10.2.0.1 RAC OCFS2
資料庫名稱tpc
每個節點有兩個public nic , 一個private nic .



------------------------------------------------



1. 引數檔案中Listener相關的引數 (兩個節點)

SQL> show parameter listener

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
local_listener string LOCAL_TPC
remote_listener string LISTENERS_TPC


其中 LOCAL_TPC 會在後面的每個節點 tnsnames.ora 中設定。



---------------------------------------------------

2. hosts :


gnd-rac01$cat hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.

127.0.0.1 localhost.localdomain localhost
10.155.4.95 gnd-rac01 # public nic1
172.20.1.19 gnd-rac01 # public nic2 --- VIP統一網段
10.1.0.1 gnd-pri01 # private nic
172.20.1.29 gnd-vip01 # VIP

10.155.4.96 gnd-rac02
172.20.1.18 gnd-rac02
10.1.0.2 gnd-pri02
172.20.1.28 gnd-vip02


不過在安裝CRS的時候 public nic 10.155.4.95 (96) 被設定為Do Not Use . VIP使用的是 172.20 段的.
而且vipca的時候選擇的也是 172.20 的這塊public nic .


---------------------------------------------------


3. 節點1的tnsnames.ora 及listener.ora 設定 。

TPC2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.20.1.28)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.155.4.96)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = tpc)
(INSTANCE_NAME = tpc2)
)
)
TPC1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.20.1.29)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.155.4.95)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = tpc)
(INSTANCE_NAME = tpc1)
)
)
TPC =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.20.1.29)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.20.1.28)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.155.4.95)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.155.4.96)(PORT = 1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = tpc)
)
)
LISTENERS_TPC =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.20.1.29)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.20.1.28)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.155.4.95)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.155.4.96)(PORT = 1521))
)



# LOCAL_TPC 對應spfile中的local_listener . 自己加入的。 [節點1]

LOCAL_TPC =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.20.1.19)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.155.4.95)(PORT = 1521))
)



節點1 監聽:


LISTENER_GND-RAC01 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.20.1.29)(PORT = 1521)(IP = FIRST))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.155.4.95)(PORT = 1521)(IP = FIRST))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
)
)







---------------------------------------------------


4. 節點 2 的tnsnames.ora 及listener.ora 設定 。


TPC2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.20.1.28)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.155.4.96)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = tpc)
(INSTANCE_NAME = tpc2)
)
)
TPC1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.20.1.29)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.155.4.95)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = tpc)
(INSTANCE_NAME = tpc1)
)
)
TPC =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.20.1.29)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.20.1.28)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.155.4.95)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.155.4.96)(PORT = 1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = tpc)
)
)
LISTENERS_TPC =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.20.1.29)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.20.1.28)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.155.4.95)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.155.4.96)(PORT = 1521))
)


# LOCAL_TPC 對應spfile中的local_listener . 自己加入的。 [節點2]

LOCAL_TPC =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.20.1.18)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.155.4.96)(PORT = 1521))
)



節點2 監聽:

LISTENER_GND-RAC02 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.20.1.28)(PORT = 1521)(IP = FIRST))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.155.4.96)(PORT = 1521)(IP = FIRST))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
)
)

-----

客戶端一般使用 172.20 段訪問。


客戶端設定:


GND_RAC=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.20.1.29)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.20.1.28)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = tpc)
)
)


開始測試6,7次,有時候登入Node1,有時候Node2, 但是偶爾又報錯 ORA-12535 。

=====================================

我用單機訪問 RAC01(客戶端只是設定一個vip,不設定節點2的 ) , 一點問題都沒有,訪問rac02 (客戶段單機設定) , 訪問不了。 後來檢查網路不同點。

暈倒,解決了,原來是RAC01 上防火牆disabled , rac02 上 enabled.

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

相關文章