TNS-12532: TNS:invalid argument,Oracle的报错信息太让人无语
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在以后的版本中进行了修正。
相关文章
- 忘记oracle的sys用户密码如何修改以及Oracle 11g 默认用户名和密码
- Oracle 11g服务器安装详细步骤——图文教程(系统 windows server 2012 R2)
- Oracle-查看oracle是否有表被锁
- 【C/C++学院】(24)Oracle数据库编程--管理oracle
- 【oracle】index的几种扫描方式
- 《oracle每天一练》Oracle冷备份与数据恢复
- 《oracle每天一练》Merge Into 语句代替Insert/Update在Oracle中的应用实战
- oracle+mybatis报错:BindingException("Invalid bound statement (not found): ")
- cx_Oracle连接oracle数据库
- INS-20802 Oracle Cluster Verification 实用程序失败
- 【Oracle 集群】ORACLE DATABASE 11G RAC 知识图文详细教程之缓存融合技术和主要后台进程(四)
- ORACLE认证
- Oracle中recyclebin的保留策略
- 连接ORACLE数据库,是不是必须要安装oracle客户端的运行时
- Oracle--通配符、Escape转义字符、模糊查询语句
- Oracle数据库启动时:ORA-00119: invalid specification for system parameter LOCAL_LISTENER; ORA-00132错误解决
- 未能加载文件或程序集“Oracle.DataAccess, Version=2.112.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342"
- EnterpriseDB (PPAS) Oracle兼容性Virtual Private Database(VPD) 数据隔离以及当前缺陷
- oracle 11g客户端如何完全卸载
- Atitit oracle新特性5 6 7 8 9 10 11 12 18 19 20 attilax总结 目录 1.1. :ora 20c1 1.2. Oracle Database 19c 的
- 成功解决./nvidia-installer: invalid option: "‐‐no‐opengl‐files" ERROR: Invalid commandline, please run `
- 在Oracle 11.2的数据库中建表时遇到 RESULT_CACHE (MODE DEFAULT) ORA-00922: missing or invalid option
- oracle安装过程中先决条件检查失败的解决办法
- ThinkPHP pdo连接Oracle的配置写法,提示报错
- Oracle主机变量锚定、游标变量
- Oracle 12c中SQLPlus操作使用(包含实验二ORACLE SQL*PLUS环境与查询的详细操作解释)
- Oracle-Rman详解