Oracle 12C RAC on Solaris 11 - Random Connection Timeout

513 Views Asked by At

We are having issue whereby there is random connection timeout from our java application connecting to Oracle 12c R1 RAC. Both are on Solaris 11.

Caused by: java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:743)
...
...
Caused by: java.net.SocketTimeoutException: connect timed out at java.net.PlainSocketImpl.socketConnection(NativeMethod)

And this happens only randomly , maybe once every three runs?

Any assistance is appreciated!!!! Thanks!

1

There are 1 best solutions below

0
Hergen On

Which version of JDBC driver are you using ? If you are using the one which comes with 12.2.0.1 replace it by a newer one. We had the same issue here; connects are randomly failing. But its not a timout at all. The message "java.io.InterruptedIOException: Socket read timed out" is simply wrong.

The real issue is that the connect syscall is interrupted, as you can see from the dtrace probes

 23708/2:  connect(0x8, 0xFFFFFFFF7F2EDD54, 0x20)                = -1 Err#4
 23708/2:  lwp_sigmask(0x3, 0x4, 0x40)           = 0xFFFFFFFF 0
 23708/2:  setcontext(0x1, 0xFFFFFFFF7F2ED2D0, 0x0)              = 0 0
 23708/2:  connect(0x8, 0xFFFFFFFF7F2EDD54, 0x20)                = -1 Err#149

Please try the ojdbc.jar from Oracle Client 18.3 or 19.3

There is also a Patch for 12.2.0.1 Unpublished Bug 25977056 : AC: UNITS FOR TRANSPORT_CONNECT_TIMEOUT CHANGED WITH NO QUALIFIER.