Oracle监听服务启动失败案例
2017-05-25 15:24
756 查看
在ORACLE测试服务器上还原恢复了一个数据库后,启动监听服务时出现了TNS-12541, TNS-12560,TNS-00511之类的错误,具体情况如下所示:
[oracle@getlnx01 admin]$ lsnrctl status
LSNRCTL for Linux: Version 10.2.0.4.0 - Production on 09-MAR-2015 09:13:29
Copyright (c) 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 (c) 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
因为曾经遇到并解决过TNS-12541这类错误,立即检查/etc/hosts文件,结果发现IP地址写错了,正确的IP地址应该为192.168.7.221,而不是粗心手误写错的192.168.7.211
修改为正确的IP地址后,依然出现这个错误,后面查看了官方文档Starting
TNS Listener or LSNRCTL Start Yields TNS-12541, Linux Error: 111: Connection Refused (文档 ID 343295.1)后,才发现是因为本地主机环回名称和地址不正确所致,修改/etc/hosts后,重启监听服务,问题解决。
CAUSE
1. There is possibly an incorrect IP Address specified for the host in the /etc/hosts file.
For example:
192.168.101.101 prod1.us.oracle.com prod1
Whereas the actual ip address for the host "prod1.us.oracle.com" is 192.168.101.110
2. Also, the localhost reference may be incorrect or missing from the /etc/hosts file.
3. Oracle may not have read access to /etc/nsswitch.conf file.
SOLUTION
To implement the solution, please execute the following steps:
1. Correct the mapping in the /etc/hosts file by adding/correcting the IP address and/or hostname reference for the Unix/Linux Server (both long and short host names).
For example:
# Add or edit the /etc/hosts file to include a valid entry for the Server:
192.168.101.110 prod1.us.oracle.com prod1
2. Check that the localhost loopback name and address are correct (both long and short host names).
An example of a correct localhost entry would be as follows:
127.0.0.1 localhost.localdomain localhost
3. Remember to save the /etc/hosts file and then start the listener.
4. Check permissions on /etc/nsswitch.conf file to ensure group and other have read access.
- If necessary change permisions on /etc/nsswitch.conf as follows:
chmod 644 /etc/nsswitch.conf
[oracle@getlnx01 admin]$ lsnrctl status
LSNRCTL for Linux: Version 10.2.0.4.0 - Production on 09-MAR-2015 09:13:29
Copyright (c) 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 (c) 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
因为曾经遇到并解决过TNS-12541这类错误,立即检查/etc/hosts文件,结果发现IP地址写错了,正确的IP地址应该为192.168.7.221,而不是粗心手误写错的192.168.7.211
[root@getlnx01 ~]# more /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 getlnx01.esqule.com getlnx01
192.168.7.211 getlnx01.esqule.com getlnx01
修改为正确的IP地址后,依然出现这个错误,后面查看了官方文档Starting
TNS Listener or LSNRCTL Start Yields TNS-12541, Linux Error: 111: Connection Refused (文档 ID 343295.1)后,才发现是因为本地主机环回名称和地址不正确所致,修改/etc/hosts后,重启监听服务,问题解决。
[oracle@getlnx01 ~]$ more /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
192.168.7.221 getlnx01.esqule.com getlnx01
CAUSE
1. There is possibly an incorrect IP Address specified for the host in the /etc/hosts file.
For example:
192.168.101.101 prod1.us.oracle.com prod1
Whereas the actual ip address for the host "prod1.us.oracle.com" is 192.168.101.110
2. Also, the localhost reference may be incorrect or missing from the /etc/hosts file.
3. Oracle may not have read access to /etc/nsswitch.conf file.
SOLUTION
To implement the solution, please execute the following steps:
1. Correct the mapping in the /etc/hosts file by adding/correcting the IP address and/or hostname reference for the Unix/Linux Server (both long and short host names).
For example:
# Add or edit the /etc/hosts file to include a valid entry for the Server:
192.168.101.110 prod1.us.oracle.com prod1
2. Check that the localhost loopback name and address are correct (both long and short host names).
An example of a correct localhost entry would be as follows:
127.0.0.1 localhost.localdomain localhost
3. Remember to save the /etc/hosts file and then start the listener.
4. Check permissions on /etc/nsswitch.conf file to ensure group and other have read access.
- If necessary change permisions on /etc/nsswitch.conf as follows:
chmod 644 /etc/nsswitch.conf
相关文章推荐
- Oracle监听服务启动失败案例
- Enterprise Manager配置失败-监听程序未启动或数据库服务未注册到该监听程序解决办法----ORACLE 11g
- Linux Oracle 11g, lsnrctl start 监听服务启动失败解决办法
- Oracle监听服务启动失败怎么办
- oracle创建数据库 win7_64位_oracle11g:Enterprise Manager配置失败-监听程序未启动或数据库服务未注册到该监听程序解决办法
- Enterprise Manager配置失败-监听程序未启动或数据库服务未注册到该监听程序解决办法----ORACLE 11g
- 监听服务启动失败
- 修改计算名之后,oracle无法启动监听服务。转
- Oracle监听服务无法启动或丢失的解决办法
- oracle监听服务启动不了的解决办法
- oracle 监听服务无法启动的问题
- Oracle监听服务无法启动或丢失的解决办法
- win7 oracle 无法启动 OracleOraDb10g_home1TNSListener 服务 监听
- 关于Oracle10.2.0自行启动两个监听进程导致服务中断问题
- linux下启动oracle服务和监听程序
- 对于启动Oracle 10g时 ORA-12514:TNS:监听程序当前无法识别连接描述符中请求的服务
- 在linux环境下启动oracle服务以及监听
- Linux下启动Oracle服务和监听程序(基础知识)
- Linux下启动Oracle服务和监听程序
- Linux下启动Oracle服务和监听程序