Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
JayZ1
Contributor III
Contributor III

Error: The Network Adapter could not establish the connection java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection

I have a very weird situation im hoping to get some help with. As of last week everything was working as expected but suddenty it stopped working and now i get this error:

Error: The Network Adapter could not establish the connection

java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection

Background: I am connecting to an oracle database 4 different times. Either inserting info or reading data from the table, when reading data everything is working good however inserting is failing although i have permissions. There is no firewall issue with with connection because i am already able to connect to the database earlier in my script and retrieve data

Error: The Network Adapter could not establish the connection

java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection

Caused by: java.io.IOException: Connection timed out, socket connect lapse 127233 ms.

Caused by: java.net.ConnectException: Connection timed out

 

I have also tried inserting data into a table via datagrip and it worked perfectly

Labels (3)
2 Replies
Anj24
Contributor II
Contributor II

You should check the network issues(e.g: the firewall is blocking port 1521).

If the network is ok, then most probably you have the listener configured wrongly, the hostname you specify in the connection string must be the same as in the listener.

https://www.youtube.com/watch?v=pMQXVihgrrE&t=212s

https://adhoctuts.com/fix-oracle-io-error-the-network-adapter-could-not-establish-the-connection-err...

JayZ1
Contributor III
Contributor III
Author

it cannot be network issue because earlier in the script we are able to read data from the same db it is failing at. the connection string is also a context parameter so no issues there either 😕