启动oracle 11g lsnrctl 监听服务时出现了TNS-12541, TNS-12560,TNS-00511错误提示的解决方法
https://www.cnblogs.com/kerrycode/p/3591390.html --参考
今天在启动oracle 11g R2数据库的监听程序lsnrctl 的时候,出现错误提示,不能正常启动,错误提示如下:
[oracle@rhel5 ~]$ lsnrctl start
LSNRCTL for Linux: Version 11.2.0.5.0 - Production on 06-SEP-2013 05:31:02
Copyright © 1991, 2011, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=rhel5)(PORT=1521))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
[oracle@getlnx01 admin]$ lsnrctl status
LSNRCTL for Linux: Version 10.2.0.4.0 - Production on 09-MAR-2015 09:13:29
Copyright © 1991, 2007, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
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=TCP)(HOST=getlnx01.esqule.com)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
[oracle@getlnx01 dbs]$ lsnrctl start
LSNRCTL for Linux: Version 10.2.0.4.0 - Production on 09-MAR-2015 09:20:46
Copyright © 1991, 2007, Oracle. All rights reserved.
Starting /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait…
TNSLSNR for Linux: Version 10.2.0.4.0 - Production
System parameter file is /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=getlnx01.esqule.com)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
TNS-12547: TNS:lost contact
TNS-12560: TNS:protocol adapter error
TNS-00517: Lost contact
Linux Error: 104: Connection reset by peer
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=getlnx01.esqule.com)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
检查了监听配置文件listener.ora, 发现没有问题.Google搜索了一下: 这个错误跟Linux的主机名和IP配置有关系,于是赶紧检查:
[oracle@EGMLNX02 admin]$ hostname
EGMLNX02.egm1.esquel.com
[oracle@EGMLNX02 admin]$ more /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=EGMLNX02.egm1.esquel.com
结果发现主机名和IP配置文件 hosts里面,不知道是系统管理员手误还是其它原因,在hosts文件,127.0.0.1配置里面多了一项EGMLNX02(应该为三项),结果导致ORACLE数据库监听服务器启动报错
关于主机名和IP配置文件,一般情况下hosts文件的每行为一个主机,每行由三部份组成,每个部份由空格隔开。其中#号开头的行做说明,不被系统解释。
第一部份:网络IP地址;
第二部份:主机名或域名;
第三部份:主机名别名;
于是修改hosts文件,然后重新启动监听,OK,文件解决了。
更多推荐
所有评论(0)