在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

[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监听服务启动失败案例的更多相关文章

  1. Windows平台下Oracle监听服务启动过程中日志输出

    Windows平台下Oracle监听服务启动过程中日志输出记录. 日志目录:D:\app\Administrator\diag\tnslsnr\WIN-RU03CB21QGA\listener\tra ...

  2. Oracle 监听服务启动不了

    解决方法: 重新生成listener.ora文件   实施步骤 1,打开Net Configuration Assistant 2, 3, 4, 5, 6, 7,

  3. 服务器重启后Oracle监听服务没有自动启动的解决方案

    最近一直在被这样一个问题烦恼,就是服务器断电重启后,Oracle监听服务没有正常自动启动(监听服务已经设置为自启动). 具体是这样的,监听服务设置为开机自启动,Oracle数据库服务设置为开机延时启动 ...

  4. oracle登陆,在监听服务启动了的情况下,登陆用户还是报错未启动监听服务的错误(刚开始装oracle是能登陆的,重启之后装了plsql)

    刚开始装oracle是能登陆的,重启之后装了140M的plsql,所以有可能是plsql跟oracle监听冲突了,所以我之后换了33M的plsql,oracle就没问题了,可以正常登陆了

  5. Oracle监听服务

    Oracle数据库中的主要用户及其作用 No. 用户名 默认密码 描述 1 sys change_on_install 数据库的超级管理员 2 system manager 数据库的普通管理员 3 s ...

  6. oracle 监听服务配置

    最近在red hat 6.6虚拟机上安装了Oracle 11gR2数据库,安装完毕,使用没有问题,通过主机也可以访问到虚拟机上的数据库.然而,在重新启动虚拟机后,主机无法访问到数据库,提示错误: PS ...

  7. oracle监听服务开启

    输入命令netca即可开启oracle的监听服务 弹出对话框 选择监听服务配置,单击下一步 选择增加监听,单击下一步 监听的名字,默认即可,下一步 监听链接的协议,默认TCP协议即可,下一步 监听默认 ...

  8. oracle监听无法启动

    昨天再监听里新加了个地址,重启电脑后监听无法启动,删除新加地址就好了 # listener.ora Network Configuration File: d:\oracle\product\10.2 ...

  9. Oracle监听已经启动了 sqlplus / as sysdba 仍然报 ERROR:ORA-12560

    我的Oracle是11g的 system 的密码忘记了, 但是scott的密码我还记得而且能登录 . 想以sqlplus /as sysdba 修改system密码 一直在报 ERROR:ORA-12 ...

随机推荐

  1. 关于Java中的static关键字

    Java中的 static 关键字,确实是一个关键的字(key word),今天就来总结一下它的用法,说说为什么关键. Java中的 static 关键字主要是用来做内存管理的.理解了这句话才能够比较 ...

  2. webmagic的设计机制及原理-如何开发一个Java爬虫

    之前就有网友在博客里留言,觉得webmagic的实现比较有意思,想要借此研究一下爬虫.最近终于集中精力,花了三天时间,终于写完了这篇文章.之前垂直爬虫写了一年多,webmagic框架写了一个多月,这方 ...

  3. 【JS】heatmap.js v1.0 到 v2.0,详细总结一下:)

    前段时间,项目要开发热力图插件,研究了heatmap.js,打算好好总结一下. 本文主要有以下几部分内容: 部分源码理解 如何迁移到v2.0 v2.0官方文档译文 关于heatmap.js介绍,请看这 ...

  4. gradle中使用嵌入式(embedded) tomcat, debug 启动

    在gradle项目中使用embedded tomcat. 最开始部署项目需要手动将web项目打成war包,然后手动上传到tomcat的webapp下,然后启动tomcat来部署项目.这种手动工作通常还 ...

  5. 故障恢复和恢复模式(Crash Recovery & Recovery Models)

    数据库的恢复模型是否影响故障恢复,在简单恢复模式里,你是否会丢失事务?在今天的文章里我想谈下这点,详细讨论下. 恢复模式(Recovery Models) 对于这个问题的最简单的答案是不会:恢复模型不 ...

  6. SignalR的Javascript客户端API使用方式整理

    SignalR的服务端提供了两种实现方式,分别是PersistentConnection和Hub,这两种方式的侧重点不同: PersistentConnection更接近于底层,编程接口比较简单,传输 ...

  7. Ionic2学习笔记(9):访问本地设备

    作者:Grey 原文地址: http://www.cnblogs.com/greyzeng/p/5559927.html               Ionic2提供了访问本地设备的方法,但是需要安装 ...

  8. javascript作用域中令你意想不到的问题

    大多数类c的语言,由一对花括号封闭的代码块就是一个作用域.但是javascript的作用域则是通过函数来定义.在一个函数中定义的变量只对这个函数内部可见,我们称为函数作用域. 1.在函数中引用一个变量 ...

  9. WCF入门教程1——WCF简要介绍

    什么是WCF Windows Communication Foundation(WCF)是由微软开发的一系列支持数据通信的应用程序框架,可以翻译为Windows 通讯开发平台. 整合了原有的windo ...

  10. (原) 2.1 Zookeeper原生API使用

    本文为原创文章,转载请注明出处,谢谢 Zookeeper原生API使用 1.jar包引入,演示版本为3.4.6,非maven项目,可以下载jar包导入到项目中 <dependency> & ...