您好,登錄后才能下訂單哦!
報(bào)錯(cuò):WARNING:Subscription for node down event still pending該如何解決,很多新手對此不是很清楚,為了幫助大家解決這個(gè)難題,下面小編將為大家詳細(xì)講解,有這方面需求的人可以來學(xué)習(xí)下,希望你能有所收獲。
問題描述:監(jiān)聽重啟后稍等(大約一分鐘后)檢查監(jiān)聽狀態(tài),監(jiān)聽已經(jīng)報(bào)錯(cuò):
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
-----其實(shí)上面這種報(bào)錯(cuò)就是監(jiān)聽沒啟動(dòng)--至于未啟動(dòng)的原因,可能是程序確實(shí)未啟動(dòng)或進(jìn)程被KILL、掛起等各種原因總之是程序沒啟動(dòng)。
檢查日志發(fā)現(xiàn)有一條信息:WARNING: Subscription for node down event still pending
搜索此條報(bào)錯(cuò)的信息,網(wǎng)上解答大致兩種情況是:
情況一:Oracle 顯示該問題為bug,并在10.2.0.3中已修復(fù),但是在11.1.0.6中仍然存在。
情況二:監(jiān)聽無法在指定端口啟動(dòng)--可能前一次監(jiān)聽未正常退出或有其它程序占用了端口
但是回想此前監(jiān)聽程序一直運(yùn)行正常,也查看了端口無異常。報(bào)著有錯(cuò)誤先從自身查起的心態(tài),回憶了最近對系統(tǒng)做過的所有變更。
從修改監(jiān)聽配置文件listener.ora、tnsnames.ora、動(dòng)態(tài)監(jiān)聽的注冊都檢查了多遍。重建了多次監(jiān)聽均無法解決此故障。
終于想起了修改過/etc/hosts中的信息,于是重新修改此文件,將127.0.0.1條目恢復(fù)為系統(tǒng)默認(rèn)的:127.0.0.1 localhost.localdomain localhost。
重啟監(jiān)聽正常
下面重現(xiàn)一下此錯(cuò)誤的產(chǎn)生和解決。
實(shí)驗(yàn)思路說明: --一些無意義的輸出就省略了未貼出。可以直接在文章左上的文章名下目錄查看需要的小節(jié)。
實(shí)驗(yàn)一是正確配置/etc/hosts及監(jiān)聽正常運(yùn)行的狀態(tài);
實(shí)驗(yàn)二模擬出錯(cuò)的場景為修改127.0.0.1 bys3.bys.com bys3,增加192.168.1.211 bys3.bys.com ,并分別修改listener.ora的三小步。
實(shí)驗(yàn)三模擬出錯(cuò)的場景為修改127.0.0.1 bys3.bys.com bys3,但是刪除192.168.1.211 bys3.bys.com bys3條目。使用DBCA默認(rèn)創(chuàng)建的listener.ora
#########################################################################################################################
127.0.0.1 localhost.localdomain localhost;192.168.1.211 bys3.bys.com bys3條目依然保留。
重新啟動(dòng)監(jiān)聽可以正常。
[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 --監(jiān)聽已經(jīng)正常運(yùn)行,實(shí)例已經(jīng)注冊進(jìn)來了。--動(dòng)態(tài)注冊
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
###############################################################################################################
將127.0.0.1 localhost.localdomain localhost條目改為127.0.0.1 bys3.bys.com bys3后,
再增加一條IP與域名對應(yīng)即: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條目后,分別實(shí)驗(yàn)了以下三種情況(均為修改listener.ora文件),
監(jiān)聽日志中的報(bào)錯(cuò)信息均為:WARNING: Subscription for node down event still pending
此時(shí)重啟監(jiān)聽,然后稍等(大約一分鐘后)檢查監(jiān)聽狀態(tài),監(jiān)聽已經(jīng)報(bào)錯(cuò),監(jiān)聽日志中報(bào)錯(cuò)為WARNING: Subscription for node down event still pending
監(jiān)聽配置文件:
[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
啟動(dòng)監(jiān)聽并查看狀態(tài)--查看狀態(tài)要在監(jiān)聽啟動(dòng)后稍等一下查看,會(huì)報(bào)錯(cuò)。剛啟動(dòng)完成時(shí)還是正常的。
[oracle@bys3 admin]$ lsnrctl start ---啟動(dòng)監(jiān)聽
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 ---監(jiān)聽啟動(dòng)后,稍等一下,查看狀態(tài),監(jiān)聽程序已經(jīng)掛了。
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
############################################################################################
此時(shí)重啟監(jiān)聽,然后稍等(大約一分鐘后)檢查監(jiān)聽狀態(tài),監(jiān)聽已經(jīng)報(bào)錯(cuò),監(jiān)聽日志中報(bào)錯(cuò)為WARNING: Subscription for node down event still pending
監(jiān)聽配置文件:
[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 ---啟動(dòng)監(jiān)聽--輸出信息和上一步監(jiān)聽配置一中一樣,不太重要的信息就不貼了。
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 ---監(jiān)聽啟動(dòng)后,稍等一下,查看狀態(tài),監(jiān)聽程序已經(jīng)掛了。
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
############################################################################################
此時(shí)重啟監(jiān)聽,然后稍等(大約一分鐘后)檢查監(jiān)聽狀態(tài),監(jiān)聽已經(jīng)報(bào)錯(cuò),監(jiān)聽日志中報(bào)錯(cuò)為WARNING: Subscription for node down event still pending
監(jiān)聽配置文件:
[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 ---啟動(dòng)監(jiān)聽--輸出信息和監(jiān)聽配置一中一樣,不太重要的信息就不貼了。
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 ---監(jiān)聽啟動(dòng)后,稍等一下,查看狀態(tài),監(jiān)聽程序已經(jīng)掛了。
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
############################################################################################
此時(shí)重啟監(jiān)聽,然后稍等(大約一分鐘后)檢查監(jiān)聽狀態(tài),監(jiān)聽已經(jīng)報(bào)錯(cuò),監(jiān)聽日志中報(bào)錯(cuò)為WARNING: Subscription for node down event still pending
監(jiān)聽配置文件:
[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 ---啟動(dòng)監(jiān)聽--輸出信息和上一步監(jiān)聽配置一中一樣,不太重要的信息就不貼了。
The listener supports no services
The command completed successfully
[oracle@bys3 admin]$ lsnrctl status --監(jiān)聽啟動(dòng)后,稍等一下,查看狀態(tài),監(jiān)聽程序已經(jīng)掛了。
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
看完上述內(nèi)容是否對您有幫助呢?如果還想對相關(guān)知識有進(jìn)一步的了解或閱讀更多相關(guān)文章,請關(guān)注億速云行業(yè)資訊頻道,感謝您對億速云的支持。
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。