ITPub博客

首页 > 数据库 > Oracle > WARNING: inbound connection timed out (ORA-3136)

WARNING: inbound connection timed out (ORA-3136)

原创 Oracle 作者:kuqlan 时间:2013-09-19 00:59:02 0 删除 编辑

今天有个系统出现了应用登录不上的现象,在后台通过sys用户能连oracle发现可以正常链接,
但是其他用户链接不上...
-bash-3.00# su - oracle
[oracle@dbserv2 ~]$ sqlplus / as sysdba

sys@testdb> conn system/testdb

....无响应,然后按Ctl+C取

ERROR:
ORA-01013: user requested cancel of current operation

Warning: You are no longer connected to ORACLE.

查看listener.log和sqlnet.log日志文件大小属于正常:
[oracle@dbserv2 ~]$ cd /oracle/product/10.2.0/network/log/
[oracle@dbserv2 log]$ ls -lah
total 446M
drwxr-x--- 2 oracle oinstall 4.0K Apr 7 2010 .
drwxr-x--- 11 oracle oinstall 4.0K Mar 19 2010 ..
-rw-r--r-- 1 oracle oinstall 443M Sep 18 10:40 listener.log
-rw-r--r-- 1 oracle oinstall 2.6M Sep 18 10:27 sqlnet.log

[@more@]

从数据库日志看有ORA-3136错误:
[oracle@dbserv2 oracle]$ cd /oracle/admin/testdb/bdump
[oracle@dbserv2 bdump]$ tail -200lf alert_testdb.log
WARNING: inbound connection timed out (ORA-3136)
Wed Sep 18 09:54:49 2013
WARNING: inbound connection timed out (ORA-3136)
Wed Sep 18 09:54:49 2013
WARNING: inbound connection timed out (ORA-3136)
Wed Sep 18 09:54:49 2013
WARNING: inbound connection timed out (ORA-3136)
Wed Sep 18 09:54:49 2013
WARNING: inbound connection timed out (ORA-3136)
Wed Sep 18 09:54:49 2013
WARNING: inbound connection timed out (ORA-3136)
Wed Sep 18 09:54:49 2013
WARNING: inbound connection timed out (ORA-3136)
Wed Sep 18 09:54:49 2013

可能的原因有:
1.网络攻击,例如半开连接攻击
Server gets a connection request from a malicious client which is not supposed to connect to the database ,
in which case the error thrown is the correct behavior. You can get the client address for which the error was thrown via sqlnet log file.
2.Client在default 60秒内没有完成认证
The server receives a valid client connection request but the client takes a long time to authenticate more than the default 60 seconds.
3.DB负载太高
The DB server is heavily loaded due to which it cannot finish the client logon within the timeout specified.


针对ORA-3136问题可以修改网络配置文件某个参数可以避免:
修改/oracle/oms/102_64/network/admin/sqlnet.ora

但是针对
Thread 1 cannot allocate new log, sequence 130357
Checkpoint not complete
是数据库写操作超载有关,简单增加日志文件方式无法解决问题根源(日志切换过于频繁,不到一分钟切换一次)。

Current log# 2 seq# 130356 mem# 0: /data/oradata/bossrpt/redo02.log
Wed Sep 18 10:55:33 2013
Thread 1 advanced to log sequence 130357
Current log# 3 seq# 130357 mem# 0: /data/oradata/bossrpt/redo03.log
Wed Sep 18 10:56:39 2013
Thread 1 cannot allocate new log, sequence 130358
Checkpoint not complete
Current log# 3 seq# 130357 mem# 0: /data/oradata/bossrpt/redo03.log
Wed Sep 18 11:01:30 2013
Thread 1 advanced to log sequence 130358
Current log# 1 seq# 130358 mem# 0: /data/oradata/bossrpt/redo01.log
Wed Sep 18 11:02:51 2013
Thread 1 cannot allocate new log, sequence 130359
Checkpoint not complete
Current log# 1 seq# 130358 mem# 0: /data/oradata/bossrpt/redo01.log


处理过程:

一、查看数据库中listener.ora中的inbound_connect_timeout参数值

进入lsnrctl,查看inbound_connect_timeout参数:

LSNRCTL> show inbound_connect_time

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbserv2)(PORT=1521)))

LISTENER parameter "inbound_connect_timeout" set to 0

The command completed successfully

如果inbound_connect_timeout参数值不为0,则可以修改为0

修改:

LSNRCTL> set inbound_connect_time 0

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbserv2)(PORT=1521)))

LISTENER parameter "inbound_connect_timeout" set to 0

The command completed successfully


二、修改/oracle/oms/102_64/network/admin/sqlnet.ora

SQLNET.INBOUND_CONNECT_TIMEOUT = 0

[oracle@dbserv2 testdb]$ cd $ORACLE_HOME
[oracle@dbserv2 10.2.0]$ cd network/admin/
[oracle@dbserv2 admin]$ ls
[oracle@dbserv2 admin]$ vi sqlnet.ora

# sqlnet.ora Network Configuration File: /oracle/product/10.2.0/network/admin/sqlnet.ora
# Generated by Oracle configuration tools.
#SQLNET.EXPIRE_TIME=25
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
SQLNET.INBOUND_CONNECT_TIMEOUT = 0


"sqlnet.ora" 7L, 236C written

三、重新载入listener

[oracle@dbserv2 admin]$ lsnrctl

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 18-SEP-2013 10:50:10

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

Welcome to LSNRCTL, type "help" for information.

LSNRCTL> reload
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbserv2)(PORT=1521)))
The command completed successfully
LSNRCTL>


参考官方说明关于该警告的说明:

Note:465043.1
The "WARNING: inbound connection timed out (ORA-3136)" in the alert log indicates that the client was not able to complete it's authentication within the period of time specified by parameter SQLNET.INBOUND_CONNECT_TIMEOUT.
You may also witness ORA-12170 without timeout error on the database server sqlnet.log file.
This entry would also have the clinet address which failed to get authenticated. Some applications or JDBC thin driver applications may not have these details.

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/18841027/viewspace-1060927/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
Oracle技术爱好者,Oracle10g OCM,网名 KUQLAN ,具有7的年Oracle数据库管理实践,曾经参加过BOSS、ERP、云计算(OpenStack+kvm)等项目的一线工作。以前写博客是为了自己,而现在是为了自己和别人。因为领会了帮助别人和分享、沉淀和积累会创造快乐和价值...

注册时间:2009-01-26

  • 博文量
    183
  • 访问量
    1681013