文档章节

The listener supports no services解决一例

飓风2000
 飓风2000
发布于 2014/06/17 14:53
字数 1838
阅读 197
收藏 1

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
粉丝 36
博文 322
码字总数 135577
作品 0
浦东
高级程序员
私信 提问
Oracle启动监听报错:The listener supports no services解决

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

sfih
06/26
0
0
总有些莫名其妙的错误

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

yonge
2009/03/03
814
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
07/02
0
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
348
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 first stopping the container and the ......

oschina
2014/03/08
1K
6

没有更多内容

加载失败,请刷新页面

加载更多

Spak—— sparkCore源码解析之RangePartitioner源码

   分区过程概览 RangePartitioner分区执行原理: 计算总体的数据抽样大小sampleSize,计算规则是:至少每个分区抽取20个数据或者最多1M的数据量。 根据sampleSize和分区数量计算每个分区的...

freeli
8分钟前
0
0
从内部自用到对外服务,配置管理的演进和设计优化实践

本文整理自阿里巴巴中间件技术专家彦林在中国开源年会上的分享,通过此文,您将了解到: 微服务给配置管理所带来的变化 配置管理演进过程中的设计思考 配置管理开源后的新探索 配置中心控制台...

阿里云官方博客
9分钟前
0
0
MySQL用户管理,常用MySQL语句、MySQL数据库备份恢复

12月6日任务 13.4 mysql用户管理 13.5 常用sql语句 13.6 mysql数据库备份恢复 13.4 mysql用户管理 grant all on *.* to 'user1' identified by 'passwd'; grant SELECT,UPDATE,INSERT on db......

zgxlinux
10分钟前
1
0
Spring异常之Druid – unregister mbean error

Spring异常之Druid – unregister mbean error 2017年04月19日 12:13:42 Dr.Zhu 阅读数:6688 版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/zt_fucker/arti...

linjin200
16分钟前
1
0
微信小程序webview问题

今天在改小程序的时候在使用webview的时候切换webview的地址行为,出现了诡异的情况。 默认querystring里会有多个?符号,使用的时候被微信给截取了,导致程序找不到改页面。 而且querystri...

钟元OSS
19分钟前
1
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部