--同事hadoop连接oracle导入数据,界面报错,后台alert日志报错tns相关错误:

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

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: 30-DEC-2016 10:34:30
  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.100.220)(PORT=52684))
WARNING: inbound connection timed out (ORA-3136)
Fri Dec 30 10:39:50 2016
Starting background process SMCO
Fri Dec 30 10:39:50 2016
SMCO started with pid=18, OS id=32231
Fri Dec 30 10:55:24 2016
WARNING: inbound connection timed out (ORA-3136)
Fri Dec 30 10:55:29 2016
WARNING: inbound connection timed out (ORA-3136)
Fri Dec 30 10:55:29 2016
WARNING: inbound connection timed out (ORA-3136)
Fri Dec 30 10:55:30 2016
WARNING: inbound connection timed out (ORA-3136)
Fri Dec 30 10:55:30 2016
WARNING: inbound connection timed out (ORA-3136)
Fri Dec 30 10:55:30 2016
WARNING: inbound connection timed out (ORA-3136)
Fri Dec 30 10:55:30 2016
WARNING: inbound connection timed out (ORA-3136)
Fri Dec 30 10:55:30 2016
WARNING: inbound connection timed out (ORA-3136)
Fri Dec 30 11:02:53 2016
WARNING: inbound connection timed out (ORA-3136)

查看listener.log文件,发现报错信息如下:

[oracle@oracle trace]$ cat /home/oracle/app/oracle/diag/tnslsnr/oracle/listener/alert/log.xml |grep TNS
<txt>TNS-12528: TNS:listener: all appropriate instances are blocking new connections
<txt>TNS-12514: TNS:listener does not currently know of service requested in connect descriptor
<txt>TNS-12514: TNS:listener does not currently know of service requested in connect descriptor
<txt>TNS-12514: TNS:listener does not currently know of service requested in connect descriptor
<txt>TNS-12514: TNS:listener does not currently know of service requested in connect descriptor
<txt>TNS-12514: TNS:listener does not currently know of service requested in connect descriptor
<txt>TNS-12514: TNS:listener does not currently know of service requested in connect descriptor
<txt>TNS-12505: TNS:listener does not currently know of SID given in connect descriptor
<txt>TNS-12518: TNS:listener could not hand off client connection
TNS-12547: TNS:lost contact
  TNS-12560: TNS:protocol adapter error
   TNS-00517: Lost contact
<txt>TNS-12518: TNS:listener could not hand off client connection
TNS-12547: TNS:lost contact
  TNS-12560: TNS:protocol adapter error
   TNS-00517: Lost contact
<txt>TNS-12518: TNS:listener could not hand off client connection
TNS-12547: TNS:lost contact
  TNS-12560: TNS:protocol adapter error
   TNS-00517: Lost contact
<txt>TNS-12518: TNS:listener could not hand off client connection
TNS-12547: TNS:lost contact
  TNS-12560: TNS:protocol adapter error
   TNS-00517: Lost contact
<txt>TNS-12518: TNS:listener could not hand off client connection
TNS-12547: TNS:lost contact
  TNS-12560: TNS:protocol adapter error
   TNS-00517: Lost contact
<txt>TNS-12518: TNS:listener could not hand off client connection
TNS-12547: TNS:lost contact
  TNS-12560: TNS:protocol adapter error
   TNS-00517: Lost contact
<txt>TNS-12518: TNS:listener could not hand off client connection
TNS-12547: TNS:lost contact
  TNS-12560: TNS:protocol adapter error
   TNS-00517: Lost contact
<txt>TNS-12518: TNS:listener could not hand off client connection
TNS-12547: TNS:lost contact
  TNS-12560: TNS:protocol adapter error
   TNS-00517: Lost contact
<txt>TNS-12518: TNS:listener could not hand off client connection
TNS-12547: TNS:lost contact
  TNS-12560: TNS:protocol adapter error
   TNS-00517: Lost contact
<txt>TNS-12518: TNS:listener could not hand off client connection
TNS-12547: TNS:lost contact
  TNS-12560: TNS:protocol adapter error
   TNS-00517: Lost contact
<txt>TNS-12518: TNS:listener could not hand off client connection
TNS-12547: TNS:lost contact
  TNS-12560: TNS:protocol adapter error
   TNS-00517: Lost contact
<txt>TNS-12518: TNS:listener could not hand off client connection
TNS-12547: TNS:lost contact
  TNS-12560: TNS:protocol adapter error
   TNS-00517: Lost contact
<txt>TNS-12518: TNS:listener could not hand off client connection
TNS-12547: TNS:lost contact
  TNS-12560: TNS:protocol adapter error
   TNS-00517: Lost contact
<txt>TNS-12518: TNS:listener could not hand off client connection
TNS-12547: TNS:lost contact
  TNS-12560: TNS:protocol adapter error
   TNS-00517: Lost contact
<txt>TNS-12537: TNS:connection closed
TNS-12560: TNS:protocol adapter error
  TNS-00507: Connection closed
<txt>TNS-12514: TNS:listener does not currently know of service requested in connect descriptor
<txt>TNS-12514: TNS:listener does not currently know of service requested in connect descriptor
<txt>TNS-12505: TNS:listener does not currently know of SID given in connect descriptor
<txt>TNS-12505: TNS:listener does not currently know of SID given in connect descriptor
<txt>TNS-12505: TNS:listener does not currently know of SID given in connect descriptor
<txt>TNS-12505: TNS:listener does not currently know of SID given in connect descriptor
<txt>TNS-12505: TNS:listener does not currently know of SID given in connect descriptor
<txt>TNS-12505: TNS:listener does not currently know of SID given in connect descriptor
<txt>TNS-12537: TNS:connection closed
TNS-12560: TNS:protocol adapter error
  TNS-00507: Connection closed
<txt>TNS-12542: TNS:address already in use
TNS-12560: TNS:protocol adapter error
  TNS-00512: Address already in use

监听文件报错如下:

***********************************************************************
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: 30-DEC-2016 11:12:57
  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.100.221)(PORT=51820))

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

--网上查到eygle博客,解决ora-3136错误方案,记录如下:

最近一台新上线的Oracle10gR2数据库在警告日志文件中(alert.log)持续出现如下错误:

Tue Jul 18 23:09:22 2006
WARNING: inbound connection timed out (ORA-3136)
Tue Jul 18 23:09:23 2006
WARNING: inbound connection timed out (ORA-3136)
Tue Jul 18 23:09:25 2006
WARNING: inbound connection timed out (ORA-3136)
Tue Jul 18 23:09:30 2006
WARNING: inbound connection timed out (ORA-3136)
Tue Jul 18 23:12:15 2006
WARNING: inbound connection timed out (ORA-3136)
同时在sqlnet.log中记录了如下错误:

Fatal NI connect error 12170.

VERSION INFORMATION:
TNS for Linux: Version 10.2.0.2.0 - Production
Oracle Bequeath NT Protocol Adapter for Linux: Version 10.2.0.2.0 - Production
TCP/IP NT Protocol Adapter for Linux: Version 10.2.0.2.0 - Production
Time: 19-JUL-2006 11:25: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.1.123)(PORT=58147))

这是和网络连接相关的一个错误,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

这里重起数据库和Listener我认为是没有必要的,我们reload一下Listner应该就可以了.

[oracle@order admin]$ lsnrctl

LSNRCTL for Linux: Version 10.2.0.2.0 - Production on 19-JUL-2006 15:26:33

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

Welcome to LSNRCTL, type "help" for information.

LSNRCTL> reload
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.16.9.11)(PORT=1521)))
The command completed successfully
LSNRCTL> services
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.16.9.11)(PORT=1521)))
Services Summary...
Service "order" has 2 instance(s).
Instance "order", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0
LOCAL SERVER
Instance "order", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
The command completed successfully

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

修改之后,观察了一段时间,目前正常.

关于SQLNET.INBOUND_CONNECT_TIMEOUT参数,Oracle建议修改该参数,以避免denial-of-service攻击.

引用一段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.

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

Default
None

Example
SQLNET.INBOUND_CONNECT_TIMEOUT=3

按照eygle博客思路,修改sqlnet.ora文件如下:

SQLNET.INBOUND_CONNECT_TIMEOUT = 0

修改参数并reload监听后,测试正常,问题解决。

一次tns连接错误的解决过程相关推荐

  1. 计算机网络连接显示678是什么意思,网络连接错误678什么意思 网络连接错误678解决方法【图文】...

    网络成为了人们日常生活的一部分,可是网络并不是一直都特别稳定的,在上网的过程中,也会出现各种各样的问题.如果在联网的时候出现网络错误,电脑都会做出相应的回应,并且还带有编号.有的时候电脑会出现提示,提 ...

  2. 一例Vmware虚拟化Vcenter连接不上解决过程。

    记一例Vmware虚拟化Vcenter连接不上解决过程. 前言 周五了,快下班了,突然想到虚拟化已经有段时间没登上去看过了,别出什么问题,就想登录Vcenter看一下,结果真的怕什么来什么.Vcent ...

  3. 柯美smb扫描出现服务器连接错误_柯尼卡美能达bizhub283服务器连接错误的解决方法...

    柯尼卡美能达bizhub283服务器连接错误的解决方法 1 柯尼卡美能达 bizhub283 可以打印,无法扫描 提示"服务器连接错误"的解决办法 近日,不知是何原因,bizhub ...

  4. 办公室局域网打印机配置笔记及0x0000011b连接错误成功解决方法

    WIn10共享打印机方法 右键单击"开始"图标--"控制面板"--,以类别方式在"家庭组和网线网络". 选择"更改高级共享设置&q ...

  5. **rosdep init** 或者**rosdep update** 连接错误的解决办法

    rosdep init 或者rosdep update 连接错误的解决办法 链接:添加链接描述 试用了好几个ip地址,这个可以通过 添加链接描述 ubuntu进行dpkg安装时出现xxx依赖于xxx, ...

  6. 柯美smb扫描出现服务器连接错误_柯尼卡美能达bizhub283服务器连接错误的解决办法.pdf...

    柯尼卡美能达bizhub283服务器连接错误的解决办法 柯尼卡美能达bizhub283 可以打印,无法扫描 提示"服务器连接错误"的解决办法 近日,不知是何原因,bizhub283 ...

  7. 一个数据录入/查询的应用程序在登录时错误信息解决过程

    一.前情:500强排序软件,需要连接到SQL server 二.安装后,登录不了,错误信息提示: 数据库联接错误 : 错误信息2:在与SQL Server建立连接时出现与网络相关的或特定于实例的错误. ...

  8. 梦幻西游一直显示网络连接到服务器失败,梦幻西游手游网络连接异常怎么办 网络连接错误超时解决办法...

    梦幻西游手游这款游戏最近火爆极了,很多小伙伴都在玩这款游戏,那么游戏中出现连接错误异常怎么办呢?该怎么解决呢?下面就请看小编为大家带来的攻略吧! 梦幻西游手游4G网络无法登陆解决方法 最近有小伙伴反映 ...

  9. 宽带服务器无响应678,宽带连接错误678解决方法

    宽带连接错误678表示远端服务器未响应,表示线路不通或上端服务器设置有问题,如果确认物理线路连接无问题及本身路由器或电脑配置正确且无故障则需要联系网络供应商解决. 宽带连接错误678故障常见解决办法 ...

最新文章

  1. Windows7无法自动将IP协议堆栈绑定到网络适配器的办法
  2. redisson的锁的类型_绝对干货:利用redisson完成分布式锁功能
  3. 利用nginx的fastcgi_cache模块来做缓存
  4. java代码示例(6-3)
  5. 关于虚拟机vmware三种网络模式
  6. 教你玩转CSS 提示工具(Tooltip)
  7. 九种跨域方式实现原理
  8. idea 无效的目标发行版_maven构建异常(无效的目标发行版: 1.8)
  9. py导入包异常跳出_14-0-包的介绍及使用
  10. 软件测试--selenium安装使用
  11. python windows 消息通讯_如何使用python與windows中的事件/消息掛鈎
  12. python中的exec()函数和eval()函数
  13. 1078 Hashing (25 分) 解决冲突采用正向增加的二次探查法
  14. Android开发——小技巧(二)修改APP图标和名字
  15. 各种音视频编解码学习详解之 编解码学习笔记(七):微软Windows Media系列
  16. html中加入emjio表情,jqueryemoji表情插件
  17. java开发购物系统菜单_Java控制台购物系统
  18. 实战丨Web云开发项目—TodoList待办事项
  19. oracle OCP考点在哪,Oracle OCP认证考哪几门
  20. 使用Mathematica绘制星形线(Astroid)

热门文章

  1. [翻译]下拉列表多选控件MultiDropDown
  2. 随手小记:都是反着的
  3. 求 一个字符 在二进制表示中1的个数
  4. 大数据之-Hadoop3.x_MapReduce_ReduceJoin案例Reducer_案例_Debug调试---大数据之hadoop3.x工作笔记0132
  5. C++_类和对象_C++继承_多继承语法---C++语言工作笔记067
  6. STM32工作笔记0030---编写跑马灯实验--使用库函数
  7. C#.Net工作笔记018---葡萄城控件FlexGrid自定义单元格_以及给自定义控件添加自定义事件
  8. JSF学习笔记--JSF简介,JSF第一个应用程序
  9. MYSQL集群的备份与恢复最终版本
  10. mac下 home-brew安装及php,nginx环境安装及配置