Linux Oracle 11g, lsnrctl start 监听服务启动失败解决办法
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Linux Oracle 11g, lsnrctl start 监听服务启动失败解决办法相关的知识,希望对你有一定的参考价值。
【本文谢绝转载原文来自http://990487026.blog.51cto.com】
报错的现象:
[[email protected] ~]$ lsnrctl start LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 29-AUG-2016 10:38:59 Copyright (c) 1991, 2009, Oracle. All rights reserved. Starting /opt/oracle/app/product/11.2.0/dbhome_1/bin/tnslsnr: please wait... TNSLSNR for Linux: Version 11.2.0.1.0 - Production System parameter file is /opt/oracle/app/product/11.2.0/dbhome_1/network/admin/listener.ora Log messages written to /opt/oracle/app/diag/tnslsnr/oracle11/listener/alert/log.xml Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle11)(PORT=1521))) TNS-12545: Connect failed because target host or object does not exist TNS-12560: TNS:protocol adapter error TNS-00515: Connect failed because target host or object does not exist Listener failed to start. See the error message(s) above...
以上是报错信息.
开始查错,
查到了TNS-12545: Connect failed because target host or object does not exist
[[email protected] ~]$ > /opt/oracle/app/diag/tnslsnr/oracle11/listener/alert/log.xml [[email protected] ~]$ lsnrctl start [[email protected] ~]$ grep txt /opt/oracle/app/diag/tnslsnr/oracle11/listener/alert/log.xml <txt>System parameter file is /opt/oracle/app/product/11.2.0/dbhome_1/network/admin/listener.ora <txt>Log messages written to /opt/oracle/app/diag/tnslsnr/oracle11/listener/alert/log.xml <txt>Trace information written to /opt/oracle/app/diag/tnslsnr/oracle11/listener/trace/ora_3706_140351658579712.trc <txt>Trace level is currently 0 <txt>Started with pid=3706 <txt>Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) <txt>Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle11)(PORT=1521))) <txt>TNS-12545: Connect failed because target host or object does not exist <txt>No longer listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) [[email protected] ~]$
网上查[TNS-12545: Connect failed] 找到tnsnames.ora文件
cat /opt/oracle/app/product/11.2.0/dbhome_1/network/admin/tnsnames.ora # tnsnames.ora Network Configuration File: /opt/oracle/app/product/11.2.0/dbhome_1/network/admin/tnsnames.ora # Generated by Oracle configuration tools. ORCL = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = oracle11)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl) ) )
看到:HOST = oracle11
查看我的hosts文件,真的没有这个:
[[email protected] ~]$ cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 [[email protected] ~]$
添加一条:
[[email protected] ~]$ su root Password: [[email protected] oracle]# echo "127.0.0.1 oracle11 " >> /etc/hosts [[email protected] oracle]# cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 127.0.0.1 oracle11 [[email protected] oracle]#
访问测试:,启动监听:
[[email protected] ~]$ ping oracle11 PING oracle11 (127.0.0.1) 56(84) bytes of data. 64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.090 ms 64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.048 ms 64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.046 ms [[email protected] ~]$ lsnrctl start LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 29-AUG-2016 10:47:44 Copyright (c) 1991, 2009, Oracle. All rights reserved. Starting /opt/oracle/app/product/11.2.0/dbhome_1/bin/tnslsnr: please wait... TNSLSNR for Linux: Version 11.2.0.1.0 - Production System parameter file is /opt/oracle/app/product/11.2.0/dbhome_1/network/admin/listener.ora Log messages written to /opt/oracle/app/diag/tnslsnr/oracle11/listener/alert/log.xml Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracle11)(PORT=1521))) Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production Start Date 29-AUG-2016 10:47:44 Uptime 0 days 0 hr. 0 min. 0 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /opt/oracle/app/product/11.2.0/dbhome_1/network/admin/listener.ora Listener Log File /opt/oracle/app/diag/tnslsnr/oracle11/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracle11)(PORT=1521))) The listener supports no services The command completed successfully [[email protected] ~]$
scott登陆上去试一试:
我的数据库服务已经启动
[[email protected] ~]$ sqlplus scott/11 SQL*Plus: Release 11.2.0.1.0 Production on Mon Aug 29 10:48:36 2016 Copyright (c) 1982, 2009, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> select * from dept; DEPTNO DNAME LOC ---------- -------------- ------------- 50 oracle England 10 ACCOUNTING NEW YORK 20 RESEARCH DALLAS 30 SALES CHICAGO 40 OPERATIONS BOSTON SQL> SQL> exit; Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options [[email protected] ~]$
搞定!
本文出自 “魂斗罗” 博客,谢绝转载!
以上是关于Linux Oracle 11g, lsnrctl start 监听服务启动失败解决办法的主要内容,如果未能解决你的问题,请参考以下文章
操作错误: lsnrctl启动报错(lsnrctl start),Linux Error: 29: Illegal seek
操作错误: lsnrctl启动报错(lsnrctl start),Linux Error: 29: Illegal seek
lsnrctl启动报错,Linux Error: 29: Illegal seek
lsnrctl启动报错,Linux Error: 29: Illegal seek
找不到 lsnrctl 命令 oracle 企业数据库 11g ubuntu
oracle 11G 无法启动$ lsnrctl start Starting /oracle/oracle/bin/tnslsnr: please wait...