TNS-12560: TNS:protocol adapter error 錯誤解決
環境: 資料庫伺服器 linux rh4 +oracle 10.2.0.4
客戶端:winxp sp2
連線資料庫時報TNS-12560錯誤
C:\Documents and Settings\Paul Yi>tnsping asm
TNS Ping Utility for 32-bit Windows: Version 9.2.0.8.0 - Production on 07-JUL-20
08 09:45:01
Copyright (c) 1997, 2006, Oracle Corporation. All rights reserved.
Used parameter files:
D:\oracle\ora92\network\admin\sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)
(HOST = 192.168.1.206)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME =orcl)))
TNS-12560: TNS:protocol adapter error
例項採用靜態註冊 在伺服器上執行正常
[oracle@localhost admin]$ lsnrctl status
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 07-JUL-2008 08:44:39
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.206)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 07-JUL-2008 08:40:31
Uptime 0 days 0 hr. 4 min. 8 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /oracle/10.2/db/network/admin/listener.ora
Listener Log File /oracle/10.2/db/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.206)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM", status UNKNOWN, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "orcl" has 1 instance(s).
Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[oracle@localhost admin]$ tnsping asm
TNS Ping Utility for Linux: Version 10.2.0.1.0 - Production on 07-JUL-2008 08:56:12
Copyright (c) 1997, 2005, Oracle. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST =192.168.1.206)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))
OK (10 msec)
[oracle@localhost admin]$
最後想到防火牆問題 把防火牆關閉後
[root@localhost ~]# service iptables stop
Flushing firewall rules: [ OK ]
Setting chains to policy ACCEPT: filter [ OK ]
Unloading iptables modules: [ OK ]
C:\Documents and Settings\Paul Yi>tnsping asm
TNS Ping Utility for 32-bit Windows: Version 9.2.0.8.0 - Production on 07-JUL
08 09:52:13
Copyright (c) 1997, 2006, Oracle Corporation. All rights reserved.
Used parameter files:
D:\oracle\ora92\network\admin\sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = T
(HOST = 192.168.1.206)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME =orcl)))
OK (0 msec)
正常 ,但想一下是透過預設埠1521訪問的,所以允許訪問伺服器上的1521埠即可
vi /etc/sysconfig/iptables
將
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
改為
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 1520:1523 -j ACCEPT
允許1520到1523的埠訪問
[root@localhost ~]# service iptables restart
Flushing firewall rules: [ OK ]
Setting chains to policy ACCEPT: filter [ OK ]
Unloading iptables modules: [ OK ]
Applying iptables firewall rules: [ OK ]
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7199859/viewspace-374281/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle的TNS-12502 錯誤原因及解決Oracle
- 關於錯誤程式碼107(err_ssl_protocol_error)SSL 協議出錯的解決方案ProtocolError協議
- PHP curl error 60 錯誤解決PHPError
- HTTP 錯誤 500.19- Internal Server Error 錯誤解決方法HTTPServerError
- 【Jenkins】data stream error|Error cloning remote repo ‘origin‘ 錯誤解決JenkinsErrorREM
- HTTP 錯誤 500.21 - Internal Server Error 解決方案HTTPServerError
- 解決 eslint 的 Parsing error: Unexpected token 錯誤EsLintError
- mysqldump error1066 錯誤的解決辦法MySqlError
- SSL錯誤ssl connect error 35的解決方案Error
- 錯誤解決:cc: Internal error: Killed (program cc1)Error
- 織夢提示dedecms error warning錯誤的解決方法Error
- Js錯誤Error物件詳解JSError物件
- IDEA發生“Error:java: 錯誤: 不支援發行版本 5”錯誤的解決方案IdeaErrorJava
- ORA-29702:error occurred in Cluster Group Service operation錯誤解決Error
- ERROR L107: ADDRESS SPACE OVERFLOW keil錯誤的解決方法Error
- FreeBSD系統下zfs: failed with error 6錯誤的解決方法AIError
- 切換分支 error: Your local changes tby checkout: 錯誤解決方法Error
- yarn add cross-env 出現 protocol error, symlink 解決方案YarnROSProtocolError
- 【ERROR】Oracle列印錯誤程式碼解釋ErrorOracle
- Ocelot錯誤解決
- 問題解決:TNS-12543: TNS:destination host unreachable
- Job for mysqld.service failed because the control process exited with error code錯誤解決MySqlAIError
- git push出現unpack failed: error Missing tree錯誤的解決方法GitAIError
- MySQL error 錯 誤 碼MySqlError
- PostgreSQL error 錯誤碼SQLError
- Error page: / Error infos: DedeCms錯誤警告Error
- 2、MySQL錯誤日誌(Error Log)詳解MySqlError
- 【ORA】ORA-12547 TNS: Lost Contact錯誤診斷
- mongodb錯誤解決辦法-bash: ./mongod: cannot execute binary file: Exec format errorMongoDBORMError
- Laravel 8使用 佇列任務出現 「 syntax error, unexpected ')' 」錯誤解決Laravel佇列Error
- 一種SYBASE資料庫錯誤DBSQL_SQL_ERROR的解決方式資料庫SQLError
- 讓SAE支援支付寶“確認發貨”介面,完美解決"protocol error"ProtocolError
- 解決 Python UnicodeEncodeError 錯誤PythonUnicodeError
- Error Curves——錯誤曲線Error
- win10程式安裝錯誤程式碼error1723怎麼解決Win10Error
- Sublime Text 2報 Decode error - output not utf-8 錯誤的解決辦法Error
- Mac提示app損壞、Error,Mac電腦最常見錯誤的解決方案MacAPPError
- IDEA解決Fatal error compiling: 錯誤: 無效的目標發行版:1.11IdeaError
- Angular 錯誤訊息:ERROR Error NullInjectorError No provider for XXAngularErrorNullIDE