错误:如何解决节点关闭事件的警告:订阅仍然悬而未决的问题,很多新手对此不是很清楚。为了帮助大家解决这个问题,下面小编就为大家详细讲解一下。需要的人可以从中学习,希望你能有所收获。
描述:显示器重新启动后等待一分钟(大约一分钟后)检查监听状态,显示器报告了一个错误:
TNS-12541: TNS 3360无监听器
TNS-12560: TNS :协议适配器错误
TNS-00511:无监听器
Linux错误: 111:连接被拒绝
-其实上面的错误是显示器没有启动。至于不启动的原因,可能是程序没有启动或者进程被KILL或者挂起。总之,程序没有启动。
查看日志,找到一条消息:WARNING: Subscription for node down event still pending.
搜索此错误消息并在线回答时,大致有两种情况:
情况1:甲骨文显示这个问题是一个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 bys 3,添加了192.168.1.211的bys3.bys.com,分别修改了listener.ora的三个小步骤。
在第三个实验中,模拟错误的场景是修改了127 . 0 . 0 . 1 bys3.bys.com bys 3,但删除了192 . 168 . 1 . 211 bys3.bys.com bys 3条目。使用默认情况下由DBCA创建的listener.ora。
#########################################################################################################################
实验一:将/etc/hosts中127.0.0.1条目设置为默认的:
127 . 0 . 0 . 1 localhost . local domain localhost;192 . 168 . 1 . 211 S3进入bys3.bys.com的情况依然存在。
重启监控可以正常进行。
[root@bys3 ~]# cat /etc/hosts
127 . 0 . 0 . 1 localhost . local domain localhost
:1 localhost 6 . localdomain 6 localhost 6
192 . 168 . 1 . 211 bys3.bys.com by 3
[root @ by 3 ~]# ping by 3
PING bys3.bys.com(192 . 168 . 1 . 211)56(84)字节的数据。
来自bys3.bys.com的64字节(192 . 168 . 1 . 211): icmp _ seq=1 TTL=64时间=0.232毫秒
C
-bys3.bys.com平统计-
发送1个数据包,接收1个数据包,0%数据包丢失,时间0毫秒
br/>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
看完上述内容是否对您有帮助呢?如果还想对相关知识有进一步的了解或阅读更多相关文章,请关注行业资讯频道,感谢您对的支持。
内容来源网络,如有侵权,联系删除,本文地址:https://www.230890.com/zhan/146009.html