TNS-12542: TNS:address already in use

We were receiving the TNS-12542 error message intermittently from an application server when attempting to connect to the DB.

TNS-12542: TNS:address already in use

The first thing to do is check that the ping is OK:

Pinging with 32 bytes of data:

Reply from bytes=32 time<1ms TTL=128
Reply from bytes=32 time=-23ms TTL=128
Reply from bytes=32 time<1ms TTL=128
Reply from bytes=32 time<1ms TTL=128

This shows that there is a configuration issue with the server or some kind of network problem. In our case, it was because a patch needed to be applied to the Windows OS in order to resolved.

After this issue was identified and fixed, the problem still persisted. I checked the listener log and found that there were as many as 47 connections per second coming in from the server where the problem was reported. Sending this many connections to a listener per second is going to overload it and is likely to cause issues. So, we fixed the issue with the application spamming the server with this many connections and the error was no longer reported.

Once you have resolved this error, you may encounter another issue which is much more commonly encoutered, ORA-12154: TNS: could not resolve service name. This is a very common error and there are many causes and different resolutions to this problem. I would recommend reading my article on it to resolve it.

Like it, share it...

Category: SQL Net

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *