TNS-12532: TNS: invalid argument, Oracle error messages too speechless

Source: Internet
Author: User
Tags oracle documentation

TNS-12532: TNS: invalid argument, Oracle error messages too speechless
Symptom:
Tnsping error:
[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,200 7, 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] $

However, after iptables is disabled, tnsping can be connected normally, which seems to be a problem with iptables. However, the focus of the problem is not iptables,
The focus is on Oracle error information TNS-12532: TNS: invalid argument, so I always mistakenly thought it was a problem with the configuration format of tnsnames. ora,
Re-copy and paste, manual configuration, and trace, A lot of time is wasted.

Oracle documentation has instructions: 11g: TNS-12532/ORA-12532 Reported When Firewall Is Enabled (Doc ID 748466.1)
Applies:
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. nt [0] = 12560, nt [1] = 502, 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 wowould return a blank screen with blinking cursor. Note that the above wowould also fail if you are facing transport issues.
As the underlying cause for the issue is the firewall that has been enabled, take advantage of the network administrator to momentarily disable the firewall on the server host
Once done, re-try the connection from the client host.
Incorrect error message "TNS: invalid argument" being reported is misleading and needs to corrected to something like "TNS: connection refused"
It seems that Oracle is aware of this mistake and regards this error message as an unpublished Bug which has been corrected in future versions.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.