My Oracle Support Banner

JDBC Connections Fail With IO Error: Socket connect timed out (Doc ID 2665280.1)

Last updated on MAY 26, 2020

Applies to:

JDBC - Version 12.2.0.0.0 and later
Information in this document applies to any platform.

Symptoms

JDBC connections fail with the following error:

org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory IO Error: Socket connect timed out.

An example of a common stack trace is:

java.sql.SQLRecoverableException: IO Error: Socket connect timed out
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:801)
at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:782)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:39)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:704)
at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:390)
at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:279)
at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:202)
at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:180)
...
Caused by: oracle.net.ns.NetException: Socket connect timed out
at oracle.net.ns.NSProtocol.connect(NSProtocol.java:381)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1481)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:540)

 

Changes

 

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
Changes
Cause
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.