SQL*Plus: Release 12.2.0.1.0
Red Hat Enterprise Linux Server release 6.8 (Santiago)
数据库监听存在问题,tnsping数据库固定10.95.10.5不能连接数据库。
10.95.10.5 db03
192.95.10.5 db03-priv
10.95.10.6 db03-vip
故障现象:
tnsping 10.95.10.5
TNS Ping Utility for Linux: Version 12.2.0.1.0 - Production on 31-MAY-2018 14:09:16
Copyright (c) 1997, 2016, Oracle. All rights reserved.
Used parameter files:
/u01/soft/network/admin/sqlnet.ora
Used EZCONNECT adapter to resolve the alias
Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=(PROTOCOL=TCP)(HOST=10.95.10.5)(PORT=1521)))
TNS-12541: TNS:no listener
数据库为集群环境:
grid 查看数据库监听:
[grid@db03 ~]$ lsnrctl status
LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 31-MAY-2018 14:06:19
Copyright (c) 1991, 2016, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date 31-MAY-2018 13:25:42
Uptime 0 days 0 hr. 40 min. 36 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/soft/network/admin/listener.ora
Listener Log File /u01/app/grid/diag/tnslsnr/db03/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.95.10.6)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM3", status READY, has 1 handler(s) for this service...
Service "+ASM_DATA" has 1 instance(s).
Instance "+ASM3", status READY, has 1 handler(s) for this service...
Service "wsjr" has 1 instance(s).
Instance "wsjr3", status READY, has 1 handler(s) for this service...
Service "wsjrXDB" has 1 instance(s).
Instance "wsjr3", status READY, has 1 handler(s) for this service...
The command completed successfully
oracle 查看数据库监听:
[oracle@db03 ~]$ lsnrctl status
LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 31-MAY-2018 14:10:14
Copyright (c) 1991, 2016, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
检查/etc/hosts:
[oracle@db03 ~]$ cat /etc/hosts
127.0.0.1 localhost.localdomain localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost.localdomain localhost.localdomain localhost6 localhost6.localdomain6 db03
10.95.10.1 db01
192.95.10.1 db01-priv
10.95.10.3 db02
192.95.10.3 db02-priv
10.95.10.5 db03
192.95.10.5 db03-priv
10.95.10.7 db04
192.95.10.7 db04-priv
10.95.10.10 scan
10.95.10.2 db01-vip
10.95.10.4 db02-vip
10.95.10.6 db03-vip
10.95.10.8 db04-vip
测试主机ping:
oracle@db03 ~]$ ping db03
PING localhost.localdomain (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=1 ttl=64 time=0.017 ms
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=2 ttl=64 time=0.028 ms
故障解决方案:
1,删除hosts文件 第二行 主机名称:
127.0.0.1 localhost.localdomain localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost.localdomain localhost.localdomain localhost6 localhost6.localdomain6 db03 《《======删除db03!!
2,使用grid用户重启监听程序
lsnrctl stop
lsnrctl start
3,故障解决
[grid@db03 ~]$ lsnrctl status
LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 31-MAY-2018 14:14:10
Copyright (c) 1991, 2016, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date 31-MAY-2018 14:14:01
Uptime 0 days 0 hr. 0 min. 8 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/soft/network/admin/listener.ora
Listener Log File /u01/app/grid/diag/tnslsnr/db03/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.95.10.5)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.95.10.6)(PORT=1521)))
Services Summary...
Service "wsjr" has 1 instance(s).
Instance "wsjr3", status READY, has 1 handler(s) for this service...
Service "wsjrXDB" has 1 instance(s).
Instance "wsjr3", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@db03 ~]$ lsnrctl status
LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 31-MAY-2018 14:14:32
Copyright (c) 1991, 2016, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date 31-MAY-2018 14:14:01
Uptime 0 days 0 hr. 0 min. 30 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/soft/network/admin/listener.ora
Listener Log File /u01/app/grid/diag/tnslsnr/db03/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.95.10.5)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.95.10.6)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM3", status READY, has 1 handler(s) for this service...
Service "+ASM_DATA" has 1 instance(s).
Instance "+ASM3", status READY, has 1 handler(s) for this service...
Service "wsjr" has 1 instance(s).
Instance "wsjr3", status READY, has 1 handler(s) for this service...
Service "wsjrXDB" has 1 instance(s).
Instance "wsjr3", status READY, has 1 handler(s) for this service...
The command completed successfully
Red Hat Enterprise Linux Server release 6.8 (Santiago)
数据库监听存在问题,tnsping数据库固定10.95.10.5不能连接数据库。
10.95.10.5 db03
192.95.10.5 db03-priv
10.95.10.6 db03-vip
故障现象:
tnsping 10.95.10.5
TNS Ping Utility for Linux: Version 12.2.0.1.0 - Production on 31-MAY-2018 14:09:16
Copyright (c) 1997, 2016, Oracle. All rights reserved.
Used parameter files:
/u01/soft/network/admin/sqlnet.ora
Used EZCONNECT adapter to resolve the alias
Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=(PROTOCOL=TCP)(HOST=10.95.10.5)(PORT=1521)))
TNS-12541: TNS:no listener
数据库为集群环境:
grid 查看数据库监听:
[grid@db03 ~]$ lsnrctl status
LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 31-MAY-2018 14:06:19
Copyright (c) 1991, 2016, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date 31-MAY-2018 13:25:42
Uptime 0 days 0 hr. 40 min. 36 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/soft/network/admin/listener.ora
Listener Log File /u01/app/grid/diag/tnslsnr/db03/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.95.10.6)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM3", status READY, has 1 handler(s) for this service...
Service "+ASM_DATA" has 1 instance(s).
Instance "+ASM3", status READY, has 1 handler(s) for this service...
Service "wsjr" has 1 instance(s).
Instance "wsjr3", status READY, has 1 handler(s) for this service...
Service "wsjrXDB" has 1 instance(s).
Instance "wsjr3", status READY, has 1 handler(s) for this service...
The command completed successfully
oracle 查看数据库监听:
[oracle@db03 ~]$ lsnrctl status
LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 31-MAY-2018 14:10:14
Copyright (c) 1991, 2016, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
检查/etc/hosts:
[oracle@db03 ~]$ cat /etc/hosts
127.0.0.1 localhost.localdomain localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost.localdomain localhost.localdomain localhost6 localhost6.localdomain6 db03
10.95.10.1 db01
192.95.10.1 db01-priv
10.95.10.3 db02
192.95.10.3 db02-priv
10.95.10.5 db03
192.95.10.5 db03-priv
10.95.10.7 db04
192.95.10.7 db04-priv
10.95.10.10 scan
10.95.10.2 db01-vip
10.95.10.4 db02-vip
10.95.10.6 db03-vip
10.95.10.8 db04-vip
测试主机ping:
oracle@db03 ~]$ ping db03
PING localhost.localdomain (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=1 ttl=64 time=0.017 ms
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=2 ttl=64 time=0.028 ms
故障解决方案:
1,删除hosts文件 第二行 主机名称:
127.0.0.1 localhost.localdomain localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost.localdomain localhost.localdomain localhost6 localhost6.localdomain6 db03 《《======删除db03!!
2,使用grid用户重启监听程序
lsnrctl stop
lsnrctl start
3,故障解决
[grid@db03 ~]$ lsnrctl status
LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 31-MAY-2018 14:14:10
Copyright (c) 1991, 2016, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date 31-MAY-2018 14:14:01
Uptime 0 days 0 hr. 0 min. 8 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/soft/network/admin/listener.ora
Listener Log File /u01/app/grid/diag/tnslsnr/db03/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.95.10.5)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.95.10.6)(PORT=1521)))
Services Summary...
Service "wsjr" has 1 instance(s).
Instance "wsjr3", status READY, has 1 handler(s) for this service...
Service "wsjrXDB" has 1 instance(s).
Instance "wsjr3", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@db03 ~]$ lsnrctl status
LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 31-MAY-2018 14:14:32
Copyright (c) 1991, 2016, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date 31-MAY-2018 14:14:01
Uptime 0 days 0 hr. 0 min. 30 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/soft/network/admin/listener.ora
Listener Log File /u01/app/grid/diag/tnslsnr/db03/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.95.10.5)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.95.10.6)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM3", status READY, has 1 handler(s) for this service...
Service "+ASM_DATA" has 1 instance(s).
Instance "+ASM3", status READY, has 1 handler(s) for this service...
Service "wsjr" has 1 instance(s).
Instance "wsjr3", status READY, has 1 handler(s) for this service...
Service "wsjrXDB" has 1 instance(s).
Instance "wsjr3", status READY, has 1 handler(s) for this service...
The command completed successfully
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/20747382/viewspace-2155410/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/20747382/viewspace-2155410/