案例:(环境:hp小机,
10G rac)
今天早上一客户发现连接不上数据库,反馈。
处理过程:
登录服务器发现有一台服务器集群监听处于关闭状态,lsnrctl status发现监听处于卡死状态,无法进行正常的关闭,重启
查看监听日志报错TNS-12545, 另一台服务器监听正常,所以不着急……稳住,慢慢看。
$crs_stat -t
既然从集群里面看到监听关了,那就找到监听进程杀掉
$ ps -ef |grep tnslsnr
grid 3232 1 0 10:59 ? 00:00:00 /g01/11ggrid/app/11.2.0/grid/bin/tnslsnr LISTENER_SCAN1 -inherit
kill -15 3232
lsnrctl start启动监听,监听状态恢复正常,但集群中监听状态仍然是offline
原因:srvctl操作的监听是listener_rac1,而lsnrctl操作的默认监听时CRS不会online,或者说lsnrctl操作的监听反馈不到CRS?
srvctl config listener -n rac1
解决办法:
lsnrctl stop --关闭监听
srvctl start listener -n rac1 --开启监听服务(rac1为主机名)
不过后来自己在11g库上做测试,没有发现这个问题。
此时恢复正常,附上listener.ora
LISTENER_RAC1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac1-vip)(PORT = 1521)(IP = FIRST))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.11)(PORT = 1521)(IP = FIRST))
)
)
SID_LIST_LISTENER_RAC1 =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
(PROGRAM = extproc)
)
)
建议:RAC重启监听的话建议还是用srvctl
参考文档,感谢……ttp://www.xifenfei.com/2012/03/%E5%9C%A8rac%E4%B8%ADlsnrctl%E5%92%8Csrvctl%E6%93%8D%E4%BD%9C%E7%9B%91%E5%90%AC%E5%8C%BA%E5%88%AB.html
处理过程:
登录服务器发现有一台服务器集群监听处于关闭状态,lsnrctl status发现监听处于卡死状态,无法进行正常的关闭,重启
查看监听日志报错TNS-12545, 另一台服务器监听正常,所以不着急……稳住,慢慢看。
$crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.....XFF.cs application ONLINE ONLINE rac1
ora....db1.srv application ONLINE ONLINE rac2
ora.devdb.db application ONLINE ONLINE rac2
ora....b1.inst application ONLINE ONLINE rac1
ora....b2.inst application ONLINE ONLINE rac2
ora....SM1.asm application ONLINE ONLINE rac1
ora....C1.lsnr application OFFLINE OFFLINE
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip application ONLINE ONLINE rac1
ora....SM2.asm application ONLINE ONLINE rac2
ora....C2.lsnr application ONLINE ONLINE rac2
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip application ONLINE ONLINE rac2
既然从集群里面看到监听关了,那就找到监听进程杀掉
$ ps -ef |grep tnslsnr
grid 3232 1 0 10:59 ? 00:00:00 /g01/11ggrid/app/11.2.0/grid/bin/tnslsnr LISTENER_SCAN1 -inherit
kill -15 3232
lsnrctl start启动监听,监听状态恢复正常,但集群中监听状态仍然是offline
原因:srvctl操作的监听是listener_rac1,而lsnrctl操作的默认监听时CRS不会online,或者说lsnrctl操作的监听反馈不到CRS?
srvctl config listener -n rac1
解决办法:
lsnrctl stop --关闭监听
srvctl start listener -n rac1 --开启监听服务(rac1为主机名)
不过后来自己在11g库上做测试,没有发现这个问题。
此时恢复正常,附上listener.ora
LISTENER_RAC1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac1-vip)(PORT = 1521)(IP = FIRST))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.11)(PORT = 1521)(IP = FIRST))
)
)
SID_LIST_LISTENER_RAC1 =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
(PROGRAM = extproc)
)
)
建议:RAC重启监听的话建议还是用srvctl
参考文档,感谢……ttp://www.xifenfei.com/2012/03/%E5%9C%A8rac%E4%B8%ADlsnrctl%E5%92%8Csrvctl%E6%93%8D%E4%BD%9C%E7%9B%91%E5%90%AC%E5%8C%BA%E5%88%AB.html
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29618264/viewspace-2148250/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/29618264/viewspace-2148250/