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. C#提高------------------------Attribute自定制概念

    C#基础知识梳理系列八:定制特性Attribute   摘 要 设计类型的时候可以使用各种成员来描述该类型的信息,但有时候我们可能不太愿意将一些附加信息放到类的内部,因为这样,可能会给类型本身的信息描 ...

  2. 嵌入式开发之uart---编程

    下位机往上位机发送串口数据都是漫漫的这个包,但是win上位机往下位机发数据时,得分包大小,下位机收到的不一从1到200左右,大部分为100左右 http://bbs.csdn.net/topics/3 ...

  3. topK 算法

    搜索引擎热门查询统计 题目描述:    搜索引擎会通过日志文件把用户每次检索使用的所有检索串都记录下来,每个查询串的长度为1-255字节.    假设目前有一千万个记录(这些查询串的重复度比较高,虽然 ...

  4. Linux入门教程:如何检查Linux系统的最后重启时间

    问题: 是否有一个命令可以快速地检查系统已经运行了多久? 也就是我怎么知道Linux系统最后的重启时间? 有许多方法来查询系统最后的重启时间. 方法一 第一种方法是使用last命令. $ last r ...

  5. php 判定pc端與移動端

    1.親測有效 2.上代買 //判斷移動端,pc端 /*移动端判断*/ public static function isMobile() { // 如果有HTTP_X_WAP_PROFILE则一定是移 ...

  6. iPhone: 在 iPhone app 里使用 UIPopoverController

    更新:iOS8 版本已经不可用 为 UIPopoverController 增加类别,如下: //NSObject+UIPopover_Iphone.h #import <Foundation/ ...

  7. js(数组篇02)

    原文:http://www.cnblogs.com/zaking/p/8686676.html 上一篇文章简单的介绍了一下js的类型,以及数组的增删方法.这一篇文章,我们一起来看看数组还有哪些用法,以 ...

  8. 谈谈Android中的SurfaceTexture

    2015.7.2更新 由于很多人要代码,我把代码下载链接放在这里了.不过还是要说一下,surfaceTexture和OpenGL ES结合才能发挥出它最大的效果,我这种写法只是我自己的想法,还有很多种 ...

  9. 用iostat对linux硬盘IO性能进行检测

    近期公司安装了几台DELL PE2650和2850的服务器,统一安装的是RHLE5.132位系统,而服务器的SCSI硬盘都统一做了raid1.公司老总要求对硬盘IO作统一检测报告,在Linux下找了许 ...

  10. Java常用数据结构之Set之TreeSet

    前言 上篇文章我们分析了HashSet,它是基于HashMap实现的,那TreeSet会是怎么实现的呢?没错!和大家想的一样,它是基于TreeMap实现的.所以,TreeSet的源码也很简单,主要还是 ...