SQL Error 17002 (SQLState 08006) signals that the Oracle JDBC driver cannot establish or keep a network session with the database, usually due to listener, host, port, or firewall problems.
SQL Error 17002 (SQLState 08006) appears when the Oracle JDBC driver fails to connect to the database. Verify the hostname, port, and service name, start or reload the listener, and open any blocked firewall ports to restore connectivity.
SQL Error: 17002, SQLState: 08006 — IO Error: The Network Adapter could not establish the connection
The Oracle JDBC driver throws SQL Error 17002, SQLState 08006 when it cannot open or maintain a socket to the database listener. The driver converts the low-level I/O failure into this SQLState to indicate a connection problem.The error stops applications from authenticating, running SQL, or keeping existing sessions. Resolving it quickly is critical for uptime and data access.
Network issues block traffic between the client and the Oracle listener. Typical culprits are incorrect hostnames, wrong ports, or firewalls that drop TCP packets.The Oracle listener may be down, misconfigured, or rejecting connections due to maxed SESSION or PROCESSES limits. Long-running idle connections can also be terminated by firewalls or SQL*Net timeouts, surfacing the same error.
Begin by pinging the host and telneting to the listener port to confirm reachability. Restart or reload the listener with lsnrctl reload
if it is not accepting connections.Validate the JDBC URL format: jdbc:oracle:thin:@//host:port/service
. Correct any typos in host, port, or service name. Increase CONNECTION_TIMEOUT
in the JDBC properties if latency is high.
Database server reboot—Start the listener and verify the database is in OPEN mode.Firewall idle timeout—Enable TCP keep-alive or shorten the connection pool’s idle timeout.Wrong service name after migration—Query v$services
to obtain the new service and update the URL.
Monitor listener status with Enterprise Manager or lsnrctl status
and alert on unexpected DOWN states.Use connection pools that retry, detect stale sockets, and close idle sessions before the firewall does. Document and version control JDBC URLs in Galaxy Collections to prevent typos.
ORA-12514 — Listener does not know requested service; check service name and register with LOCAL_LISTENER
.ORA-12541 — No listener; ensure LISTENER
is running on the server.
Network unreachable between client and server.
Listener process not running or crashed.
Incorrect host, port, or service in JDBC URL.
Firewall or VPN blocking TCP 1521 (or custom) port.
Database reached maximum session or process limits.
SQL*Net handshake timeout due to high latency.
ORA-12514 – Listener does not currently know of service requested in connect descriptor.ORA-12541 – TNS: no listener.ORA-12170 – TNS: connect timeout occurred.SQL Error: 17008, SQLState: 08003 – Connection closed.SQL Error: 17410, SQLState: 08000 – No more data to read from socket.
No. The database may be up, but the listener, network, or firewall can still block connections, generating the same error.
If the issue is an incorrect JDBC URL or local firewall rule, yes. Otherwise, you need server access to restart the listener or adjust parameters.
Yes, for high-latency links. Set oracle.net.CONNECT_TIMEOUT
and oracle.jdbc.ReadTimeout
to higher values.
Galaxy stores validated connection profiles, flags unreachable hosts instantly, and lets teams share endorsed JDBC URLs to reduce misconfiguration.