inbound connection timed out (ORA-3136)错误诊断

来源:互联网 发布:程序员转正申请书范文 编辑:程序博客网 时间:2024/04/29 18:54

原文地址:inbound connection timed out (ORA-3136)错误诊断 作者:seagull.li


Fri Oct 12 06:07:31 2007
WARNING: inbound connection timed out (ORA-3136)

参考metalink上的345197.1文章,内容如下:

Symptoms

The Oracle Net 10g parameters SQLNET.INBOUND_CONNECT_TIMEOUT and INBOUND_CONNECT_TIMEOUT_listenername default to 0 (indefinite) in 10.1.  To address Denial of Service (DOS) issues,  the parameters were set to have a default of 60 (seconds) in Oracle 10.2.

If applications are longer than 60 secs to authenticate with the Oracle database, the errors occur.The following may be seen in the alert log: WARNING: inbound connection timed out (ORA-3136)

SQLNET.INBOUND_CONNECT_TIMEOUT is set to a value in seconds and determines how long a client has to provide the necessary authentication information to a database.

INBOUND_CONNECT_TIMEOUT_listenername is set to a value in seconds and determines how long a client has to complete its connect request to the listener after the network connection has been established.

To protect both the listener and the database server, Oracle Corporation recommends setting INBOUND_CONNECT_TIMEOUT_listenername in combination with the SQLNET.INBOUND_CONNECT_TIMEOUT parameter.

Cause

Whenever default timeouts are assigned to a parameter, there may be cases where this default does not work well with a particular application. However, some type of timeout on the connection establishment is necessary to combat Denial of Service attacks on the database.  In this case, SQLNET.INBOUND_CONNECT__TIMEOUT and INBOUND_CONNECT_TIMEOUT_listenername were given default values of 60 seconds in Oracle 10.2.  It is these timeout values that can cause the errors described in this note.

Also note that it is possilbe the reason the database is slow to authenticate, may be due to an overloaded Oracle database or node.


Solution
Set the parameters SQLNET.INBOUND_CONNECT_TIMEOUT and INBOUND_CONNECT_TIMEOUT_listenername to 0 (indefinite) or to an approprate value for the application yet still combat DOS attacks (120 for example).  

These parameters are set on the SERVER side:
listener.ora: INBOUND_CONNECT_TIMEOUT_listenername
sqlnet.ora:   SQLNET.INBOUND_CONNECT_TIMEOUT

Further tuning of these parameters may be needed is the problem persists

Metalink上给出的解决方案如下:
1. set INBOUND_CONNECT_TIMEOUT_ =0 in listener.ora
2. set SQLNET.INBOUND_CONNECT_TIMEOUT = 0 in sqlnet.ora of server.
3. stop and start both listener and database.
4. Now try to connect to DB and observe the behaviour

以下是Oracle官方文档的一段:

SQLNET.INBOUND_CONNECT_TIMEOUT
Use the SQLNET.INBOUND_CONNECT_TIMEOUT parameter to specify the time, in seconds, for a client to connect with the database server and provide the necessary authentication information.

If the client fails to establish a connection and complete authentication in the time specified, then the database server terminates the connection. In addition, the database server logs the IP address of the client and an ORA-12170: TNS:Connect timeout occurred error message to the sqlnet.log file. The client receives either an ORA-12547: TNS:lost contact or an ORA-12637: Packet receive failed error message.

Without this parameter, a client connection to the database server can stay open indefinitely without authentication. Connections without authentication can introduce possible denial-of-service attacks, whereby malicious clients attempt to flood database servers with connect requests that consume resources.

To protect both the database server and the listener, Oracle Corporation recommends setting this parameter in combination with the INBOUND_CONNECT_TIMEOUT_listener_name parameter in the listener.ora file. When specifying values for these parameters, consider the following recommendations:

Set both parameters to an initial low value.
Set the value of the INBOUND_CONNECT_TIMEOUT_listener_name parameter to a lower value than the SQLNET.INBOUND_CONNECT_TIMEOUT parameter.
For example, you can set INBOUND_CONNECT_TIMEOUT_listener_name to 2 seconds and INBOUND_CONNECT_TIMEOUT parameter to 3 seconds. If clients are unable to complete connections within the specified time due to system or network delays that are normal for the particular environment, then increment the time as needed.


修改listener的inbound_connect_timeout参数的方法


方法一:
$ lsnrctl

LSNRCTL for IBM/AIX RISC System/6000: Version 10.2.0.3.0 - Production on 29-OCT-2007 10:00:57

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

Welcome to LSNRCTL, type "help" for information.

LSNRCTL> help
The following operations are available
An asterisk (*) denotes a modifier or extended command:

start               stop                status              
services            version             reload              
save_config         trace               spawn               
change_password     quit                exit                
set*                show*               

LSNRCTL> show
The following operations are available after show
An asterisk (*) denotes a modifier or extended command:

rawmode                     displaymode                 
rules                       trc_file                    
trc_directory               trc_level                   
log_file                    log_directory               
log_status                  current_listener            
inbound_connect_timeout     startup_waittime            
snmp_visible                save_config_on_stop         
dynamic_registration        

LSNRCTL> show inbound_connect_timeout
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
LISTENER parameter "inbound_connect_timeout" set to 60
The command completed successfully

LSNRCTL> set inbound_connect_timeout 0
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
LISTENER parameter "inbound_connect_timeout" set to 0
The command completed successfully

LSNRCTL> show inbound_connect_timeout
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
LISTENER parameter "inbound_connect_timeout" set to 0
The command completed successfully

LSNRCTL> set save_config_on_stop on   #表示修改参数永久生效,否则只是临时生效,下次重启监听又还原为原来的值了

LSNRCTL> exit


方法二:
修改listener.ora文件,加入:  INBOUND_CONNECT_TIMEOUT_LISTENER_NAME=0


原创粉丝点击
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 苹果下载特别慢怎么办 淘宝没有支付宝怎么办 淘宝买东西限购怎么办 淘宝被别人登录怎么办 淘宝被厂家投诉怎么办 买家退货说是假货怎么办 同行给差评怎么办 被买家举报了怎么办 淘宝商品被屏蔽怎么办 电脑处于离线状态怎么办 计算机处于离线状态怎么办 交易猫安全提醒怎么办 网吧进游戏代码怎么办 车票冲突买不了怎么办 苹果8淘宝打不开怎么办 我的淘宝打不开怎么办 福袋不支持退货怎么办 不支持跨区下单怎么办 支付宝被占用怎么办 淘宝东西失效了怎么办 访客突然下降了怎么办 淘宝店铺广告违规怎么办 苹果手机网速差怎么办 支付宝账号忘记怎么办 支付宝无法登录怎么办 什么是淘宝空间不足怎么办 支付宝授权失败怎么办 买家旺旺被打标一次怎么办 淘宝网上忘记密码怎么办 登淘宝忘记密码怎么办 手机淘宝闪退怎么办 证券账户忘了怎么办 资金账户忘了怎么办 公积金账户忘了怎么办 淘宝买家号违规怎么办? 淘宝号显示违规怎么办 淘宝网登录不了怎么办 支付宝刷脸登录失败怎么办 blue超出注册限制怎么办 电脑不识别光盘怎么办 4g按钮打不开怎么办