文档章节

The listener supports no services解决一例

飓风2000
 飓风2000
发布于 2014/06/17 14:53
字数 1838
阅读 194
收藏 1
点赞 0
评论 0

The listener supports no services解决一例

 

Listener动态监听静态监听注册实例

今天做Advacned Replication实验的时候碰到一个问题,启动目标库监听时,出现The listener supports no services

[oracle@adrep ~]$ lsnrctl start

 

 

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 14-SEP-2013 10:11:38

 

 

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

 

 

Starting /u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...

 

 

TNSLSNR for Linux: Version 11.2.0.3.0 - Production

System parameter file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

Log messages written to /u01/app/oracle/diag/tnslsnr/adrep/listener/alert/log.xml

Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=adrep)(PORT=1521)))

Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

 

 

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=adrep)(PORT=1521)))

STATUS of the LISTENER

------------------------

Alias                     LISTENER

Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production

Start Date                14-SEP-2013 10:11:38

Uptime                    0 days 0 hr. 0 min. 0 sec

Trace Level               off

Security                  ON: Local OS Authentication

SNMP                      OFF

Listener Parameter File   /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

Listener Log File         /u01/app/oracle/diag/tnslsnr/adrep/listener/alert/log.xml

Listening Endpoints Summary...

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=adrep)(PORT=1521)))

  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

The listener supports no services

The command completed successfully

由于这台主机之前做的是stream实验,修改了一下hostname,之前的监听和服务名也用netca重新配置过了,但是启动监听一致是这个状态,动态监听注册不上

本地登录到Oracle实例,手动注册实例也无果,问题依旧

SQL> alter system register;

 

 

System altered.

 

 

SQL> !

[oracle@adrep ~]$ lsnrctl status

 

 

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 14-SEP-2013 10:13:03

 

 

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

 

 

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=adrep)(PORT=1521)))

STATUS of the LISTENER

------------------------

Alias                     LISTENER

Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production

Start Date                14-SEP-2013 10:11:38

Uptime                    0 days 0 hr. 1 min. 25 sec

Trace Level               off

Security                  ON: Local OS Authentication

SNMP                      OFF

Listener Parameter File   /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

Listener Log File         /u01/app/oracle/diag/tnslsnr/adrep/listener/alert/log.xml

Listening Endpoints Summary...

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=adrep)(PORT=1521)))

  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

The listener supports no services

The command completed successfully

[oracle@adrep ~]$ lsnrctl reload

 Listener Log File         /u01/app/

 

 

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 14-SEP-2013 10:16:13

 

 

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

 

 

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=adrep)(PORT=1521)))

The command completed successfully

[oracle@adrep ~]$ lsnrctl status

 

 

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 14-SEP-2013 10:13:18

 

 

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

 

 

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=adrep)(PORT=1521)))

STATUS of the LISTENER

------------------------

Alias                     LISTENER

Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production

Start Date                14-SEP-2013 10:11:38

Uptime                    0 days 0 hr. 1 min. 40 sec

Trace Level               off

Security                  ON: Local OS Authentication

SNMP                      OFF

Listener Parameter File   /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

Listener Log File         /u01/app/oracle/diag/tnslsnr/adrep/listener/alert/log.xml

Listening Endpoints Summary...

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=adrep)(PORT=1521)))

  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

The listener supports no services

The command completed successfully

[oracle@adrep ~]$ lsnrctl stop

 

 

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 14-SEP-2013 10:17:03

 

 

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

 

 

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=adrep)(PORT=1521)))

The command completed successfully

[oracle@adrep ~]$ lsnrctl start

 

 

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 14-SEP-2013 10:18:53

 

 

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

 

 

Starting /u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...

 

 

TNSLSNR for Linux: Version 11.2.0.3.0 - Production

System parameter file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

Log messages written to /u01/app/oracle/diag/tnslsnr/adrep/listener/alert/log.xml

Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=adrep)(PORT=1521)))

Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

 

 

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=adrep)(PORT=1521)))

STATUS of the LISTENER

------------------------

Alias                     LISTENER

Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production

Start Date                14-SEP-2013 10:18:53

Uptime                    0 days 0 hr. 0 min. 0 sec

Trace Level               off

Security                  ON: Local OS Authentication

SNMP                      OFF

Listener Parameter File   /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

Listener Log File         /u01/app/oracle/diag/tnslsnr/adrep/listener/alert/log.xml

Listening Endpoints Summary...

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=adrep)(PORT=1521)))

  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

The listener supports no services

The command completed successfully

[oracle@adrep ~]$ 

于是考虑通过mgr配置静态监听,但是让我郁闷的是,总是提示需要输入一个合法的SID

 

 

这个SID绝对是strmtarget没错的,global name即service name也确实是target,这个可以由以下参数获得佐证

SQL> show parameter name

 

 

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

db_file_name_convert                 string

db_name                              string      strmtarg

db_unique_name                         string      strmtarget

global_names                               boolean     TRUE

instance_name                          string      strmtarget

lock_name_space                        string

log_file_name_convert                string

processor_group_name             string

service_names                      string      target

也可以通过v$instance视图查到SID是正确的

SQL> select instance_name from v$instance;

 

INSTANCE_NAME

----------------

strmtarget

难道就没有办法设置静态监听了吗?NO,这里还有一种方法就是手动修改listener.ora文件,添加以下几行内容

SID_LIST_LISTENER =  

(SID_LIST =  

  (SID_DESC =  

  (GLOBAL_DBNAME = target)

  (SID_NAME = strmtarget)

  )

)

其作用就是配置一个实例静态监听,只不过用这里跳过了图形化界面修改而已,如果是用netmgr成功修改了实例的静态监听,也是会生成以上几行代码的

这里可以先把listener.ora用xftp工具拷贝出来,修改完再拷贝回相同位置即可

这里只需要重新加载一次监听就可以注册上实例了

[oracle@adrep ~]$ lsnrctl reload

 

 

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 14-SEP-2013 10:32:06

 

 

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

 

 

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=adrep)(PORT=1521)))

The command completed successfully

[oracle@adrep ~]$ lsnrctl status

 

 

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 14-SEP-2013 10:32:14

 

 

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

 

 

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=adrep)(PORT=1521)))

STATUS of the LISTENER

------------------------

Alias                     LISTENER

Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production

Start Date                14-SEP-2013 10:18:53

Uptime                    0 days 0 hr. 13 min. 21 sec

Trace Level               off

Security                  ON: Local OS Authentication

SNMP                      OFF

Listener Parameter File   /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

Listener Log File         /u01/app/oracle/diag/tnslsnr/adrep/listener/alert/log.xml

Listening Endpoints Summary...

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=adrep)(PORT=1521)))

  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

Services Summary...

Service "target" has 1 instance(s).

  Instance "strmtarget", status UNKNOWN, has 1 handler(s) for this service...

The command completed successfully

[oracle@adrep ~]$ 

这里target实例通过以上方法,成功地把实例注册上了,注意"UNKNOWN"就表示是静态注册的,如果是"READY"则表示是动态注册的

注意:动态和静态监听可以共存,如:

[oracle@zlm  ~]$ lsnrctl status

 

 

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 14-SEP-2013 09:52:23

 

 

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

 

 

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=zlm)(PORT=1521)))

STATUS of the LISTENER

------------------------

Alias                     LISTENER

Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production

Start Date                14-SEP-2013 09:15:04

Uptime                    0 days 0 hr. 37 min. 19 sec

Trace Level               off

Security                  ON: Local OS Authentication

SNMP                      OFF

Listener Parameter File   /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora

Listener Log File         /u01/app/oracle/diag/tnslsnr/zlm/listener/alert/log.xml

Listening Endpoints Summary...

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=zlm)(PORT=1521)))

  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

Services Summary...

Service "zlm11g" has 2 instance(s).

  Instance "zlm11g", status UNKNOWN, has 1 handler(s) for this service...

  Instance "zlm11g", status READY, has 1 handler(s) for this service...

Service "zlm11gXDB" has 1 instance(s).

  Instance "zlm11g", status READY, has 1 handler(s) for this service...

The command completed successfully

[oracle@zlm  ~]$

以上是我在zlm主机上的监听状态,可以发现,同时配置了动态和静态的监听

总结:以上利用了手动修改配置静态监听的方法成功注册了Oracle实例,动态监听往往需要等实例启动后,过一段时间才会注册上,而静态监听则可以马上注册。而且一旦实例重启会造成动态监听暂时无效,有些版本的bug甚至会导致动态监听的注册就再也起不来了。所以我对于监听的观点是,尽量配置静态监听,这样就可以避免很多由监听带来的问题,诸如我们经常会碰到的几个ora error:ora-12541、ora-12514、ora-12154等,尤其是在RAC和DG中,一个监听的问题,往往会带来很大的麻烦,尤其需要引起大家的注意。

© 著作权归作者所有

共有 人打赏支持
飓风2000
粉丝 29
博文 218
码字总数 119157
作品 0
浦东
高级程序员
Oracle启动监听报错:The listener supports no services解决

PS:前几天一台项目开发使用的Oracle11g服务器重启系统之后,出现了几个莫名的报错,下面是其中一个,已解决。 $ lsnrctl start 报错提示: The listener supports no services The command c...

sfih ⋅ 2016/08/19 ⋅ 0

总有些莫名其妙的错误

昨天晚上因为服务器机房电路检修,所有的服务器都停机。今天早上八点半就被电话吵醒,说是服务系统不能访问。赶紧的爬起来打开电脑,访问系统,出现错误ORA-12541:TNS:没有监听器。 赶紧的在...

yonge ⋅ 2009/03/03 ⋅ 0

The listener supports no services The command completed successfully

启动监听出现以下错误信息,找不到服务.错误信息如下: [oracle@dg1 admin]$ lsnrctl status LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 18-NOV-2016 11:17:54 Copyright (c) 199......

z597011036 ⋅ 2016/11/18 ⋅ 0

TCPMon—查看信息传输小工具

Content Content Introduction Structure and Dependencies Usage Patterns As an Explicit Intermediate As a Request Sender for Web Services As a Proxy Advanced Settings Slow Connect......

红焖鲤鱼 ⋅ 2015/09/11 ⋅ 0

Spring AMQP 1.3.0 RC1 for Java 发布

Spring AMQP 1.3.0 RC1 for Java 发布,此版本主要更新内容如下: Listener Container The listener container concurrency can be changed without firststopping the container and the l......

oschina ⋅ 2014/03/08 ⋅ 6

连接oracle报错“ORA-28547:connection ... admin 解决办法

第一种、解决方案如下: listener.ora是服务器端的配置oracle的文件。 后来将listener.ora的这一行注释掉,就行了,, (PROGRAM = extproc) 修改为: SIDLISTLISTENER = (SID_LIST = (SID_D...

Junn ⋅ 2014/02/25 ⋅ 0

我的“ORA-28547:connection to server failed,probab...

连接oracle 11g突然蹦出了一个错误“ORA-28547:connection to server failed,probable Oracle Net admin error”,见下图,我勒个去,真是郁闷死了,无奈在网上搜索了好久找到了解决方法,写...

SANSOM ⋅ 2013/07/29 ⋅ 0

oracle监听器动态注册于静态注册的区别

1, oracle 10g 用netca方式建立的都默认为动态注册方式 2,如果想改为静态注册的方式则在listener.ora 中加入如下内容即可 SIDLISTLISTENER = (SIDLIST = (SIDDESC = (SIDNAME = PLSExtProc)...

SANSOM ⋅ 2013/11/18 ⋅ 0

User switch with custom restrictions in Symfony

Recently we found ourselves in a situation where we needed to implement user switching/impersonating functionality. Which means a user can "log in" as another user. This needed ......

jims ⋅ 2016/08/28 ⋅ 0

线程中无法通过spring注入services为null

一个javaweb的项目,在web.xml中设置一个监听 com.thread.MyListener 下面是监听类中的方法 public class MyListener implements ServletContextListener{ private MyThread myThread; publ......

深谷不见幽兰 ⋅ 2013/12/03 ⋅ 4

没有更多内容

加载失败,请刷新页面

加载更多

下一页

十五周二次课

十五周二次课 17.1mysql主从介绍 17.2准备工作 17.3配置主 17.4配置从 17.5测试主从同步 17.1mysql主从介绍 MySQL主从介绍 MySQL主从又叫做Replication、AB复制。简单讲就是A和B两台机器做主...

河图再现 ⋅ 45分钟前 ⋅ 0

docker安装snmp rrdtool环境

以Ubuntu16:04作为基础版本 docker pull ubuntu:16.04 启动一个容器 docker run -d -i -t --name flow_mete ubuntu:16.04 bash 进入容器 docker exec -it flow_mete bash cd ~ 安装基本软件 ......

messud4312 ⋅ 今天 ⋅ 0

OSChina 周一乱弹 —— 快别开心了,你还没有女友呢。

Osc乱弹歌单(2018)请戳(这里) 【今日歌曲】 @莱布妮子 :分享吴彤的单曲《好春光》 《好春光》- 吴彤 手机党少年们想听歌,请使劲儿戳(这里) @clouddyy :小萝莉街上乱跑,误把我认错成...

小小编辑 ⋅ 今天 ⋅ 7

mysql in action / alter table

change character set ALTER SCHEMA `employees` DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_general_ci ;ALTER TABLE `employees`.`t2` CHARACTER SET = utf8mb4 , COLLAT......

qwfys ⋅ 今天 ⋅ 0

Java 开发者不容错过的 12 种高效工具

Java 开发者常常都会想办法如何更快地编写 Java 代码,让编程变得更加轻松。目前,市面上涌现出越来越多的高效编程工具。所以,以下总结了一系列工具列表,其中包含了大多数开发人员已经使用...

jason_kiss ⋅ 昨天 ⋅ 0

Linux下php访问远程ms sqlserver

1、安装freetds(略,安装在/opt/local/freetds 下) 2、cd /path/to/php-5.6.36/ 进入PHP源码目录 3、cd ext/mssql进入MSSQL模块源码目录 4、/opt/php/bin/phpize生成编译配置文件 5、 . ./...

wangxuwei ⋅ 昨天 ⋅ 0

如何成为技术专家

文章来源于 -- 时间的朋友 拥有良好的心态。首先要有空杯心态,用欣赏的眼光发现并学习别人的长处,包括但不限于工具的使用,工作方法,解决问题以及规划未来的能力等。向别人学习的同时要注...

长安一梦 ⋅ 昨天 ⋅ 0

Linux vmstat命令实战详解

vmstat命令是最常见的Linux/Unix监控工具,可以展现给定时间间隔的服务器的状态值,包括服务器的CPU使用率,内存使用,虚拟内存交换情况,IO读写情况。这个命令是我查看Linux/Unix最喜爱的命令...

刘祖鹏 ⋅ 昨天 ⋅ 0

MySQL

查看表相关命令 - 查看表结构    desc 表名- 查看生成表的SQL    show create table 表名- 查看索引    show index from  表名 使用索引和不使用索引 由于索引是专门用于加...

stars永恒 ⋅ 昨天 ⋅ 0

easyui学习笔记

EasyUI常用控件禁用方法 combobox $("#id").combobox({ disabled: true }); ----- $("#id").combobox({ disabled: false}); validatebox $("#id").attr("readonly", true); ----- $("#id").r......

miaojiangmin ⋅ 昨天 ⋅ 0

没有更多内容

加载失败,请刷新页面

加载更多

下一页

返回顶部
顶部