连接问题:ORA-3136:inbound connection timed out

WARNING: inbound connection timed out (ORA-3136) 解决方法

SQLNET.INBOUND_CONNECT_TIMEOUT:这个参数是指客户端连接数据库服务认证的时间长,即用户连接DB的时间的,单位是秒。 当client 在INBOUND_CONNECT_TIMEOUT指定的时间内没有成功连接上服务器(db 负载大,网络延时等原因)。 那么在服务器的sqlnet.log里就会记录下客户端的IP和ORA-12170:TNS:Connect timeout occurred的错误信息。 同时客户端接收到ORA-12547:TNS:lost contact 或者ORA-12637:Packet receive failed的错误。
 
在oracle10.2.0.1之前,这个参数默认是0s。即不受连接时间的限制。在这个版本之后,为了防止Dos的攻击,将默认值该成60s.
 
有三种原因可能导致这个错误:

(1)    Server gets a connection request from a malicious client which is not supposed to connect to thedatabase , in which case the error thrown is the correct behavior. You can get the client address for which the error was thrown via sqlnet logfile.
--恶意的攻击,可以在sqlnet log里查看客户端的地址信息。
(2)    The server receives a validclient connection request but the client takes a long time to authenticate morethan the default 60 seconds.
--服务端正常的接收了客户端的请求,但是客户端用了超过默认60秒的时间来验证。
(3)    The DB server is heavily loadeddue to which it cannot finish the client logon within the timeout specified.
--DB Server 负载较大,此时也可能导致连接超时。
 
 
解决方法:

1 增加连接时间
一般情况下60s是够用的,如果60秒还报ORA-3136的错误。 Oracle 的解决方法是增加这个时间,用更多的时间来连接。 这个也是Oracle 建议的修改方法。
(1)修改sqlnet.ora:将Timeout 设成180
 SQLNET.INBOUND_CONNECT_TIMEOUT= 180
(2) 修改listener.ora
添加参数:  INBOUND_CONNECT_TIMEOUT_<listenername> = 170
加上监听名称,我的例子中的监听是LISTENER. 所以设成:
INBOUND_CONNECT_TIMEOUT_ LISTENER = 170
注意:inbound_connect_timeout_listener_name 参数的值要小于sqlnet.inbound_connect_timeout 的值。
 (3)重启监听
这样设置以后,如果clients因为系统或者网络的原因在指定的时间没有连接到DB,那么Oracle会根据需要来增加连接的时间。
 
2 关闭超时限制
在安全上允许的情况下,设置如下参数为0以关闭连接超时的限制:
(1).listener.ora:
INBOUND_CONNECT_TIMEOUT_LISTENER=0
(2).sqlnet.ora:
SQLNET.INBOUND_CONNECT_TIMEOUT=0
(3).重启实例listener
 
参考:
Note465043.1  Troubleshooting ORA - 3136WARNING Inbound Connection Timed Out
 
  • 2
    点赞
  • 15
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值