温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

检查监听报错:WARNING:Subscription for node down event still pending该如何解决

发布时间:2021-12-14 17:25:17 来源:亿速云 阅读:789 作者:柒染 栏目:关系型数据库

报错: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
#########################################################################################################################

实验一:将/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

看完上述内容是否对您有帮助呢?如果还想对相关知识有进一步的了解或阅读更多相关文章,请关注亿速云行业资讯频道,感谢您对亿速云的支持。

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI