ORA-12170: TNS:Connect timeout occurred
今天數據庫出現短暫的所有會話斷開1至3分鍾。
查看sqlnet.log (因為是生產環境所以我將IP都屏蔽下)
Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=1.0.0.0)(PORT=33534))
ns secondary err code: 12606
nt main err code: 0
nt secondary err code: 0
nt OS err code: 0
Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=1.0.0.0)(PORT=54370))
ns secondary err code: 12606
nt main err code: 0
nt secondary err code: 0
nt OS err code: 0
Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=1.0.0.0)(PORT=50517))
ns secondary err code: 12606
nt main err code: 0
nt secondary err code: 0
nt OS err code: 0
Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=1.0.0.0)(PORT=47319))
ns secondary err code: 12606
nt main err code: 0
nt secondary err code: 0
nt OS err code: 0
Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=1.0.0.0)(PORT=54752))
ns secondary err code: 12606
nt main err code: 0
nt secondary err code: 0
nt OS err code: 0
Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=1.0.0.0)(PORT=47366))
ns secondary err code: 12606
nt main err code: 0
nt secondary err code: 0
nt OS err code: 0
Fatal NI connect error 12170.
VERSION INFORMATION:
TNS for HPUX: Version 10.2.0.4.0 - Production
Oracle Bequeath NT Protocol Adapter for HPUX: Version 10.2.0.4.0 - Production
TCP/IP NT Protocol Adapter for HPUX: Version 10.2.0.4.0 - Production
Time: 31-JUL-2014 12:26:36
Tracing not turned on.
Tns error struct:
ns main err code: 12535
TNS-12535: TNS:operation timed out
ns secondary err code: 12560
nt main err code: 505
TNS-00505: Operation timed out
nt secondary err code: 238
nt OS err code: 0
Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=1.0.0.0)(PORT=60607))
在metalink 一直糾結12606錯誤,也沒找到什么有用的線索。最后在群里問了下傷哥,他給了我一篇他的文章http://blog.itpub.net/29477587/viewspace-1078684/
文章介紹這個錯誤可能是由於網絡或系統延遲,或者它可能表明,在服務器上存在惡意客戶機試圖攻擊服務器引起的。
可以嘗試修改SQLNET.INBOUND_CONNECT_TIMEOUT參數
sqlnet.ora參數SQLNET.INBOUND_CONNECT_TIMEOUT
表示等待用戶認證超時的時間,單位是秒,缺省值是60秒
如果用戶認證超時了,服務器日志alert.log顯示出錯信息
WARNING: inbound connection timed out (ORA-3136)
查看bdump 中的 log
Thu Jul 31 11:06:13 2014
WARNING: inbound connection timed out (ORA-3136)
Thu Jul 31 11:06:13 2014
WARNING: inbound connection timed out (ORA-3136)
Thu Jul 31 11:06:13 2014
WARNING: inbound connection timed out (ORA-3136)
Thu Jul 31 11:06:13 2014
WARNING: inbound connection timed out (ORA-3136)
Thu Jul 31 11:06:13 2014
WARNING: inbound connection timed out (ORA-3136)
Thu Jul 31 11:06:13 2014
WARNING: inbound connection timed out (ORA-3136)
Thu Jul 31 11:06:13 2014
WARNING: inbound connection timed out (ORA-3136)
Thu Jul 31 11:06:13 2014
WARNING: inbound connection timed out (ORA-3136)
Thu Jul 31 11:06:13 2014
WARNING: inbound connection timed out (ORA-3136)
Thu Jul 31 11:06:13 2014
WARNING: inbound connection timed out (ORA-3136)
Thu Jul 31 11:06:13 2014
WARNING: inbound connection timed out (ORA-3136)
Thu Jul 31 11:06:13 2014
WARNING: inbound connection timed out (ORA-3136)
Thu Jul 31 11:06:13 2014
WARNING: inbound connection timed out (ORA-3136)
Thu Jul 31 11:06:13 2014
WARNING: inbound connection timed out (ORA-3136)
Thu Jul 31 11:06:13 2014
WARNING: inbound connection timed out (ORA-3136)
Thu Jul 31 11:06:13 2014
WARNING: inbound connection timed out (ORA-3136)
Thu Jul 31 11:06:13 2014
WARNING: inbound connection timed out (ORA-3136)
Thu Jul 31 11:06:13 2014
WARNING: inbound connection timed out (ORA-3136)
Thu Jul 31 11:06:13 2014
WARNING: inbound connection timed out (ORA-3136)
Thu Jul 31 11:06:13 2014
WARNING: inbound connection timed out (ORA-3136)
Thu Jul 31 11:06:13 2014
WARNING: inbound connection timed out (ORA-3136)
Thu Jul 31 11:06:13 2014
WARNING: inbound connection timed out (ORA-3136)
Thu Jul 31 11:06:13 2014
WARNING: inbound connection timed out (ORA-3136)
Thu Jul 31 11:06:13 2014
WARNING: inbound connection timed out (ORA-3136)
Thu Jul 31 11:06:13 2014
WARNING: inbound connection timed out (ORA-3136)
OK,果然是超時的原因。
解決方法:
修改sqlnet.ora文件中的參數SQLNET.INBOUND_CONNECT_TIMEOUT
編輯$ORACLE_HOME/network/admin/sqlnet.ora
SQLNET.INBOUND_CONNECT_TIMEOUT=0