今天一个客户反馈,数据库的监听程序无法查看,lsnrctl status命令执行后一直卡着没反应。
远程连接分析,是RAC集群数据库,检查集群状态,ora.LISTENER.lsnr资源处于INTERMEDIATE、CHECK TIMED 状态;依次排除主机系统CPU等负载高、数据库监听日志大等常见问题;就在准备做进程状态TRACE时,看着lsnrctl status命令执行后一直卡着没反应,是在查找IP阶段,突然想到一个典型问题就是DNS的。查看DNS配置文件,果然配置了多个IP并且均不通,lsnrctl status时需要等待这些IP的超时所以很慢;后了解到此LINUX服务器登陆时也很慢,与此DNS配置有关。
注释DNS中的配置后,系统恢复正常。
[grid@test-DB-1 ~]$ crsctl stat res -t标签:-------------------------------------------------------------------------------- From: https://blog.51cto.com/u_1652968/6085593
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.FRA.dg
ONLINE ONLINE test-db-1
ONLINE ONLINE test-db-2
ora.LISTENER.lsnr
ONLINE ONLINE test-db-1
ONLINE INTERMEDIATE test-db-2 CHECK TIMED OUT
ora.OCR1.dg
ONLINE ONLINE test-db-1
ONLINE ONLINE test-db-2
ora.ORADATA.dg
ONLINE ONLINE test-db-1
ONLINE ONLINE test-db-2
ora.ORADATA02.dg
ONLINE ONLINE test-db-1
ONLINE ONLINE test-db-2
ora.asm
ONLINE ONLINE test-db-1 Started
ONLINE ONLINE test-db-2 Started
ora.eons
ONLINE ONLINE test-db-1
ONLINE ONLINE test-db-2
ora.gsd
ONLINE ONLINE test-db-1
ONLINE ONLINE test-db-2
ora.net1.network
ONLINE ONLINE test-db-1
ONLINE ONLINE test-db-2
ora.ons
ONLINE ONLINE test-db-1
ONLINE ONLINE test-db-2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE test-db-2
ora.test-db-1.vip
1 ONLINE ONLINE test-db-1
ora.test-db-2.vip
1 ONLINE ONLINE test-db-2
ora.oc4j
1 ONLINE ONLINE test-db-2
ora.orcl.db
1 OFFLINE OFFLINE
2 ONLINE ONLINE test-db-2 Open
ora.scan1.vip
1 ONLINE ONLINE test-db-2
[grid@test-DB-1 ~]$ exit
logout
You have mail in /var/spool/mail/root
[root@test-DB-1 diag]#
[root@test-DB-1 diag]#
[root@test-DB-1 diag]# vi /etc/resolv.conf
# Generated by NetworkManager
#nameserver 10.60.9.1
#nameserver 8.8.8.8
#nameserver 223.5.5.5
#nameserver 223.6.6.6
#nameserver 8.8.8.8
~
~
"/etc/resolv.conf" 6L, 136C written
[root@test-DB-1 diag]# su - grid
[grid@test-DB-1 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.FRA.dg
ONLINE ONLINE test-db-1
ONLINE ONLINE test-db-2
ora.LISTENER.lsnr
ONLINE ONLINE test-db-1
ONLINE ONLINE test-db-2
ora.OCR1.dg
ONLINE ONLINE test-db-1
ONLINE ONLINE test-db-2
ora.ORADATA.dg
ONLINE ONLINE test-db-1
ONLINE ONLINE test-db-2
ora.ORADATA02.dg
ONLINE ONLINE test-db-1
ONLINE ONLINE test-db-2
ora.asm
ONLINE ONLINE test-db-1 Started
ONLINE ONLINE test-db-2 Started
ora.eons
ONLINE ONLINE test-db-1
ONLINE ONLINE test-db-2
ora.gsd
ONLINE ONLINE test-db-1
ONLINE ONLINE test-db-2
ora.net1.network
ONLINE ONLINE test-db-1
ONLINE ONLINE test-db-2
ora.ons
ONLINE ONLINE test-db-1
ONLINE ONLINE test-db-2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE test-db-2
ora.test-db-1.vip
1 ONLINE ONLINE test-db-1
ora.test-db-2.vip
1 ONLINE ONLINE test-db-2
ora.oc4j
1 ONLINE ONLINE test-db-2
ora.orcl.db
1 OFFLINE OFFLINE
2 ONLINE ONLINE test-db-2 Open
ora.scan1.vip
1 ONLINE ONLINE test-db-2
[grid@test-DB-1 ~]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 03-SEP-2021 13:28:29
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 03-SEP-2021 13:23:52
Uptime 0 days 0 hr. 4 min. 36 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/grid/11.2.0.1/network/admin/listener.ora
Listener Log File /u01/oracle/diag/tnslsnr/test-DB-1/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.60.9.12)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.60.9.14)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "orcl" has 1 instance(s).
Instance "orcl1", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
Instance "orcl1", status READY, has 1 handler(s) for this service...
The command completed successfully
[grid@test-DB-1 ~]$