TNS-12541,TNS-12560,TNS-00511,TNS-12542,TNS-12560,T

页面导航:首页 > 数据库 > DB2 > TNS-12541,TNS-12560,TNS-00511,TNS-12542,TNS-12560,T

TNS-12541,TNS-12560,TNS-00511,TNS-12542,TNS-12560,T

来源: 作者: 时间:2016-01-23 11:15 【

第 1章 数据库服务器监听错误1 1 1数据库监听错误1 1 1 1 问题及现象服务器环境为ORACLE11G RAC环境,系统启动后,监听没起来。[[email protected] ~]$ lsnrctl statusLSNRCTL for Linux: Version

 

第 1章 服务器监听错误

1.1.1数据库监听错误

1.1.1.1 问题及现象

服务器环境为ORACLE11G RAC环境,系统启动后,监听没起来。

[[email protected] ~]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 29-JUN-2015 10:44:45
Copyright (c) 1991, 2011, 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

1.1.1.2 检查思路

 

当时同事已经检查过CRS、也尝试过使用命令启动监听等步骤。但是启动监听的时候会有以下报错

 

[[email protected] ~]$ lsnrctl start
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 29-JUN-2015 10:51:46
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Starting /u01/app/oracle/product/11.2.0/db_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Log messages written to /u01/app/oracle/diag/tnslsnr/RAC4/listener/alert/log.xml
Error listening on: (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
TNS-12542: TNS:address already in use
TNS-12560: TNS:protocol adapter error
TNS-00512: Address already in use
Linux Error: 98: Address already in use

Listener failed to start. See the error message(s) above...

 

居然说系统已使用,那么理所当然的就去查看1521端口和lsn进程

 

[[email protected] ~]# ps-ef | grep lsn

grid 52181 1 0 10:04? 00:00:11/u01/*/*/bin/tnslsnrLISTENER_SCAN1 -inherit

root 101600 100759 0 22:30 pts/0 00:00:00 grep lsn

[[email protected] ~]#netstat-anp | grep 1521

tcp 0 0xxx.xxx.xxx.xxx:1521 0.0.0.0:* LISTEN 52181/tnslsnr (有些内容不便列出)

 

发现1521端口和/u01/11.2.0/grid/bin/tnslsnrLISTENER_SCAN1-inherit进程存在,所以尝试杀掉此进程

 

[[email protected] ~]#kill -9 52181

-bash: kill:(52181) - No suchprocess

 

杀掉后发现系统提示没有这个进程,再次查询

 

 

[[email protected] ~]# ps-ef |grep lsn

grid 104147 1 0 23:23? 00:00:00/u01/*/*/bin/tnslsnrLISTENER_SCAN1 -inherit

root 104379 104353 0 23:28 pts/0 00:00:00 grep lsn

 

又有了,应该是父进程自动又给他启动了,查看其父进程是init进程。

 

[[email protected] ~]$pstree 1

init─┬─MBADataMover───MBADataMover───MBADataMover

├─2*[tnslsnr───2*[{tnslsnr}]]

 

 

 

1.1.1.3 出现问题的原因

 

因为我记得在书上看到过,11G的RAC中SRVCTL可以管理监听,于是尝试使用此命令来启动监听。

 

1.1.1.4 解决方法

[[email protected] ~]$srtl start listener -n RAC4

 

[[email protected]~]$ exit

logout

[[email protected]~]# su -oracle

[[email protected]~]$lsnrctl status;

 

LSNRCTLfor Linux:Version 11.2.0.3.0 - Production on 01-JUL-2015 11:32:45

 

Copyright(c) 1991,2011, . All rightsreserved.

 

Connectingto(ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))

STATUSof theLISTENER

------------------------

Alias LISTENER

Version TNSLSNR for : Version11.2.0.3.0 - Production

StartDate 01-JUL-2015 10:38:57

Uptime 0 days 0 hr. 53 min. 47 sec

TraceLevel off

Security ON: Local OS Authentication

SNMP OFF

ListenerParameterFile /u01/11.2.0/grid/network/admin/listener.ora

ListenerLogFile /u01/app/oracle/diag/tnslsnr/RAC4/listener/alert/log.xml

ListeningEndpointsSummary...

(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=11.10.110.23)(PORT=1521)))

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=11.10.110.25)(PORT=1521)))

ServicesSummary...

Service"+ASM"has 1 instance(s).

Instance"+ASM2", status READY, has1 handler(s) for this service...

Service"RAC3"has 1 instance(s).

Instance"RAC32", status READY, has1 handler(s) for this service...

Service"RAC3XDB"has 1 instance(s).

Instance"RAC32", status READY, has1 handler(s) for this service...

Service"RACDB007"has 1 instance(s).

Instance "RACDB0072",status READY, has1 handler(s) for this service...

Service"RACDB007JL_BJ"has 1 instance(s).

Instance"RACDB007JL2", status READY,has 1 handler(s) for this service...

Service"RACDB007JL_BJXDB"has 1 instance(s).

Instance"RACDB007JL2", status READY,has 1 handler(s) for this service...

Service"RACDB007XDB"has 1 instance(s).

Instance"RACDB0072", status READY, has1 handler(s) for this service...

The commandcompleted successfully

1.1.1.5 知识点

经过这次问题的解决,发现oracle 11G的RAC中有很多功能都通过集群命令来控制,而不能单一的通过单机管理的方法来控制集群的某些功能

 

Tags:

文章评论

最 近 更 新
热 点 排 行
Js与CSS工具
代码转换工具

<