ORA-12170:TNS connect timeout occurred

來源:互聯網
上載者:User
公司伺服器周末要加硬碟,周一來後應用連不上了。報錯如下 報錯: ORA-12170:TNS connect timeout occurred 
第一反應是監聽沒開:    1. 測試了一下, 連線逾時沒用ping 通
C:\Users\Administrator>tnsping brorcl

TNS Ping Utility for 64-bit Windows: Version 11.2.0.1.0 - Production on 15-6月 -2015 09:45:43

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

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


已使用 TNSNAMES 適配器來解析別名
嘗試串連 (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.14.147.112)(PORT = 42525)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = brorcl)))
TNS-12535: TNS: 操作逾時
2. 我登陸到遠程伺服器上,查看了一下監聽的狀態
C:\Documents and Settings\Administrator>lsnrctl status

LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 15-6月 -2015 09:52:54

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Production
Start Date                15-6月 -2015 09:36:02
Uptime                    0 days 0 hr. 16 min. 55 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   F:\app\Administrator\product\11.2.0\dbhome_1\network\admin\listener.ora
Listener Log File         F:\app\Administrator\product\11.2.0\dbhome_1\network\log\listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=x3650m3)(PORT=47512)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=47512)))
Services Summary...
Service "BANKASSIST" has 1 instance(s).
  Instance "brorcl", status READY, has 1 handler(s) for this service...
Service "CLRExtProc" has 1 instance(s).
  Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "brorcl" has 2 instance(s).
  Instance "brorcl", status UNKNOWN, has 1 handler(s) for this service...
  Instance "brorcl", status READY, has 1 handler(s) for this service...
Service "brorclXDB" has 1 instance(s).
  Instance "brorcl", status READY, has 1 handler(s) for this service...
The command completed successfully
看到監聽也正常,本地串連進去也很正常。
3.  我想了一下本地能訪問遠端連線不上是不是防火牆問題,於是我關閉了windows防火牆,果然在遠程tnsping 能ping通了;
4. 結果:應該是防火牆有改動了,最後把 伺服器防火牆的 ip和連接埠添加為例外,應用恢複正常了。
總結: 一般遇到tns 的問題通常都是監聽或者是網路問題           1. 查看監聽是否正常           2. 查看 ip 或連接埠有沒有改動           3. 查看防火牆



聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.