"TNS-12537: TNS:connection closed" frequent error when using JDBC
(Doc ID 2771807.1)
Last updated on AUGUST 29, 2023
Applies to:
JDBC - Version 12.2.0.0.0 and laterInformation in this document applies to any platform.
Symptoms
A JDBC Application is facing TNS connection closed very frequently. JDBC driver 12.2.0.1.0 (ojdbc8.jar) is being used.
Additional details
-----------------------
- No code/configurations changes were done.
- It was working fine. This issue used to occur once/twice a year. After Database migration to Exadata, frequency has increased very much.
- To recover, the job which connects to the Database is re-run.
- There is a firewall between the application and the database.
ERROR
-------
AWKDBE009E Unable to create the connection "IO Error: The Network Adapter could not establish the connection".
Listener log
----------------
(ADDRESS=(PROTOCOL=tcp)(HOST=<IP-Address>)(PORT=<PORT)) * * 12537
TNS-12537: TNS:connection closed
TNS-12560: TNS:protocol adapter error
TNS-00507: Connection closed
Linux Error: 115: Operation now in progress
::::::::::::
::::::::::::
(CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=<USER>))(SID=<SID>)) * (ADDRESS=(PROTOCOL=tcp)(HOST=<IP>)(PORT=<PORT>)) * establish * * 12505
TNS-12505: TNS:listener does not currently know of SID given in connect descriptor
Database alert log
----------------
Fatal NI connect error 12170.
VERSION INFORMATION:
TNS for Linux: Version 12.2.0.1.0 - Production
Oracle Bequeath NT Protocol Adapter for Linux: Version 12.2.0.1.0 - Production
TCP/IP NT Protocol Adapter for Linux: Version 12.2.0.1.0 - Production
Tracing not turned on.
Tns error struct:
ns main err code: 12535
TNS-12535: TNS:operation timed out
ns secondary err code: 12560
nt main err code: 505
TNS-00505: Operation timed out
nt secondary err code: 110
nt OS err code: 0
Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=<IP>)(PORT=<PORT>))
JDBC URL:
----------------
oracle.jdbc.OracleDriver
jdbc:oracle:thin:@(DESCRIPTION_LIST = (LOAD_BALANCE = off) (FAILOVER = on) (DESCRIPTION = (CONNECT_TIMEOUT = 5) (TRANSPORT_CONNECT_TIMEOUT = 3) (RETRY_COUNT = 3) (ADDRESS_LIST = (LOAD_BALANCE = on) (ADDRESS = (PROTOCOL = TCP) (HOST = <HOSTNAME>) (PORT = <PORT>))) (CONNECT_DATA = (SERVICE_NAME = <SERVICE-NAME>))) (DESCRIPTION = (CONNECT_TIMEOUT = 5) (TRANSPORT_CONNECT_TIMEOUT = 3) (RETRY_COUNT = 3) (ADDRESS_LIST = (LOAD_BALANCE = on) (ADDRESS = (PROTOCOL = TCP)(HOST = <HOSTNAME>) (PORT = <PORT>))) (CONNECT_DATA = (SERVICE_NAME = <SERVICE-NAME))))
ENVIRONMENT
------------------
JDBC - ojdbc8.jar - 12.2.0.1.0
JDK - 8.x
DB - 12.2.0.1.0
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Cause |
Solution |