技术库 > oracle

删除127.0.0.1 localhost.localdomain localhost出现的错误

技术库:tec.5lulu.com

from:tec.5lulu.com

在安装oracle前,我添加固定IP和主机名时不小心删除了127.0.0.1 localhost.localdomain localhost,不过装完oracle软件和数据库后instance还是能起来,但是当我tnsping的时候就出现问题,监听错误,然后我去查看监听发现如下问题:

[oracle@yao]$ lsnrctl status

LSNRCTL for Linux: Version 10.2.0.1.0 – Production on 31-MAY-2010 11:19:38

Copyright (c) 1991, 2005, 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: 2: No such file or directory
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.16.4.181)(PORT=1521)))
TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 111: Connection refused

打开监听时出现如下错误:

[oracle@yao]$ lsnrctl start

LSNRCTL for Linux: Version 10.2.0.4.0 – Production on 20-MAR-2009 05:33:19

Copyright (c) 1991, 2007, Oracle. All rights reserved.

Starting /oracle/product/10.2.0/bin/tnslsnr: please wait…

TNS-12537: TNS:connection closed
TNS-12560: TNS:protocol adapter error
TNS-00507: Connection closed
Linux Error: 29: Illegal seek

解决方法:

vi  /etc/hosts

添加如下:

127.0.0.1 localhost.localdomain localhost
:wq

这样tnsping就会正常了

删除127.0.0.1 localhost.localdomain localhost出现的错误


标签: oracle linux c本文链接 http://tec.5lulu.com/detail/106kgn18hekhm8xbf.html

我来评分 :6.1
0

转载注明:转自5lulu技术库

本站遵循:署名-非商业性使用-禁止演绎 3.0 共享协议

www.5lulu.com