189 8069 5689

检查监听报错:WARNING:Subscriptionfornodedowneventstillpending该如何解决

报错:WARNING:Subscription for node down event still pending该如何解决,很多新手对此不是很清楚,为了帮助大家解决这个难题,下面小编将为大家详细讲解,有这方面需求的人可以来学习下,希望你能有所收获。

抚远网站制作公司哪家好,找创新互联公司!从网页设计、网站建设、微信开发、APP开发、响应式网站等网站项目制作,到程序开发,运营维护。创新互联公司从2013年成立到现在10年的时间,我们拥有了丰富的建站经验和运维经验,来保证我们的工作的顺利进行。专注于网站建设就选创新互联公司

问题描述:监听重启后稍等(大约一分钟后)检查监听状态,监听已经报错:  
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:Subscriptionfornodedowneventstillpending该如何解决
网页网址:http://cdxtjz.cn/article/jsisgi.html

其他资讯