Oracle10gR2 ORA-3136 错误解决办法

警告日志文件中(alert.log)持续出现如下错误:

$ vi alert_$ORACLE_SID.log
...
Sun Sep 27 12:39:14 2009
WARNING: inbound connection timed out (ORA-3136)
Sun Sep 27 12:44:26 2009
WARNING: inbound connection timed out (ORA-3136)
...

同时在sqlnet.log中记录了如下错误:

$ tail -50 $ORACLE_HOME/network/log/sqlnet.log
***********************************************************************
Fatal NI connect error 12170.
VERSION INFORMATION:
TNS for Linux: Version 10.2.0.4.0 - Production
Oracle Bequeath NT Protocol Adapter for Linux: Version 10.2.0.4.0 - Production
TCP/IP NT Protocol Adapter for Linux: Version 10.2.0.4.0 - Production
Time: 27-SEP-2009 12:44:26
Tracing not turned on.
Tns error struct:
ns main err code: 12535
TNS-12535: TNS:operation timed out
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=192.168.41.42)(PORT=1309))

这是和网络连接相关的一个错误, Oracle Metalink上给出了如下的解决方案:

1.set INBOUND_CONNECT_TIMEOUT_<listenername> =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

其实只要reload一下Listner应该就可以了.

解决步骤如下:

1) 编辑listener.ora, 我的监听名是默认的LISTENER, 该参数默认是60
$ vi $ORACLE_HOME/network/admin/listener.ora
...
INBOUND_CONNECT_TIMEOUT_LISTENER = 0

2) 编辑sqlnet.ora
$ vi $ORACLE_HOME/network/admin/sqlnet.ora
...
SQLNET.INBOUND_CONNECT_TIMEOUT = 0

3) 重载监听
$ lsnrctl reload
$ lsnrctl

LSNRCTL for Linux: Version 10.2.0.4.0 - Production on 27-SEP-2009 14:18:03

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

Welcome to LSNRCTL, type "help" for information.

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

4) 观察是否还有问题产生.

 

INBOUND_CONNECT_TIMEOUT 参数说明如下:

SQLNET.INBOUND_CONNECT_TIMEOUT
Purpose
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.

See Also:
Oracle9i Net Services Administrator's Guide for information about configuring these parameters

Default
None

Example
SQLNET.INBOUND_CONNECT_TIMEOUT=3

 



--End--

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值