Fatal NI connect error 12170

自从数据库从10g升级到11g之后,alert日记老是报 12170 error
Fatal NI connect error 12170.


  VERSION INFORMATION:
        TNS for Linux: Version 11.2.0.4.0 - Production
        Oracle Bequeath NT Protocol Adapter for Linux: Version 11.2.0.4.0 - Production
        TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.4.0 - Production
  Time: 20-10月-2014 10:32:45
  Tracing not turned on.
  Tns error struct:
    ns main err code: 12535


TNS-12535: TNS: 操作超时
    ns secondary err code: 12560
    nt main err code: 505


TNS-00505: 操作超时
    nt secondary err code: 110
    nt OS err code: 0
  Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=120.31.131.11)(PORT=3381))
Mon Oct 20 10:32:48 2014




***********************************************************************


Fatal NI connect error 12170.


  VERSION INFORMATION:
        TNS for Linux: Version 11.2.0.4.0 - Production
        Oracle Bequeath NT Protocol Adapter for Linux: Version 11.2.0.4.0 - Production
        TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.4.0 - Production
  Time: 20-10月-2014 10:32:48
  Tracing not turned on.
  Tns error struct:
    ns main err code: 12535


TNS-12535: TNS: 操作超时
    ns secondary err code: 12560
    nt main err code: 505


TNS-00505: 操作超时
    nt secondary err code: 110
    nt OS err code: 0
  Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=120.31.131.11)(PORT=2622))
Mon Oct 20 10:32:49 2014




***********************************************************************


Fatal NI connect error 12170.


  VERSION INFORMATION:
        TNS for Linux: Version 11.2.0.4.0 - Production
        Oracle Bequeath NT Protocol Adapter for Linux: Version 11.2.0.4.0 - Production
        TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.4.0 - Production
  Time: 20-10月-2014 10:32:49
  Tracing not turned on.
  Tns error struct:
    ns main err code: 12535


TNS-12535: TNS: 操作超时
    ns secondary err code: 12560
    nt main err code: 505


TNS-00505: 操作超时
    nt secondary err code: 110
    nt OS err code: 0
  Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=120.31.131.11)(PORT=3376))
Mon Oct 20 10:32:49 2014

到MOS查了一下:

Note the time of the client corresponding client connection(s) in the listener log.  Here you may find a particular client,   
set of clients or particular applications that are improperly disconnecting causing the timeout errors to be raised and recorder in the database alert log.  
You may choose to revert from the new Automatic Diagnostic Repository (ADR) method to prevent the Oracle Net diagnostic details from being written to the alert log(s)   
by setting the following Oracle Net configuration parameters:  
To revert to Oracle Net Server tracing/logging, set following parameter in the server's sqlnet.ora :  
DIAG_ADR_ENABLED = OFF  
Also, to back out the ADR diag for the Listener component, set following parameter in the server's listener.ora:  
DIAG_ADR_ENABLED_ = OFF  
- Where the would be replaced with the actual name of the configured listener(s) in the listener.ora configuration file.  For example,   
if the listener name is 'LISTENER', the parameter would read:  
  
DIAG_ADR_ENABLED_LISTENER = OF  
Reload or restart the TNS Listener for the parameter change to take effect.

查资料得知这个问题是由于Automatic Diagnostic Repository中的 Oracle Net diagnostic在默认的情况下是开启的,当数据库和客户端的连接超过特定时间,就会把这样的信息写入到alert日志中,所以这不是一个致命的问题,如果偶尔出现,可以忽略有点类此ora-3136的错误。

1.在服务端的sqlnet.ora文件中设置以下参数


DIAG_ADR_ENABLED = OFF
2.在服务端的listener.ora中设置以下参数


DIAG_ADR_ENABLED_ = OFF
这个根据你实际的监听名称来替换,比如你的监听名称叫'LISTENER',那么这个参数就设置为
DIAG_ADR_ENABLED_LISTENER = OFF


3.reload或者restart监听使配置生效

srvctl stop listener

srvctl start listener

二、郁闷的是重启完监听后还是不断的出现12170 error

跟上面不同的是:多了 WARNING: inbound connection timed out (ORA-3136),一些代码也不一样了,如下:

Fatal NI connect error 12170.


  VERSION INFORMATION:
        TNS for Linux: Version 11.2.0.4.0 - Production
        Oracle Bequeath NT Protocol Adapter for Linux: Version 11.2.0.4.0 - Production
        TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.4.0 - Production
  Time: 20-10月-2014 15:01:34
  Tracing not turned on.
  Tns error struct:
    ns main err code: 12535


TNS-12535: TNS: 操作超时
    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=120.31.131.11)(PORT=2217))
WARNING: inbound connection timed out (ORA-3136)
Mon Oct 20 15:01:36 2014




***********************************************************************


Fatal NI connect error 12170.


  VERSION INFORMATION:
        TNS for Linux: Version 11.2.0.4.0 - Production
        Oracle Bequeath NT Protocol Adapter for Linux: Version 11.2.0.4.0 - Production
        TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.4.0 - Production
  Time: 20-10月-2014 15:01:36
  Tracing not turned on.
  Tns error struct:
    ns main err code: 12535


TNS-12535: TNS: 操作超时
    ns secondary err code: 12606
    nt main err code: 0
    nt secondary err code: 0
    nt OS err code: 0
  Client address:
opiodr aborting process unknown ospid (16821) as a result of ORA-609
Mon Oct 20 15:01:40 2014




***********************************************************************


Fatal NI connect error 12170.


  VERSION INFORMATION:
        TNS for Linux: Version 11.2.0.4.0 - Production
        Oracle Bequeath NT Protocol Adapter for Linux: Version 11.2.0.4.0 - Production
        TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.4.0 - Production
  Time: 20-10月-2014 15:01:40
  Tracing not turned on.
  Tns error struct:
    ns main err code: 12535


TNS-12535: TNS: 操作超时
    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=120.31.131.12)(PORT=2111))
WARNING: inbound connection timed out (ORA-3136)
Mon Oct 20 15:02:20 2014

 应对方法:
1. 在listener.ora文件中添加INBOUND_CONNECT_TIMEOUT_=0
2. 追加一个sqlnet.ora文件,并追加SQLNET.INBOUND_CONNECT_TIMEOUT=0
3. 使应对生效:
把修改过的listener都reload一次(因为是RAC环境),即可。

SQLNET.INBOUND_CONNECT_TIMEOUT=0


INBOUND_CONNECT_TIMEOUT_LISTENER=0

srvctl stop listener


srvctl start listener
Oracle推荐再把数据库重启一次。
由于是OLTP的系统,所以暂时未让其生效,之后再进行跟踪。
4. Oracle文档对应的说法:
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.








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

转载于:http://blog.itpub.net/28786649/viewspace-1304787/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值