1. 程式人生 > >The listener supports no services解決一例

The listener supports no services解決一例

今天做Advacned Replication實驗的時候碰到一個問題,啟動目標庫監聽時,出現The listener supports no services

[[email protected] ~]$ 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> !
[[email protected] ~]$ 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

[[email protected] ~]$ 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
[

[email protected] ~]$ 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
[[email protected] ~]$ 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

[[email protected] ~]$ 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
[[email protected] ~]$ 

於是考慮通過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工具拷貝出來,修改完再拷貝回相同位置即可

這裡只需要重新載入一次監聽就可以註冊上例項了

[[email protected] ~]$ 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
[[email protected] ~]$ 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
[[email protected] ~]$ 

這裡target例項通過以上方法,成功地把例項註冊上了,注意"UNKNOWN"就表示是靜態註冊的,如果是"READY"則表示是動態註冊的

注意:動態和靜態監聽可以共存,如:

[[email protected] ~]$ 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
[[email protected] ~]$

以上是我在zlm主機上的監聽狀態,可以發現,同時配置了動態和靜態的監聽

總結:以上利用了手動修改配置靜態監聽的方法成功註冊了Oracle例項,動態監聽往往需要等例項啟動後,過一段時間才會註冊上,而靜態監聽則可以馬上註冊。而且一旦例項重啟會造成動態監聽暫時無效,有些版本的bug甚至會導致動態監聽的註冊就再也起不來了。所以我對於監聽的觀點是,儘量配置靜態監聽,這樣就可以避免很多由監聽帶來的問題,諸如我們經常會碰到的幾個ora error:ora-12541、ora-12514、ora-12154等,尤其是在RAC和DG中,一個監聽的問題,往往會帶來很大的麻煩,尤其需要引起大家的注意。

-------------------------------------------------------------------------------------------------------
By aaron8219 Chinaunix Blog:http://blog.chinaunix.net/uid/24612962.html

原創內容,轉載請註明連結,謝謝!

相關推薦

The listener supports no services解決

今天做Advacned Replication實驗的時候碰到一個問題,啟動目標庫監聽時,出現The listener supports no services [[email protected] ~]$ lsnrctl start LSNRCTL for Li

Oracle啟動監聽報錯:The listener supports no services解決

報錯提示: The listener supports no services The command completed successfully 如圖所示: 這樣啟動後遠端連線會報錯:oracle ORA-12514:TNS:listener does not

The listener supports no services解決

今天 在PC上想測試 一下DG同步 ,所以配置了兩個監聽,但在啟動 過程中總是提示:The listener supports no services 開啟 listener.ora檢視發現 配置的監聽名字 叫 :LISTENER_PRIMARY 而SID_LIST_LIS

oracle 11g The listener supports no services

測試環境,遇到錯誤如下: ORA-12505: TNS:listener does not currently know of SID given in connect 本機連線,SID確信是對的,於是檢視監聽: The listener supports no servi

Oracle啟動監聽提示:The listener supports no services 的處理方法

[[email protected] admin]$ lsnrctl status LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 19-APR-2016 10:51:08 Copyrig

Oracle The listener supports no services

今天碰到這個問題  問同事 被jj了  感覺自己技術太Low了  最後厚臉皮問了搞定了。 在檢視oracle監聽狀態的時候,會出現下面資訊 [[email protected] ~]$ lsnrctl status LSNRCTL for Linux: Vers

ORACLE啟動監聽出現The listener supports no services

解決方案有以下幾種: 第一種. 通過重啟伺服器,來修復監聽器. 登陸資料庫, sqlplus / as sysdba; SQL>shudown SQL>startup #startup  啟動 #shutdown 關閉 #lsnrctl s

The listener supports no services

$ lsnrctl start 報錯提示: The listener supports no services The command completed successfully 登入資料庫: $sqlplus / as sysdba 顯示服務名: SQ

No implementation found for native 以及 java.lang.UnsatisfiedLinkError問題解決

JNI 問題記錄如下: 05-09 01:36:35.029: I/dalvikvm-heap(766): Grow heap (frag case) to 8.971MB for 1228816-byte allocation 05-09 01:36:35.368: D/

ASP.NET MVC Identity 兩個多個連接字符串問題解決

fail conn init led user asp identity 字符串 initial 按照ASP.NET MVC Identity建立了一個用戶權限管理模塊,由於還要加自己已有的數據庫,所以建立了一個實體模型,建立了之後,發現登錄不了: 一直顯示“Login i

uboot 網路不通問題解決1

平臺:Hi3531 PHY:RTL8211   現象:在uboot中執行ping命令的時候,總是超時。   過程: 使用uboot自帶的phy操作命令mii讀出的資料全是0xff。這裡要介紹一下uboot中的phy暫存器操作命令mii。 關於uboot

libmysqlclient_r.so.16 缺失解決

使用YUM 升級CentOS 到了最新版本,為了保障系統的安全性,同時把PHP 和MYSQL升級到了最新版本。 由於升級PHP和MYSQL使用的是REMI 的Repo. 導致升級後原先的Python程式不能用。因為MySQLdb找不到libmysqlclient_r.so.1

資料庫伺服器卡住問題解決

現象:資料庫伺服器在週一到週五的八點半到九點期間,伺服器負載很嚴重,cpu%達到100%,奇怪的是system%特別高,90%以上,整個系統卡住。過了九點後就慢慢恢復了。 從資料庫的awr報告看,這個時間段沒有特別的SQL語句。考慮到八點半到九點一般是系統使用

OE問題解決

         最近有個客戶需要將現有的工作組模式轉換成域模式,希望能夠以最小改變使用者環境為主要目的進行轉換,使用者當時修改登錄檔中的PROFILE值將使用者的環境全部修改為原來本地的使用者的環境路徑,一切看起來都沒有什麼問題,當開啟OE,問題出來了,問題圖片如下:   

windows 下php 安裝問題解決

好多年沒有玩過PHP了,今天重新來安裝apache和php 折騰半天后,apache成功,php成功,phpinfo執行正常 但是extension_dir 始終沒有生效 這種問題若干年前也遇到過類似問題,也沒有在意,莫名就折騰過去了。 今天就細緻了一下,折騰了幾個小時後

'DataVisualization' does not exist in the namespace 'System.Web.UI'解決辦法

之前專案是vs2010 aspx專案,用vs2017開啟後   有一行錯誤:CS0234 C# The type or namespace name 'DataVisualization' does not exist in the namespace 'System.Web.UI' (are

MySQL故障處理_Another MySQL daemon already running with the same unix socket

read mon 解決 roo blog local 啟動mysql style 處理 MySQL故障處理一例:“Another MySQL daemon already running with the same unix socket”。 [root@test-121

解決openstack “failed to connect to server (code: 1006)”故障

code: 1006 failed 控制臺 新建 openstack版本環境:ocata安裝完成ocata版本後,新建主機實例後,通過管理端進入主機實例的控制臺時,報錯:“failed to connect to server (code: 1006)”解決思路:1、檢查日誌文件,通過日誌尋找

Starting MySQL....The server quit without updating PID file[失敗]/lib/mysql/ip12189.pid). 錯誤

bold title lan char .net 失敗 etc nbsp 啟動會 [[email protected]/* */ etc]# service mysqld startStarting MySQL....The server quit withou

解決次“HTTP Error 400. The request URL is invalid”的錯誤

cat 2.0 get run 情況 -i tle 錯誤信息 重啟 今天將圖片服務切到使用了cdn的機器上面去,然後就部分圖片報如下圖錯誤“HTTP Error 400. The request URL is invalid” 看到這種錯誤信息,一般的開發者心中可能會猜測