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. 转换基于Maven的Web应用程序支持Eclipse IDE

    在上一节教程中,使用Maven创建了一个Web应用程序.这里有一个指南,告诉你如何转换Web应用程序到Eclipse IDE支持的形式. 注意,通过WTP工具Eclipse IDE支持Web应用程序, ...

  2. Sql Server性能优化辅助指标 - SET STATISTICS TIME ON和SET STATISTICS IO ON

    1.前言 对于优化SQL语句或存储过程,以前主要是用如下语句来判断具体执行时间,但是SQL环境是复杂多变的,下面语句并不能精准判断性能是否提高:如果需要精确知道CPU.IO等信息,就无能为力了. ), ...

  3. 备份集中的数据库备份与现有的xx数据库不同”解决方法

    搞定

  4. 逻辑卷管理LVM 扩容LV容量实例(一)

    实验环境: 一台Linux 服务器添加两块硬盘,一块硬盘容量30G,另一块硬盘容量50G,采用VMware Workstation虚拟机进行模拟实验. 30G硬盘先分成一个分区,分区大小为25G,再创 ...

  5. JavaScript 编码小技巧

    三元操作符 如果使用if...else语句,那么这是一个很好节省代码的方式. Longhand: const x = 20; let answer; if (x > 10) { answer = ...

  6. Caffe 学习:Eltwise层

    Eltwise层的操作有三个: 1. PROD(product):按元素乘积 2. SUM:按元素求和(默认操作) 3. MAX:保存元素大者

  7. What really happens when you navigate to a URL

    As a software developer, you certainly have a high-level picture of how web apps work and what kinds ...

  8. 收集整理的240多个jQuey插件 .

    “jQuery 是继 prototype 之后又一个优秀的 Javascrīpt 框架.其宗旨是——WRITE LESS,DO MORE,写更少的代码,做更多的事情.它是轻量级的 js 库(压缩后只有 ...

  9. SpringMVC使用@ResponseBody时返回json的日期格式及可能产生的问题

    http://blog.csdn.net/z69183787/article/details/40375831 遇到的问题: 1 条件: 1.1.表单里有两个时间参数,都是作为隐藏项随表单一起提交: ...

  10. SpringMVC由浅入深day01_7入门程序小结

    7 入门程序小结 通过入门程序理解springmvc前端控制器.处理器映射器.处理器适配器.视图解析器用法. 前端控制器配置: 处理器映射器: 非注解处理器映射器(了解) 注解的处理器映射器(掌握) ...