Guide
Diagnosing SQL Developer Connection Failures to Oracle Databases
Step‑by‑step guide to identify and fix the 'Network Adapter could not establish the connection' error in SQL Developer.
Published by Tasadduq Burney
31 Jul 2025, 13:28 UTC
4 min53.7K views0

Recognizable condition
SQL Developer displays a connection test failure with the message: Status: Failure - Test failed: IO Error: The Network Adapter could not establish the connection.
Cause / diagnostic table
| Possible cause | Typical indicator |
|---|---|
| Incorrect hostname, port, or service name | Connection details do not match the database listener |
| Oracle listener not running or blocked by firewall | Listener service down or port inaccessible |
| Wallet or SSL configuration mismatch (TCPS) | Using TCPS protocol but wallet missing or invalid |
Ordered troubleshooting checks
- Verify network reachability
- Open a terminal (command prompt on Windows, shell on Linux/macOS).
- Run
ping <hostname>to confirm DNS resolution. Note: ping may be blocked by ICMP firewall rules. - Run
telnet <hostname> <port>(default 1521 for TCP, 2484 for TCPS) to test TCP connectivity. If telnet is not installed, usenc -zvor PowerShellTest-NetConnection.
- Check listener status
- On the database server, as a user with privileges to run
lsnrctl, executelsnrctl status. - Look for the service name you are trying to connect to (e.g., ORCL) listed as
Ready. - If the listener is down, start it with
lsnrctl start(requires OS admin or Oracle software owner).
- On the database server, as a user with privileges to run
- Validate connection details in SQL Developer
- Open the connection definition (Tools → Preferences → Database → Connections or right‑click the connection → Properties).
- Confirm that Hostname, Port, and Service Name (or SID) match the values shown by
lsnrctl status. - If using TCPS, ensure the protocol is set to
TCPSand the port matches the listener’s TCPS endpoint.
- When using Oracle Wallet (TCPS)
- Locate the wallet directory referenced in the connection (or in
sqlnet.oraif you have edited it). - Confirm the directory contains a file named
cwallet.sso(auto‑login wallet). - Check that the wallet is not expired and contains the correct database credential (you can use
mkstore -wrl <wallet_dir> -viewas the wallet owner).
- Locate the wallet directory referenced in the connection (or in
Fixes tied to findings
- Incorrect hostname/port/service name: Edit the connection in SQL Developer to correct the values, then click Test. Rollback: revert to the previous values if the test fails.
- Listener not running: Start the listener on the database host (
lsnrctl start). Ensure the listener is configured to listen on the expected port (lsnrctl statusshowsListening Endpoints Summary). Rollback: stop the listener withlsnrctl stopif you started it only for testing. - Firewall block: Work with network admin to open the required TCP port (1521 for TCP, 2484 for TCPS) between the client machine and the database server. Rollback: close the port after testing if it was opened temporarily.
- Wallet/SSL mismatch: Ensure the wallet location is correctly referenced, the
cwallet.ssofile exists, and thesqlnet.ora(if used) points to the wallet viaWALLET_LOCATION = (SOURCE = (METHOD = FILE)(METHOD_DATA = (DIRECTORY = <wallet_dir>))). If using TCPS, verify the listener has a TCPS endpoint and the client uses the same port. Rollback: restore the previous wallet location or sqlnet.ora settings.
Escalation criteria
- Network reachability tests (ping/telnet) succeed but the listener status shows the service is not registered or the listener is down despite start attempts.
- After correcting connection details and verifying listener, the test still fails with the same IO error.
- Wallet file is present but
mkstorereports errors or the wallet cannot be opened. - In these cases, gather the following information and open a support ticket with the DBA team or Oracle Support:
- Output of
lsnrctl statusandlsnrctl services. - Contents of the connection definition (hostname, port, service name, protocol).
- Wallet directory listing and
mkstore -wrl <wallet_dir> -viewoutput. - Any relevant firewall or security group rules.
Verification
After each corrective action, return to SQL Developer, select the connection, and click Test. A successful test displays Status: Success. Additionally, you can run tnsping <service_name> from the client to confirm the listener resolves the service name; a successful ping returns an OK round‑trip time.
Limitations
- Ping may be blocked by ICMP firewalls; a successful ping is not required for TCP connectivity.
- Telnet may not be installed on minimal systems; use alternatives as noted.
- TNSPING only validates that the listener can be reached and the service name is resolvable; it does not authenticate the database.
- Modifying
sqlnet.oraaffects all Oracle clients on the machine; proceed only if you understand the impact.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.