TNS-12532: TNS:invalid argument,Oracle的报错信息太让人无语
现象:

Tnsping报错:

[oracle@unicomGZ01 admin]$ ../../bin/tnsping orcl

TNS Ping Utility for Linux: Version 11.1.0.6.0 - Production on 16-MAY-2013 15:27:00

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

Used parameter files:

Used TNSNAMES adapter to resolve the alias

Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.9.180)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))

TNS-12532: TNS:invalid argument

[oracle@unicomGZ01 admin]$

但只要将iptables关闭之后,tnsping可以正常连通,看来是iptables的问题,不过问题重点不在iptables,

重点在于Oracle的报错信息TNS-12532: TNS:invalid argument,让我一直误以为是tnsnames.ora的配置格式有问题,

又是重新复制粘贴,又是手工敲配置,又是做trace,白白耽误了不少时间。

Oracle的文档倒是有说明:11g: TNS-12532 / ORA-12532 Reported When Firewall Is Enabled (Doc ID 748466.1)

Applies to:

Oracle Net Services - Version: 11.1.0.6.0

 This problem can occur on any platform.

Symptoms

Firewall is enabled between the clients and server.

On trying to connect from the client host, the following error is reported :

ORA - 12532: TNS : invalid argument

Client trace indicates the following :

ntt2err: soc <XXXX> error - operation=1, ntresnt[0]=502, ntresnt[1]=113, ntresnt[2]=0

ntt2err: exit

nttcni: exit

nttcon: exit

nserror: entry

nserror: nsres: id=0, op=65, ns=12532, ns2=12560; nt[0]=502, nt[1]=113, nt[2]=0; ora[0]=0, ora[1]=0, ora[2]=0

nsopen: unable to open transport

Here the OS error is 113 -No route to host in Linux platform.

Cause

 The cause of the issue is either the firewall is blocking the connection or there is an network issue.

 

Solution

 

You may check the same by trying a telnet to the listener port from the same client where sqlplus connection failed.

$ telnet <db server IP> <listener Port>

The above would return a blank screen with blinking cursor. Note that the above would also fail if you are facing transport issues.

As the underlying cause for the issue is the firewall that has been enabled, take assistance of the network administrator to momentarily disable the firewall on the server host

Once done, re-try the connection from the client host.


There is an unpublished internal bug 6031201 being worked upon by our development team to correct the error code raised from client.
Incorrect error message "TNS:invalid argument" being reported is misleading and needs to corrected to something like "TNS:connection refused"


看来Oracle也意识到了这个失误,并把这个报错信息当成了一个unpublished Bug在以后的版本中进行了修正。

TNS-12532: TNS:invalid argument,Oracle的报错信息太让人无语的更多相关文章

  1. Toad客户端连接Oracle数据库报错 ORA-12170:TNS:连接超时

    Oracle 客户端连接Oracle数据库报错   ORA-12170:TNS:连接超时  排错步骤: 1. 查看网络是否畅通:  打开cmd,ping数据库IP 2. 查看端口是否畅通: 打开cmd ...

  2. oracle+mybatis报错:BindingException("Invalid bound statement (not found): ")

    oracle+mybatis报错:BindingException("Invalid bound statement (not found): ") 从mysql转到oracle数 ...

  3. windows,oracle,dg报错:ORA-12528,ORA-12154,ORA-10456 ,PING[ARC1]: Heartbeat failed to connect to standby 'orclbk'. Error is 12154

    windows,oracle,dg报错:ORA-12528,ORA-12154,ORA-10456 最近有需求在windows的2台oracle服务器上搭建dg,在过程中遇到了一些错误,跟在linux ...

  4. kettle连接oracle数据库报错,ORA-12505

    报错信息: Error connecting to database: (using class oracle.jdbc.driver.OracleDriver) Listener refused t ...

  5. Oracle启动报错ORA-27102解决

    环境:RHEL5.5 + Oracle 10.2.0.4 此错误一般是因为数据库的初始化参数文件的内存设置不当导致.本例是因为操作系统参数设置问题导致. 当前现象:Oracle启动报错ORA-2710 ...

  6. oracle之报错:ORA-00054: 资源正忙,要求指定 NOWAIT

    oracle之报错:ORA-00054: 资源正忙,要求指定 NOWAIT 问题如下: SQL> conn scott/tiger@vm_database Connected to Oracle ...

  7. tomcat部署新的项目的时候出现报错信息: Invalid byte tag in constant pool: 15

    上面一堆tomcat启动的提示信息省略掉,下面是报错的具体信息:org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid ...

  8. oracle 导入报错 ORA-00959: tablespace 'HB' does not exist

    导入oracle 时发现有几张表导入时一直报错: 报错信息:IMP-00003: ORACLE error 959 encountered   ORA-00959: tablespace 'HB' d ...

  9. windows 8 安装 oracle 11g 报错:command line option syntax error,type command/? for help

    windows 8 安装 oracle 11g 报错:command line option syntax error,type command/? for help 在windows8操作系统上安装 ...

随机推荐

  1. Swing AWT一套新的图形界面系统

    Swing 是在AWT的基础上构建的一套新的图形界面系统,它提供了AWT 所能够提供的所有功能,并且用纯粹的Java代码对AWT 的功能进行了大幅度的扩充. 例如说并不是所有的操作系统都提供了对树形控 ...

  2. 第一个jquery程序

    <html> <head></head> <script type="text/javascript" src="jquery- ...

  3. 利用POST重启路由器,一直无法实现,求帮助

    本帖最后由 xinaini1986 于 2014-10-20 13:03 编辑 因为路由器经常会无法上网,重启一下路由器就可以,但每次都登陆路由器管理重启路由器很麻烦,所以想通过按键精灵POST方式重 ...

  4. 清除 Xcode 项目缓存

    运行错误.编译错误.发布错误可尝试清除 Xcode 缓存:清除 Xcode 缓存也能减少占用磁盘空间. (1)前往文件夹(control+shift+G),删除里面的文件: /Users/用户名/Li ...

  5. 黏性Session和非黏性Session

    黏性Session和非黏性Session黏性Session:此模式下同一会话中的请求都被派送到同一个tomcat实例上,这样我们就无须在多台服务器之间实现session共享了,这是其好处,不好的地方就 ...

  6. windows下卸载oracle11g

    oracle11g卸载   oracle11g卸载 卸载oracle: 1.开始--控制面板--性能和维护--管理工具--服务    停止所有的oracle服务. 2.开始--程序--oracle-- ...

  7. 7 云计算系列之Neutron安装与配置

    preface 紧接上一章,我们这里开始部署网络服务Neutron,可参考官网文档:http://docs.openstack.org/newton/install-guide-rdo/neutron ...

  8. Android : Your APK does not seem to be designed for tablets.

    1. 解决办法: Add these config in AndroidManifest.xml <supports-screens android:smallScreens="tru ...

  9. QT 随机数生成

    下面总结了QT中随机生成的方法(仅供学习参考),分为旧方法和新方法,一般来说,旧的方法已经被抛弃,在开发新的应用中推荐使用新方法.  C++ Code  12345678910111213141516 ...

  10. 织梦Dedecms系统可疑文件include/filter.inc.php扫描出漏洞,该如何解决?

    今天在做网站监察的时候,发现网站出了一个问题,在对网站做木马监测的时候,扫描出一个可疑文件:/include/filter.inc.php,建议删除,但仔细检查后,发现此文件是织梦(Dedecms)系 ...