因為/etc/hosts中問題導致監聽掛起-報錯:WARNING: Subscription for node down event still pending
問題描述:監聽重啟後稍等(大約一分鐘後)檢查監聽狀態,監聽已經報錯:
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
-----其實上面這種報錯就是監聽沒啟動--至於未啟動的原因,可能是程式確實未啟動或程式被KILL、掛起等各種原因總之是程式沒啟動。
檢查日誌發現有一條資訊:WARNING: Subscription for node down event still pending
搜尋此條報錯的資訊,網上解答大致兩種情況是:
情況一:Oracle 顯示該問題為bug,並在10.2.0.3中已修復,但是在11.1.0.6中仍然存在。
情況二:監聽無法在指定埠啟動--可能前一次監聽未正常退出或有其它程式佔用了埠
但是回想此前監聽程式一直執行正常,也檢視了埠無異常。報著有錯誤先從自身查起的心態,回憶了最近對系統做過的所有變更。
從修改監聽配置檔案listener.ora、tnsnames.ora、動態監聽的註冊都檢查了多遍。重建了多次監聽均無法解決此故障。
終於想起了修改過/etc/hosts中的資訊,於是重新修改此檔案,將127.0.0.1條目恢復為系統預設的:127.0.0.1 localhost.localdomain localhost。重啟監聽正常
下面重現一下此錯誤的產生和解決。
#########################################################################################################################
實驗思路說明: --一些無意義的輸出就省略了未貼出。可以直接在文章左上的文章名下目錄檢視需要的小節。
實驗一是正確配置/etc/hosts及監聽正常執行的狀態;
實驗二模擬出錯的場景為修改127.0.0.1 bys3.bys.com bys3,增加192.168.1.211 bys3.bys.com ,並分別修改listener.ora的三小步。
實驗三模擬出錯的場景為修改127.0.0.1 bys3.bys.com bys3,但是刪除192.168.1.211 bys3.bys.com bys3條目。使用DBCA預設建立的listener.ora
#########################################################################################################################
重新啟動監聽可以正常。
[root@bys3 ~]# cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
192.168.1.211 bys3.bys.com bys3
[root@bys3 ~]# ping bys3
PING bys3.bys.com (192.168.1.211) 56(84) bytes of data.
64 bytes from bys3.bys.com (192.168.1.211): icmp_seq=1 ttl=64 time=0.232 ms
^C
--- bys3.bys.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.232/0.232/0.232/0.000 ms
[root@bys3 ~]# ping bys3.bys.com
PING bys3.bys.com (192.168.1.211) 56(84) bytes of data.
64 bytes from bys3.bys.com (192.168.1.211): icmp_seq=1 ttl=64 time=0.125 ms
^C
[oracle@bys3 admin]$ cat listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = bys3.bys.com)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
ADR_BASE_LISTENER = /u01
[oracle@bys3 admin]$ lsnrctl start
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 18-NOV-2013 10:56:55
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Starting /u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 11.2.0.4.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /u01/diag/tnslsnr/bys3/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=bys3.bys.com)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=bys3.bys.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 18-NOV-2013 10:56:57
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/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/diag/tnslsnr/bys3/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=bys3.bys.com)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
The listener supports no services
The command completed successfully
[oracle@bys3 admin]$ lsnrctl status --監聽已經正常執行,例項已經註冊進來了。--動態註冊
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 18-NOV-2013 10:59:10
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=bys3.bys.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 18-NOV-2013 10:56:57
Uptime 0 days 0 hr. 2 min. 12 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/diag/tnslsnr/bys3/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=bys3.bys.com)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "bys3" has 1 instance(s).
Instance "bys3", status READY, has 1 handler(s) for this service...
The command completed successfully
###############################################################################################################
再增加一條IP與域名對應即:192.168.1.211 bys3.bys.com
如下:
[root@bys3 ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
#127.0.0.1 localhost.localdomain localhost
127.0.0.1 bys3.bys.com bys3
::1 localhost6.localdomain6 localhost6
192.168.1.211 bys3.bys.com bys3
[root@bys3 ~]# ping bys3
PING bys3.bys.com (127.0.0.1) 56(84) bytes of data.
64 bytes from bys3.bys.com (127.0.0.1): icmp_seq=1 ttl=64 time=0.122 ms
[root@bys3 ~]# ping bys3.bys.com
PING bys3.bys.com (127.0.0.1) 56(84) bytes of data.
64 bytes from bys3.bys.com (127.0.0.1): icmp_seq=1 ttl=64 time=0.118 ms
在修改了/etc/hosts中127.0.0.1條目後,分別實驗了以下三種情況(均為修改listener.ora檔案),
監聽日誌中的報錯資訊均為:WARNING: Subscription for node down event still pending
監聽配置檔案:
[oracle@bys3 admin]$ cat listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = bys3.bys.com)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
ADR_BASE_LISTENER = /u01
啟動監聽並檢視狀態--檢視狀態要在監聽啟動後稍等一下檢視,會報錯。剛啟動完成時還是正常的。
[oracle@bys3 admin]$ lsnrctl start ---啟動監聽
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 18-NOV-2013 10:26:44
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Starting /u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 11.2.0.4.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /u01/diag/tnslsnr/bys3/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=bys3.bys.com)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=bys3.bys.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 18-NOV-2013 10:26:45
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/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/diag/tnslsnr/bys3/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=bys3.bys.com)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
The listener supports no services
The command completed successfully
[oracle@bys3 admin]$ lsnrctl status ---監聽啟動後,稍等一下,檢視狀態,監聽程式已經掛了。
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 18-NOV-2013 10:27:09
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=bys3.bys.com)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
############################################################################################
監聽配置檔案:
[oracle@bys3 admin]$ cat listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = bys3.bys.com)(PORT = 1521))
)
)
ADR_BASE_LISTENER = /u01
[oracle@bys3 admin]$ lsnrctl start ---啟動監聽--輸出資訊和上一步監聽配置一中一樣,不太重要的資訊就不貼了。
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 18-NOV-2013 10:37:24
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=bys3.bys.com)(PORT=1521)))
The listener supports no services
The command completed successfully
[oracle@bys3 admin]$ lsnrctl status ---監聽啟動後,稍等一下,檢視狀態,監聽程式已經掛了。
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 18-NOV-2013 10:39:12
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=bys3.bys.com)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
############################################################################################
監聽配置檔案:
[oracle@bys3 admin]$ cat listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.211)(PORT = 1521))
)
)
ADR_BASE_LISTENER = /u01
[oracle@bys3 admin]$ ping 192.168.1.211
PING 192.168.1.211 (192.168.1.211) 56(84) bytes of data.
64 bytes from 192.168.1.211: icmp_seq=1 ttl=64 time=1.04 ms
[oracle@bys3 admin]$ lsnrctl start ---啟動監聽--輸出資訊和監聽配置一中一樣,不太重要的資訊就不貼了。
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.211)(PORT=1521)))
The listener supports no services
The command completed successfully
[oracle@bys3 admin]$ lsnrctl status ---監聽啟動後,稍等一下,檢視狀態,監聽程式已經掛了。
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 18-NOV-2013 10:42:27
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.211)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
############################################################################################
監聽配置檔案:
[root@bys3 ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
#127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
#192.168.1.211 bys3.bys.com bys3
127.0.0.1 bys3.bys.com bys3
[root@bys3 ~]# ping bys3.bys.com
PING bys3.bys.com (127.0.0.1) 56(84) bytes of data.
64 bytes from bys3.bys.com (127.0.0.1): icmp_seq=1 ttl=64 time=0.305 ms
^C
[root@bys3 ~]# ping bys3
PING bys3.bys.com (127.0.0.1) 56(84) bytes of data.
64 bytes from bys3.bys.com (127.0.0.1): icmp_seq=1 ttl=64 time=0.114 ms
^C
[oracle@bys3 admin]$ cat listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = bys3.bys.com)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
ADR_BASE_LISTENER = /u01
[oracle@bys3 admin]$ lsnrctl start ---啟動監聽--輸出資訊和上一步監聽配置一中一樣,不太重要的資訊就不貼了。
The listener supports no services
The command completed successfully
[oracle@bys3 admin]$ lsnrctl status --監聽啟動後,稍等一下,檢視狀態,監聽程式已經掛了。
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 18-NOV-2013 11:13:48
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=bys3.bys.com)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
-----其實上面這種報錯就是監聽沒啟動--至於未啟動的原因,可能是程式確實未啟動或程式被KILL、掛起等各種原因總之是程式沒啟動。
檢查日誌發現有一條資訊:WARNING: Subscription for node down event still pending
搜尋此條報錯的資訊,網上解答大致兩種情況是:
情況一:Oracle 顯示該問題為bug,並在10.2.0.3中已修復,但是在11.1.0.6中仍然存在。
情況二:監聽無法在指定埠啟動--可能前一次監聽未正常退出或有其它程式佔用了埠
但是回想此前監聽程式一直執行正常,也檢視了埠無異常。報著有錯誤先從自身查起的心態,回憶了最近對系統做過的所有變更。
從修改監聽配置檔案listener.ora、tnsnames.ora、動態監聽的註冊都檢查了多遍。重建了多次監聽均無法解決此故障。
終於想起了修改過/etc/hosts中的資訊,於是重新修改此檔案,將127.0.0.1條目恢復為系統預設的:127.0.0.1 localhost.localdomain localhost。重啟監聽正常
下面重現一下此錯誤的產生和解決。
#########################################################################################################################
實驗思路說明: --一些無意義的輸出就省略了未貼出。可以直接在文章左上的文章名下目錄檢視需要的小節。
實驗一是正確配置/etc/hosts及監聽正常執行的狀態;
實驗二模擬出錯的場景為修改127.0.0.1 bys3.bys.com bys3,增加192.168.1.211 bys3.bys.com ,並分別修改listener.ora的三小步。
實驗三模擬出錯的場景為修改127.0.0.1 bys3.bys.com bys3,但是刪除192.168.1.211 bys3.bys.com bys3條目。使用DBCA預設建立的listener.ora
#########################################################################################################################
實驗一:將/etc/hosts中127.0.0.1條目設定為預設的:
127.0.0.1 localhost.localdomain localhost;192.168.1.211 bys3.bys.com bys3條目依然保留。重新啟動監聽可以正常。
[root@bys3 ~]# cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
192.168.1.211 bys3.bys.com bys3
[root@bys3 ~]# ping bys3
PING bys3.bys.com (192.168.1.211) 56(84) bytes of data.
64 bytes from bys3.bys.com (192.168.1.211): icmp_seq=1 ttl=64 time=0.232 ms
^C
--- bys3.bys.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.232/0.232/0.232/0.000 ms
[root@bys3 ~]# ping bys3.bys.com
PING bys3.bys.com (192.168.1.211) 56(84) bytes of data.
64 bytes from bys3.bys.com (192.168.1.211): icmp_seq=1 ttl=64 time=0.125 ms
^C
[oracle@bys3 admin]$ cat listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = bys3.bys.com)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
ADR_BASE_LISTENER = /u01
[oracle@bys3 admin]$ lsnrctl start
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 18-NOV-2013 10:56:55
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Starting /u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 11.2.0.4.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /u01/diag/tnslsnr/bys3/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=bys3.bys.com)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=bys3.bys.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 18-NOV-2013 10:56:57
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/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/diag/tnslsnr/bys3/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=bys3.bys.com)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
The listener supports no services
The command completed successfully
[oracle@bys3 admin]$ lsnrctl status --監聽已經正常執行,例項已經註冊進來了。--動態註冊
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 18-NOV-2013 10:59:10
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=bys3.bys.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 18-NOV-2013 10:56:57
Uptime 0 days 0 hr. 2 min. 12 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/diag/tnslsnr/bys3/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=bys3.bys.com)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "bys3" has 1 instance(s).
Instance "bys3", status READY, has 1 handler(s) for this service...
The command completed successfully
###############################################################################################################
實驗二:修改/etc/hosts中127.0.0.1條目,並分別修改listener.ora的三小步
將127.0.0.1 localhost.localdomain localhost條目改為127.0.0.1 bys3.bys.com bys3後,再增加一條IP與域名對應即:192.168.1.211 bys3.bys.com
如下:
[root@bys3 ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
#127.0.0.1 localhost.localdomain localhost
127.0.0.1 bys3.bys.com bys3
::1 localhost6.localdomain6 localhost6
192.168.1.211 bys3.bys.com bys3
[root@bys3 ~]# ping bys3
PING bys3.bys.com (127.0.0.1) 56(84) bytes of data.
64 bytes from bys3.bys.com (127.0.0.1): icmp_seq=1 ttl=64 time=0.122 ms
[root@bys3 ~]# ping bys3.bys.com
PING bys3.bys.com (127.0.0.1) 56(84) bytes of data.
64 bytes from bys3.bys.com (127.0.0.1): icmp_seq=1 ttl=64 time=0.118 ms
在修改了/etc/hosts中127.0.0.1條目後,分別實驗了以下三種情況(均為修改listener.ora檔案),
監聽日誌中的報錯資訊均為:WARNING: Subscription for node down event still pending
監聽配置一:使用NETCA建立監聽時的預設listener.ora檔案
此時重啟監聽,然後稍等(大約一分鐘後)檢查監聽狀態,監聽已經報錯,監聽日誌中報錯為WARNING: Subscription for node down event still pending監聽配置檔案:
[oracle@bys3 admin]$ cat listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = bys3.bys.com)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
ADR_BASE_LISTENER = /u01
啟動監聽並檢視狀態--檢視狀態要在監聽啟動後稍等一下檢視,會報錯。剛啟動完成時還是正常的。
[oracle@bys3 admin]$ lsnrctl start ---啟動監聽
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 18-NOV-2013 10:26:44
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Starting /u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 11.2.0.4.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /u01/diag/tnslsnr/bys3/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=bys3.bys.com)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=bys3.bys.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 18-NOV-2013 10:26:45
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/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/diag/tnslsnr/bys3/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=bys3.bys.com)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
The listener supports no services
The command completed successfully
[oracle@bys3 admin]$ lsnrctl status ---監聽啟動後,稍等一下,檢視狀態,監聽程式已經掛了。
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 18-NOV-2013 10:27:09
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=bys3.bys.com)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
############################################################################################
監聽配置二:把預設監聽配置檔案中(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))這一行刪除
此時重啟監聽,然後稍等(大約一分鐘後)檢查監聽狀態,監聽已經報錯,監聽日誌中報錯為WARNING: Subscription for node down event still pending監聽配置檔案:
[oracle@bys3 admin]$ cat listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = bys3.bys.com)(PORT = 1521))
)
)
ADR_BASE_LISTENER = /u01
[oracle@bys3 admin]$ lsnrctl start ---啟動監聽--輸出資訊和上一步監聽配置一中一樣,不太重要的資訊就不貼了。
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 18-NOV-2013 10:37:24
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=bys3.bys.com)(PORT=1521)))
The listener supports no services
The command completed successfully
[oracle@bys3 admin]$ lsnrctl status ---監聽啟動後,稍等一下,檢視狀態,監聽程式已經掛了。
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 18-NOV-2013 10:39:12
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=bys3.bys.com)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
############################################################################################
監聽配置三:把預設監聽配置檔案中(ADDRESS = (PROTOCOL = TCP)(HOST = bys3.bys.com)(PORT = 1521))這一行的HOST中的域名改為IP
此時重啟監聽,然後稍等(大約一分鐘後)檢查監聽狀態,監聽已經報錯,監聽日誌中報錯為WARNING: Subscription for node down event still pending監聽配置檔案:
[oracle@bys3 admin]$ cat listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.211)(PORT = 1521))
)
)
ADR_BASE_LISTENER = /u01
[oracle@bys3 admin]$ ping 192.168.1.211
PING 192.168.1.211 (192.168.1.211) 56(84) bytes of data.
64 bytes from 192.168.1.211: icmp_seq=1 ttl=64 time=1.04 ms
[oracle@bys3 admin]$ lsnrctl start ---啟動監聽--輸出資訊和監聽配置一中一樣,不太重要的資訊就不貼了。
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.211)(PORT=1521)))
The listener supports no services
The command completed successfully
[oracle@bys3 admin]$ lsnrctl status ---監聽啟動後,稍等一下,檢視狀態,監聽程式已經掛了。
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 18-NOV-2013 10:42:27
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.211)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
############################################################################################
實驗三:模擬出錯的場景為修改127.0.0.1 bys3.bys.com bys3,但是刪除192.168.1.211 bys3.bys.com bys3條目。使用DBCA預設建立的listener.ora
此時重啟監聽,然後稍等(大約一分鐘後)檢查監聽狀態,監聽已經報錯,監聽日誌中報錯為WARNING: Subscription for node down event still pending監聽配置檔案:
[root@bys3 ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
#127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
#192.168.1.211 bys3.bys.com bys3
127.0.0.1 bys3.bys.com bys3
[root@bys3 ~]# ping bys3.bys.com
PING bys3.bys.com (127.0.0.1) 56(84) bytes of data.
64 bytes from bys3.bys.com (127.0.0.1): icmp_seq=1 ttl=64 time=0.305 ms
^C
[root@bys3 ~]# ping bys3
PING bys3.bys.com (127.0.0.1) 56(84) bytes of data.
64 bytes from bys3.bys.com (127.0.0.1): icmp_seq=1 ttl=64 time=0.114 ms
^C
[oracle@bys3 admin]$ cat listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = bys3.bys.com)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
ADR_BASE_LISTENER = /u01
[oracle@bys3 admin]$ lsnrctl start ---啟動監聽--輸出資訊和上一步監聽配置一中一樣,不太重要的資訊就不貼了。
The listener supports no services
The command completed successfully
[oracle@bys3 admin]$ lsnrctl status --監聽啟動後,稍等一下,檢視狀態,監聽程式已經掛了。
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 18-NOV-2013 11:13:48
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=bys3.bys.com)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
相關文章
- .監聽日誌錯誤: WARNING: Subscription for node down event still pending
- WARNING: Subscription for node down event still pending
- listener.log中報Warning: Subscription For Node Down Event Still Pending問題的解決方法
- AIX maxperm引數導致監聽問題AI
- RAC因為localhost磁碟空間不夠導致has程式掛起localhost
- Oracle監聽日誌過大導致的問題Oracle
- WPF 已知問題 監聽 WMI 事件導致觸控失效事件
- 解決 allure.dynamic.parameter 不生效問題 或者 allure 報告中因為引數導致排版的問題
- /etc/hosts檔案不可讀導致10.2.0.3資料庫不能起來資料庫
- start_udev導致監聽自動停止問題處理dev
- ORA-21561: OID generation failed hostname與/etc/hosts不一致導致安裝報錯AI
- SOA Suite Purge Log 指令碼報錯問題ORA-20001: Jobs still running or not shut downUI指令碼
- 一個拷貝操作導致的潛在監聽類問題
- 因為arp 問題導致的vip 故障與解決方案
- rac 本地監聽問題導致資料斷斷續續連線
- 記一次 hosts 檔案配置錯誤導致應用卡頓的奇葩問題
- 因為跨域問題導致的無法讀取 response header跨域Header
- 比較罕見的一個問題,磁碟檔案數目太多導致的LISTENER監聽起不來
- 特斯拉因Model3致命事故被起訴:懸掛故障導致汽車失控
- 在K8S中,如果是因為開發寫的映象問題導致pod起不來該怎麼排查?K8S
- sqlldr標準輸出未處理導致批處理掛起問題SQL
- [轉帖]JFR 定位因為 SSL 導致 CPU Load 飈高的問題
- deleted事件監聽報錯delete事件
- pyOpenSSL版本問題導致Scrapy安裝報錯,打補丁
- 網路問題導致10g CRS監聽服務offline 處理
- 一次因為修改環境變數導致RESIN不能啟動的問題變數
- DB Link因 driving_site導致的效能問題
- 記一次crontab中date命令錯用導致的問題
- oracle的監聽問題Oracle
- Oracle監聽日誌2g-監聽啟動報錯Oracle
- 模型deleted事件監聽報錯解析模型delete事件
- 因為一個小小的Integer問題導致阿里一面沒過,遺憾!阿里
- 關於RMAN-08137: WARNING: archive log not deleted as it is still needed問題的分析Hivedelete
- 解決Vagrant報錯Warning: Authentication failure. Retrying問題AI
- 導致 Scan VIP 和 Scan Listener(監聽程式)出現故障的最常見的 5 個問題
- Oracle資料庫的監聽器掛起情況Oracle資料庫
- Event-Listerner事件監聽模式事件模式
- 執行計劃中的COLLECTION ITERATOR PICKLER FETCH導致的效能問題