We started to have this "Network adapter could not establish the connection" problem in our production environment from time to time, I did a lot of google and went through some questions here but still didn't get the solution.
Here are some information about our environment:
We've run following tests to check if there is any problem on network or oracle TNS listener:
The most weird thing is that this error happens around 10 times an hour on one app server, but only happens 1 or 2 times a day on another app server.
Can anyone shed some light on this error?
Thanks
[EDIT4]: We found timeout problem when tnsping one oracle instance, so we changed the jdbc url to connect only one instance and found the IOException never happened again, so we think the problem is related with database and the DBA team will continue look into this.
[EDIT3]: We did following tries:
none of them succeed, someone please help~
[EDIT]: the error stack trace:
java.sql.SQLException: Io Exception: The Network Adapter could not establish the connection
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:414)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:207)
... 5 more
The error
java.sql.SQLException: Io Exception: The Network Adapter could not establish the connection
has nothing to do with Java/JDBC
.
This is the error you get when there's something wrong with your network setup. My guess, firewall problem. Can you disable it and see if the error is still there?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With