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

原创 2014年01月07日 00:06:48
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 错误的解决!

C:/Documents and Settings/user>tnsping HENRYDB TNS Ping Utility for 32-bit Windows: Version 11.1.0.6...
  • henrybai
  • henrybai
  • 2009-12-16 13:11:00
  • 8930

安装实例中出现的ORA-27123和ORA-12532的错误

在装数据库软件的过程中没有出现过异常,顺利安装结束。在装数据库实例的时候报了ORA-27123和ORA-12532的错误。安装的服务器是惠普服务器256G内存,具体型号不得而知。 问题一:ORA-27...
  • Zha_PenFee
  • Zha_PenFee
  • 2015-11-26 19:24:50
  • 1953

Windows 平台监听程序无法启动 报TNS-12560 TNS-00530

Windows 平台监听程序无法启动 报TNS-12560 TNS-00530 问题现象--01:   C:\Users\Administrator>lsnrctl start LSN...
  • wuweilong
  • wuweilong
  • 2015-02-28 13:38:11
  • 8597

RHEL6U2_86_64+ORACLE11.2.0.3安装配置

一、注意事项: 1、下载安装包问题 1)  oracle 11.2.0.3.0 x86_64需要Mos注册用户才能下载。 2)  下载oracle 软件不能用下载工具,如迅雷等。而是直接下载,否...
  • fffygapl
  • fffygapl
  • 2013-01-30 14:22:42
  • 2117

导入文件到sd卡报错 transfer error: Invalid argument 因为文件名是中文

sdk adt 装完之后我就开始尝试导入MP3文件。导入的步骤如下: 进入file explorer 选中mnt-sdcard-Music,单击导入按钮之后选中MP3文件导入。控制台则显示 [20...
  • u010509143
  • u010509143
  • 2014-04-17 14:13:33
  • 1613

Invalid argument: Cannot map GET apache 中文路径

某些带有中文路径的图片目录 1.在客户端访问时出现403错误 2.服务器报Invalid argument: Cannot map GET错误 这时候环境是windows...
  • loniy
  • loniy
  • 2012-01-13 17:29:00
  • 1172

accept: Invalid argument问题解决

socklen_t clilen;     struct sockaddr_in clientaddr;     connfd = accept(listenfd,(sockaddr *)&cli...
  • blue_bm
  • blue_bm
  • 2014-01-26 13:56:46
  • 455

delphi 按回车选中下一个控件

procedure TForm1.FormKeyPress(Sender: TObject; var Key: Char); begin if Key = #13 then begin ...
  • hansoy
  • hansoy
  • 2015-04-09 08:51:06
  • 2047

向ORACLE数据库表中插入时报错ORA-01722

ORA-01722: invalid number (OCI_ERROR)   无效的字符,一般是指插入数据库中的类型与数据库中定义的字段类型不匹配 但是现在遇到的是在PL/SQL中可以执行...
  • li374456041
  • li374456041
  • 2017-01-03 10:24:31
  • 651

Oracle EBS Form开发总结

1、FORM中调用请求 示例: Form 中调用并发请求生成报表并输出PDF的方法。 要完成这个目的,首先要在ebs中注册报表,并注册模板。 然后再方法里先调用FND_REQUEST.ADD_LA...
  • aoxiangzhiguanjun
  • aoxiangzhiguanjun
  • 2014-03-10 16:46:14
  • 1948
收藏助手
不良信息举报
您举报文章:TNS-12532: TNS:invalid argument,Oracle的报错信息太让人无语
举报原因:
原因补充:

(最多只允许输入30个字)