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] ~]$

搞定!

时间: 2024-08-10 05:38:51

Linux Oracle 11g, lsnrctl start 监听服务启动失败解决办法的相关文章

Oracle监听服务启动失败案例

在ORACLE测试服务器上还原恢复了一个数据库后,启动监听服务时出现了TNS-12541, TNS-12560,TNS-00511之类的错误,具体情况如下所示: [[email protected] 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 reserve

windows安装RabbitMQ因为用户名为中文文件夹导致RabbitMQ服务启动失败解决办法

安装RabbitMQ必须先安装Erlang 安装这两个东东网上教程一大把就不一 一 阐述了.只不过要注意的倒是有几点 1.安装Erlang需要用管理员身份运行安装,RabbitMQ官网这么说的. 2.安装RabbitMQ和Erlang的目录要没有空格和中文字符. 重点就是我之前将电脑用户名命名为中文了,即使我后面把用户名改为英文,用户文件夹还是中文改不过来了,然后百度要么无法解决要么就是操作过程太复杂稍微操作不当就得 重装系统了,而RabbitMQ 服务必须得没有中文字符才能启动,我又不想改文件

Oracle 11g ORA-12514:TNS:监听程序当前无法识别连接描述符中请求的服务

最近在装ORACLE的时候爆出了一个问题, Oracle 11g ORA-12514:TNS:监听程序当前无法识别连接描述符中请求的服务 以前装ORACLE好多遍了网上搜了好多方法还是解决不了,最后通过自己的摸索找到了一个不显眼的原因, 打开Oracle - OraDb11g_home1/配置和移植工具/  下面的Net Manager,配置好服务名后,打开监听程序右上角选择数据库服务 一开始的数据库服务中配置是有问题的,一般一开始这个目录是空的需要自己手动添加更改,如下图一开始我的Net Ma

Oracle Net Manager 测试监听服务

前几天因为工作需要,安装了Oracle 11g,但怎么都监听不了本机.打开 PL/SQL Devloper 也登陆不了.随删除之. 今天有时间,又把Oracle 安装上了,想着怎么才能监听.经过操作,现在成功,下面是 过程: 1. 安装完ORACLE 后,进入 配置与移植工具,选择 Net Manager 2. 配置监听程序和服务命名. 我使用的协议为 TCP/IP. 主机 :127.0.0.1 .端口 : 1521. 3. 打开 CMD,输入 sqlplus.exe sys/manager a

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

Windows平台下Oracle监听服务启动过程中日志输出记录. 日志目录:D:\app\Administrator\diag\tnslsnr\WIN-RU03CB21QGA\listener\trace\listener.log 日志输出内容: Sat Aug 06 20:38:44 2016 系统参数文件为D:\app\Administrator\product\11.2.0\dbhome_1\network\admin\listener.ora 写入d:\app\administrator

oracle的环境配置-监听服务和访问连接原理

监听服务和访问连接原理 端口号范围:1025~6500 [[email protected] ~]$ lsnrctl   --进入监听管理工具 LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 05-JUN-2014 11:13:20 Copyright (c) 1991, 2005, Oracle.  All rights reserved. Welcome to LSNRCTL, type "help" for inform

oracle 11g 修改默认监听端口1521

OS: Oracle Linux Server release 5.7 DB: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production 1.查看监听状态: SQL> !lsnrctl status LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 12-NOV-2013 01:36:29 Copyright (c) 1991, 2011, O

oracle 11g RAC数据库监听配置相关

oracle RAC 监听配置基本和单实例的配置相同 11g之后 安装RAC的过程中,不需要执行netca来手动创建监听,在安装集群软件的时候,会自动创建监听程序: 而在DBCA建库的时候,又会自动创建tnsname.ora文件 强烈推荐这篇: http://www.oracle.com/technetwork/cn/articles/database-performance/oracle-rac-connection-mgmt-1650424-zhs.html http://www.cnblo

Linux下安装oracle遇到启动监听服务器启动失败

1.发现监听服务器没有启动,则  lsntctl start 启动监听服务器: 2.发现TNS-12555问题: 3.查找TNS-12555错误,找到一个满意的答案: chmod  777 /var/tmp/.oracle 4.重新启动监听服务器,启动成功!