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

57次阅读
没有评论

共计 11557 个字符,预计需要花费 29 分钟才能阅读完成。

行业资讯    
数据库    
关系型数据库    
检查监听报错:WARNING:Subscription for node down event still pending 该如何解决

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

问题描述:监听重启后稍等(大约一分钟后)检查监听状态,监听已经报错: 
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

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

正文完
 
丸趣
版权声明:本站原创文章,由 丸趣 2023-07-17发表,共计11557字。
转载说明:除特殊说明外本站除技术相关以外文章皆由网络搜集发布,转载请注明出处。
评论(没有评论)