文档章节

The listener supports no services 问题解决

xiaoxin
 xiaoxin
发布于 2015/02/25 19:53
字数 1767
阅读 142
收藏 0

今天做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中,一个监听的问题,往往会带来很大的麻烦,尤其需要 引起大家的注意。

本文转载自:http://www.xuebuyuan.com/2066067.html

共有 人打赏支持
xiaoxin
粉丝 20
博文 263
码字总数 20339
作品 0
海淀
私信 提问
Oracle启动监听报错:The listener supports no services解决

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

sfih
2018/06/26
0
0
The listener supports no services解决一例

The listener supports no services解决一例 Listener动态监听静态监听注册实例 今天做Advacned Replication实验的时候碰到一个问题,启动目标库监听时,出现The listener supports no serv...

飓风2000
2014/06/17
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
2018/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

没有更多内容

加载失败,请刷新页面

加载更多

dockerfile 镜像构建(1)

通用dockerfile 利用已经编译好的.jar 来构建镜像。要构建的目录如下: [root@iZuf61quxhnlk9m2tkx16cZ demo_jar]# docker build -t demo:1 . 运行镜像: [root@iZuf61quxhnlk9m2tkx16cZ de...

Canaan_
11分钟前
0
0
Redis radix tree源码解析

Redis实现了不定长压缩前缀的radix tree,用在集群模式下存储slot对应的的所有key信息。本文将详述在Redis中如何实现radix tree。 核心数据结构 raxNode是radix tree的核心数据结构,其结构体...

阿里云云栖社区
14分钟前
3
0
vue import 传入变量

在做动态添加component的时候,传入变量就会报错,出现以下错误信息: vue-router.esm.js?fe87:1921 Error: Cannot find module '@/components/index'. at eval (eval at ./src/components ......

朝如青丝暮成雪
16分钟前
0
0
Flutter开发 Dio拦截器实现token验证过期的功能

前言: 之前分享过在Android中使用Retrofit实现token失效刷新的处理方案,现在Flutter项目也有“token验证过期”的需求,所以接下来我简单总结一下在Flutter项目中如何实现自动刷新token并重...

EmilyWu
17分钟前
5
0
final Map可以修改内容,final 常量不能修改

1.final Map 可以put元素,但是不可以重新赋值 如: final Map map = new HashMap(); map = new HashMap();//不可以 因为栈中变量map引用地址不能修改 2.final str = “aa”; str = "bb";/......

qimh
21分钟前
0
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部