RAC hosts沒有配置導致TNS-12541: TNS:no listener

來源:互聯網
上載者:User

TNS-12541: TNS:no listener
 這次錯誤我總結一下有三種情況
 1. 本地監聽程式沒有開起來
 2. 伺服器網路到用戶端網路不通
 3. Hosts裡面配置問題

[Oracle@his1 admin]$ tnsping crds3db2  用戶端tnsping提示程式無監聽

TNS Ping Utility for Linux: Version 11.2.0.2.0 - Production on 28-MAY-2014 11:11:57
 
Copyright (c) 1997, 2010, Oracle.  All rights reserved.

Used parameter files:

Used TNSNAMES adapter to resolve the alias
 Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.20.8)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = crds3db)))
 TNS-12541: TNS:no listener
 到oracle使用者查看監聽狀態為正常,但是有一個節點1ip沒有註冊到節點2監聽上面
 [oracle@his1 ~]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 28-MAY-2014 10:56:09

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

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
 STATUS of the LISTENER
 ------------------------
 Alias                    LISTENER
 Version                  TNSLSNR for Linux: Version 11.2.0.2.0 - Production
 Start Date                28-MAY-2014 10:09:10
 Uptime                    0 days 0 hr. 46 min. 59 sec
 Trace Level              off
 Security                  ON: Local OS Authentication
 SNMP                      OFF
 Listener Parameter File  /app/grid/product/11.2.0/grid/network/admin/listener.ora
 Listener Log File        /app/grid/grid_base/diag/tnslsnr/his1/listener/alert/log.xml
 Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.20.6)(PORT=1521)))
 Services Summary...
 Service "+ASM" has 1 instance(s).
  Instance "+ASM1", status READY, has 1 handler(s) for this service...
 Service "crds3db" has 1 instance(s).
  Instance "crds3db1", status READY, has 1 handler(s) for this service...
 The command completed successfully
 
[root@his1 admin]# vi /etc/hosts
 把裡面刪除his1 因為兩個計算名衝突導致監聽只註冊到127.0.0.1
 # Do not remove the following line, or various programs
 # that require network functionality will fail.
 127.0.0.1    his1  localhost.localdomain localhost
 #::1            localhost6.localdomain6 localhost6
 192.168.20.1      his1
 192.168.20.2      his2
 192.168.20.5      his-scan
 192.168.20.6      his1-vip
 192.168.20.7      his2-vip
 192.168.20.15      hisdg
 10.0.0.1          his1-priv
 10.0.0.2          his2-priv
 [grid@his2 ~]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 28-MAY-2014 11:18:14

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
 STATUS of the LISTENER
 ------------------------
 Alias                    LISTENER
 Version                  TNSLSNR for Linux: Version 11.2.0.2.0 - Production
 Start Date                28-MAY-2014 11:06:52
 Uptime                    0 days 0 hr. 11 min. 22 sec
 Trace Level              off
 Security                  ON: Local OS Authentication
 SNMP                      OFF
 Listener Parameter File  /app/grid/product/11.2.0/grid/network/admin/listener.ora
 Listener Log File        /app/grid/grid_base/diag/tnslsnr/his2/listener/alert/log.xml
 Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.20.2)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.20.7)(PORT=1521)))
 Services Summary...
 Service "+ASM" has 1 instance(s).
  Instance "+ASM2", status READY, has 1 handler(s) for this service...
 Service "crds3db" has 1 instance(s).
  Instance "crds3db2", status READY, has 1 handler(s) for this service...
 The command completed successfully
 C:\Users\oracle>tnsping crds3db

TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 28-5月 -
 2014 11:32:16

Copyright (c) 1997, 2010, Oracle.  All rights reserved.

已使用的參數檔案:
 D:\app\mxq\product\11.2.0\dbhome_1\network\admin\sqlnet.ora


已使用 TNSNAMES 適配器來解析別名
 嘗試串連 (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.1
 68.20.1)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = crds3db)))
 OK (10 毫秒)
 -
 ---THE END---

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.