My Oracle Support Banner

java.net.UnknownHostException When Connection Via SCAN (Doc ID 2631957.1)

Last updated on FEBRUARY 06, 2020

Applies to:

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

Symptoms

Application using JDBC 11.2.0.4 fails to connect to the database when using SCAN IP. 

The exception received is:

java.sql.SQLRecoverableException: IO error: The Network Adapter could not establish the connection
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:489) ~[ojdbc6-11.2.0.4.0.jar:11.2.0.4.0]
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:553) ~[ojdbc6-11.2.0.4.0.jar:11.2.0.4.0]
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:254) ~[ojdbc6-11.2.0.4.0.jar:11.2.0.4.0]
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32) ~[ojdbc6-11.2.0.4.0.jar:11.2.0.4.0]
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:528) ~[ojdbc6-11.2.0.4.0.jar:11.2.0.4.0]
...
Caused by: oracle.net.ns.NetException: The Network Adapter could not establish the connection
at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:439) ~[ojdbc6-11.2.0.4.0.jar:11.2.0.4.0]
at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:454) ~[ojdbc6-11.2.0.4.0.jar:11.2.0.4.0]
at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:693) ~[ojdbc6-11.2.0.4.0.jar:11.2.0.4.0]
at oracle.net.ns.NSProtocol.connect(NSProtocol.java:347) ~[ojdbc6-11.2.0.4.0.jar:11.2.0.4.0]
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1140) ~[ojdbc6-11.2.0.4.0.jar:11.2.0.4.0]
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:340) ~[ojdbc6-11.2.0.4.0.jar:11.2.0.4.0]
... 32 common frames omitted
Caused by: java.net.UnknownHostException: <HOST>
at java.net.InetAddress.getAllByName0(InetAddress.java:1280) ~[na:1.8.0_144]
at java.net.InetAddress.getAllByName(InetAddress.java:1192) ~[na:1.8.0_144]
at java.net.InetAddress.getAllByName(InetAddress.java:1126) ~[na:1.8.0_144]
at oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java:117) ~[ojdbc6-11.2.0.4.0.jar:11.2.0.4.0]
at oracle.net.nt.ConnOption.connect(ConnOption.java:133) ~[ojdbc6-11.2.0.4.0.jar:11.2.0.4.0]
at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:405) ~[ojdbc6-11.2.0.4.0.jar:11.2.0.4.0]
... 37 common frames omitted

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
References


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