开发者

Socket Exception : recv failed with oracle thin driver

I am facing an issue where my test suite randomly fails with an socket exception


oracle.jdbc.driver.T4CStatement 1267 - Throwing SQLException: java.net.SocketException: Software caused connection abort: recv failed 

The test suite fails with this exception when a given set of test cases are executed in a particular order. I got the above error log after enabling the oracle jdbc driver logs. The query which leads to this error is always a "DROP SEQUENCE query". There is nothing special about this query since it is fired 'n' number of times during the execution flow.

One of the blog link points out that the above error is because the server side sockets gets closed before the client expects. To troubleshoot more on this point I tried analyzing the Oracle TNSListener logs - listener.log file but was not able to gather much information since the log file only contained information about the socket CONNECT function call.

  1. What could be the possible causes of the above error in addition to the one the blog link mentions?

  2. How can I configure the Oracle TNSListener to provide more detailed information about the socket communication? For e.g. Trace information when the server socket close event is fired.

I would appreciated if anyone could point out to a possible cause of this error or provide more information which could help me to troubleshoot this issue furth开发者_如何转开发er based on the above two points


You can set the trace level if you have access to the lsnrctl utility:

LSNRCTL> show trc_level
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=xxx)(PORT=1521)))
LISTENER parameter "trc_level" set to off
The command completed successfully
LSNRCTL> set trc_level admin
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=xxx)(PORT=1521)))
LISTENER parameter "trc_level" set to admin
The command completed successfully
LSNRCTL> show trc_level
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=xxx)(PORT=1521)))
LISTENER parameter "trc_level" set to admin
The command completed successfully
LSNRCTL>

From the docs, trc_level is one of:

Specify one of the following trace levels:

  • off for no trace output
  • user for user trace information
  • admin for administration trace information
  • support for Oracle Support Services trace information
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜