起因:
最近研发反应JDBC和PL/SQL工具连接过慢,昨天事情多懒得去管
今早检查alter.log后发现报错
Fatal NI connect error
12637, connecting to:
(LOCAL=NO)
VERSION
INFORMATION:
TNS for Linux: Version 11.2.0.1.0 - Production
Oracle Bequeath NT Protocol Adapter for Linux: Version 11.2.0.1.0 -
Prod
uction
TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.1.0 -
Production
Time: 23-APR-2013
11:05:10
Tracing not turned
on.
Tns error
struct:
ns main err code: 12637
TNS-12637: Packet receive
failed
ns secondary err code: 12532
nt main err code: 0
nt secondary err code: 0
nt OS err code: 0
opiodr aborting process
unknown ospid (24234) as a result of ORA-609
Tue Apr 23 11:05:15
2013
故障分析
检查 listener 日志确认没有异常,在部分机器 TNSPING XXX 60 等进行尝试结果正常,无链接问题
明显感觉,只要第一次 tnsping 链接正常,之后的 jdbc 链接就正常;如果第一次不正常,之后的 jdbc 链接就容易返回超时的错误。
尝试重启 lsnrctl stop/start
和重新加载配置文件lsnrctl
reload 重新注册数据库实例,仍然无法解决超时错误。
tnsping xxxx N 的时候明显观察到:
OK (56730 msec)OK (80 msec)
OK (80 msec)
OK (70 msec)
OK (70 msec)
OK (60 msec)
OK (47820 msec)
OK (70 msec)
同时 PING IP
的结果并没有出现延时,机器之前并未设置防火墙等,可以排除网络和防火墙问题。在连续
TNSPING
的情况下,出现明显链接延时。
解决方案
方案一:(有效,但是由于是测试环境,所以影响层面未评估)
注释掉 /etc/resolve.conf 配置文件中对 DNS 的解析解决[oracle@vcdog log]$ cat /etc/resolv.conf #nameserver 202.106.0.20
方案二:官方文档(效果不明显)
ORA-609 TNS-12537 and TNS-12547 in 11g Alert.log [ID
1116960.1]
Cause
The ORA-609 error is thrown when a client connection
of any kind failed to complete or aborted the connection process
before the server process was completely spawned.
Very often, this connection