"The Network Adapter could not establish the connection" When Connecting To SCAN Listener Via JDBC Thin Due to Firewall "inspect sqlnet" or "deep packet inspection"

(Doc ID 1398979.1)

Last updated on AUGUST 25, 2017

Applies to:

Oracle Database - Enterprise Edition - Version 11.2.0.2 and later
Java Platform, Standard Edition - Version 1.5.0 and later
JDBC - Version 11.2.0.2.0 and later
Information in this document applies to any platform.

Symptoms

JDBC thin connections are failing with the following error when attempting to connect to a RAC Database service with the local listener is using a non-default port number.


SEVERE: 19484A05 Throwing SQLException: oracle.net.ns.NetException: The Network
Adapter could not establish the connection
Jan 5, 2012 11:24:34 AM oracle.jdbc.driver.T4CConnection assertLoggedOn
SEVERE: 19484A05 Throwing SQLException: 430
Exception in thread "main" java.sql.SQLRecoverableException: IO Error: The
Network Adapter could not establish the connection




For example: 

remote_listener = exdb02-scan:1521

local_listener =
(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=XX.XX.XX.XX)(PORT=6002))))


It is using port 6002 rather than the default 1521.

All other connections to this service, such as using SQL*Plus as a client, work successfully.

Also JDBC thin clients connecting to another database service that uses the default port 1521 also work successfully.

For example:

remote_listener = exdb02-scan:1521

local_listener =
(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=XX.XX.XX.XX)(PORT=1521))))

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms