【LISTENER】謹防相同的 IPC key導致多監聽無法啟動--TNS-1106故障處理
若想順利實現在資料庫伺服器上啟動多個監聽,需要保證兩個前提條件:1.埠號要不同;2.IPC key值要不同。
第一前提依照常識很容易理解,因為我們很多時候啟動多個監聽的目的就是為了在不同的埠上對外提供服務。
第二前提有時很容易忽視,例如簡簡單單的將預設的listener配置資訊複製後僅修改了埠號,此時就導致新配置的監聽無法啟動的問題。
簡單展示一下由於IPC key相同但埠號不同導致非預設監聽無法啟動的過程。
1.錯誤的監聽配置檔案內容
$ vi $ORACLE_HOME/network/admin/listener.ora
listener=
(description=
(address=(protocol=tcp)(host=secdb1)(port=1521))
(address=(protocol=ipc)(key=extproc)))
listener_1526=
(description=
(address=(protocol=tcp)(host=secdb1)(port=1526))
(address=(protocol=ipc)(key=extproc)))
sid_list_listener=
(sid_list=
(sid_desc=
(sid_name=plsextproc)
(oracle_home=/u01/app/oracle/product/10.2.0/db_1)
(program=extproc)))
2.此時啟動預設監聽可以成功
[oracle@secdb1 admin]$ lsnrctl start
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 8-AUG-2010 14:39:54
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Starting /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=secdb1.localdomain)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=extproc)))
Connecting to (DESCRIPTION=(address=(protocol=tcp)(host=secdb1)(port=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 8-AUG-2010 14:39:54
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=secdb1.localdomain)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=extproc)))
Services Summary...
Service "plsextproc" has 1 instance(s).
Instance "plsextproc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
3.但在啟動listener_1526監聽的時候遇到了TNS-01106問題
[oracle@secdb1 admin]$ lsnrctl start listener_1526
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 8-AUG-2010 14:40:16
Copyright (c) 1991, 2005, Oracle. All rights reserved.
TNS-01106: Listener using listener name LISTENER has already been started
4.問題原因
問題是由listener_1526中指定的“(address=(protocol=ipc)(key=extproc))”與listener中的“(address=(protocol=ipc)(key=extproc))”相同導致的。
在這種IPC key相同的情況下,listener_1526監聽是無法正常啟動的。
5.問題處理
我們可以透過取消listener_1526監聽配置中的“(address=(protocol=ipc)(key=extproc))”,或者透過修改key值的方法來解決該問題。
1)透過修改IPC key值的方法來處理
(1)修改後的listener.ora檔案內容如下
listener=
(description=
(address=(protocol=tcp)(host=secdb1)(port=1521))
(address=(protocol=ipc)(key=extproc)))
listener_1526=
(description=
(address=(protocol=tcp)(host=secdb1)(port=1526))
(address=(protocol=ipc)(key=extproc_1526)))
sid_list_listener=
(sid_list=
(sid_desc=
(sid_name=plsextproc)
(oracle_home=/u01/app/oracle/product/10.2.0/db_1)
(program=extproc)))
(2)此時啟動listener_1526監聽成功
[oracle@secdb1 admin]$ lsnrctl start listener_1526
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 8-AUG-2010 14:46:58
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Starting /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/product/10.2.0/db_1/network/log/listener_1526.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=secdb1.localdomain)(PORT=1526)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=extproc_1526)))
Connecting to (DESCRIPTION=(address=(protocol=tcp)(host=secdb1)(port=1526)))
STATUS of the LISTENER
------------------------
Alias listener_1526
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 8-AUG-2010 14:46:58
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener_1526.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=secdb1.localdomain)(PORT=1526)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=extproc_1526)))
The listener supports no services
The command completed successfully
2)透過取消IPC key值的方法來處理
(1)修改後的listener.ora檔案內容如下
listener=
(description=
(address=(protocol=tcp)(host=secdb1)(port=1521))
(address=(protocol=ipc)(key=extproc)))
listener_1526=
(description=
(address=(protocol=tcp)(host=secdb1)(port=1526)))
sid_list_listener=
(sid_list=
(sid_desc=
(sid_name=plsextproc)
(oracle_home=/u01/app/oracle/product/10.2.0/db_1)
(program=extproc)))
(2)此時啟動listener_1526監聽亦可成功
[oracle@secdb1 admin]$ lsnrctl start listener_1526
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 8-AUG-2010 14:50:30
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Starting /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/product/10.2.0/db_1/network/log/listener_1526.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=secdb1.localdomain)(PORT=1526)))
Connecting to (DESCRIPTION=(address=(protocol=tcp)(host=secdb1)(port=1526)))
STATUS of the LISTENER
------------------------
Alias listener_1526
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 8-AUG-2010 14:50:30
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener_1526.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=secdb1.localdomain)(PORT=1526)))
The listener supports no services
The command completed successfully
BTW:如果使用的是netca工具建立的兩個監聽,監聽配置檔案listener.ora內容屬於上述的第二中場景:取消IPC key值的方法。
下面是透過netca工具建立的listener.ora檔案內容,複製在此,供參考。
# listener.ora Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
(PROGRAM = extproc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = secdb1.localdomain)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
)
LISTENER_1526 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = secdb1.localdomain)(PORT = 1526))
)
)
6.小結
再次強調一下,如果想在資料庫伺服器上啟動多個監聽,需要保證兩個前提條件:1.埠號要不同;2.IPC key值要不同。
越是在緊要關頭,我們越需要的是冷靜。
Good luck.
secooler
10.08.08
-- The End --
第一前提依照常識很容易理解,因為我們很多時候啟動多個監聽的目的就是為了在不同的埠上對外提供服務。
第二前提有時很容易忽視,例如簡簡單單的將預設的listener配置資訊複製後僅修改了埠號,此時就導致新配置的監聽無法啟動的問題。
簡單展示一下由於IPC key相同但埠號不同導致非預設監聽無法啟動的過程。
1.錯誤的監聽配置檔案內容
$ vi $ORACLE_HOME/network/admin/listener.ora
listener=
(description=
(address=(protocol=tcp)(host=secdb1)(port=1521))
(address=(protocol=ipc)(key=extproc)))
listener_1526=
(description=
(address=(protocol=tcp)(host=secdb1)(port=1526))
(address=(protocol=ipc)(key=extproc)))
sid_list_listener=
(sid_list=
(sid_desc=
(sid_name=plsextproc)
(oracle_home=/u01/app/oracle/product/10.2.0/db_1)
(program=extproc)))
2.此時啟動預設監聽可以成功
[oracle@secdb1 admin]$ lsnrctl start
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 8-AUG-2010 14:39:54
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Starting /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=secdb1.localdomain)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=extproc)))
Connecting to (DESCRIPTION=(address=(protocol=tcp)(host=secdb1)(port=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 8-AUG-2010 14:39:54
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=secdb1.localdomain)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=extproc)))
Services Summary...
Service "plsextproc" has 1 instance(s).
Instance "plsextproc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
3.但在啟動listener_1526監聽的時候遇到了TNS-01106問題
[oracle@secdb1 admin]$ lsnrctl start listener_1526
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 8-AUG-2010 14:40:16
Copyright (c) 1991, 2005, Oracle. All rights reserved.
TNS-01106: Listener using listener name LISTENER has already been started
4.問題原因
問題是由listener_1526中指定的“(address=(protocol=ipc)(key=extproc))”與listener中的“(address=(protocol=ipc)(key=extproc))”相同導致的。
在這種IPC key相同的情況下,listener_1526監聽是無法正常啟動的。
5.問題處理
我們可以透過取消listener_1526監聽配置中的“(address=(protocol=ipc)(key=extproc))”,或者透過修改key值的方法來解決該問題。
1)透過修改IPC key值的方法來處理
(1)修改後的listener.ora檔案內容如下
listener=
(description=
(address=(protocol=tcp)(host=secdb1)(port=1521))
(address=(protocol=ipc)(key=extproc)))
listener_1526=
(description=
(address=(protocol=tcp)(host=secdb1)(port=1526))
(address=(protocol=ipc)(key=extproc_1526)))
sid_list_listener=
(sid_list=
(sid_desc=
(sid_name=plsextproc)
(oracle_home=/u01/app/oracle/product/10.2.0/db_1)
(program=extproc)))
(2)此時啟動listener_1526監聽成功
[oracle@secdb1 admin]$ lsnrctl start listener_1526
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 8-AUG-2010 14:46:58
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Starting /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/product/10.2.0/db_1/network/log/listener_1526.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=secdb1.localdomain)(PORT=1526)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=extproc_1526)))
Connecting to (DESCRIPTION=(address=(protocol=tcp)(host=secdb1)(port=1526)))
STATUS of the LISTENER
------------------------
Alias listener_1526
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 8-AUG-2010 14:46:58
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener_1526.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=secdb1.localdomain)(PORT=1526)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=extproc_1526)))
The listener supports no services
The command completed successfully
2)透過取消IPC key值的方法來處理
(1)修改後的listener.ora檔案內容如下
listener=
(description=
(address=(protocol=tcp)(host=secdb1)(port=1521))
(address=(protocol=ipc)(key=extproc)))
listener_1526=
(description=
(address=(protocol=tcp)(host=secdb1)(port=1526)))
sid_list_listener=
(sid_list=
(sid_desc=
(sid_name=plsextproc)
(oracle_home=/u01/app/oracle/product/10.2.0/db_1)
(program=extproc)))
(2)此時啟動listener_1526監聽亦可成功
[oracle@secdb1 admin]$ lsnrctl start listener_1526
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 8-AUG-2010 14:50:30
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Starting /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/product/10.2.0/db_1/network/log/listener_1526.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=secdb1.localdomain)(PORT=1526)))
Connecting to (DESCRIPTION=(address=(protocol=tcp)(host=secdb1)(port=1526)))
STATUS of the LISTENER
------------------------
Alias listener_1526
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 8-AUG-2010 14:50:30
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener_1526.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=secdb1.localdomain)(PORT=1526)))
The listener supports no services
The command completed successfully
BTW:如果使用的是netca工具建立的兩個監聽,監聽配置檔案listener.ora內容屬於上述的第二中場景:取消IPC key值的方法。
下面是透過netca工具建立的listener.ora檔案內容,複製在此,供參考。
# listener.ora Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
(PROGRAM = extproc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = secdb1.localdomain)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
)
LISTENER_1526 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = secdb1.localdomain)(PORT = 1526))
)
)
6.小結
再次強調一下,如果想在資料庫伺服器上啟動多個監聽,需要保證兩個前提條件:1.埠號要不同;2.IPC key值要不同。
越是在緊要關頭,我們越需要的是冷靜。
Good luck.
secooler
10.08.08
-- The End --
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/519536/viewspace-670863/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【故障處理】【oerr】【grep】謹防grep“花哨”功能導致oerr工具無法使用
- 【故障處理】【LISTENER】主機名修改為IP地址後LISTENER無法監聽到例項
- 【LISTENER】配置靜態監聽時謹防SID_NAME大小寫問題導致資料庫無法連線資料庫
- ORACLE的歸檔空間滿導致的監聽故障資料庫無法啟動Oracle資料庫
- Windows最佳化大師最佳化後導致監聽無法啟動處理辦法Windows
- /tmp檔案系統無許可權導致監聽listener啟動失敗
- oracle listener 監聽啟動不起來處理案例一則Oracle
- 【故障處理】多陣列掛接使裝置名稱混亂導致RAC無法啟動問題陣列
- 【故障處理】修改主機名導致oracle例項無法啟動暨如何修改hostnameOracle
- 【問題處理】因ASM磁碟組空間不足導致資料庫例項無法啟動的故障處理ASM資料庫
- start_udev導致監聽自動停止問題處理dev
- Oracle監聽服務無法啟動Oracle
- 應用使用JNDI,資料庫無法連線,導致的程序無法啟動問題處理資料庫
- 導致 Scan VIP 和 Scan Listener(監聽程式)出現故障的最常見的 5 個問題
- 【故障處理】使用GC調整資料庫為SGA自動管理後導致例項無法啟動(ORA-00824)GC資料庫
- docker容器故障致無法啟動解決例項Docker
- [ORACLE轉載-故障處理]11g的ohasd無法隨機啟動Oracle隨機
- terminating the instance due to error481導致ASM無法啟動故障ErrorASM
- docker容器故障致無法啟動解決例項薦Docker
- 動態註冊監聽Listener
- 【ARCHIVE】模擬因無法歸檔導致日誌無法切換故障及一般處理方法兩則Hive
- 【故障恢復】因spfile修改錯誤導致資料庫無法啟動的恢復方法資料庫
- 【問題處理】因誤修改inittab檔案導致Oracle 10gR2 CRS無法啟動Oracle 10g
- oracle偵聽無法啟動Oracle
- 【LISTENER】修改監聽密碼導致NL-00051錯誤的分析與總結密碼
- 歸檔問題導致的資料庫無法啟動資料庫
- oracle之 監聽器無法啟動的幾個原因總結Oracle
- 【listener】oracle靜態監聽和動態監聽 【轉載】Oracle
- 一次Oracle監聽無法動態註冊處理過程排查分析Oracle
- 解決hyper v導致docker無法啟動問題Docker
- HA異常導致oracle資料庫無法啟動Oracle資料庫
- HPUX 監聽無法動態註冊UX
- 如何處理快取導致的無效曝光快取
- Workstation服務無法啟動導致無法訪問檔案伺服器伺服器
- 關於listener無法啟動的問題解決
- jdk版本導致tomcat,eclipse無法啟動的問題JDKTomcatEclipse
- 磁碟IO故障導致的SQLServer資料庫無法寫入SQLServer資料庫
- oracle listener 靜態監聽與動態監聽的一些小事Oracle