套接字异常:oracle 瘦驱动程序接收失败

发布于 2024-11-19 12:45:40 字数 781 浏览 7 评论 0原文

我面临一个问题,我的测试套件随机失败并出现套接字异常


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

当以特定顺序执行给定的一组测试用例时,测试套件会失败并出现此异常。启用oracle jdbc驱动程序日志后,我得到了上述错误日志。导致此错误的查询始终是“DROP SEQUENCE 查询”。该查询没有什么特别之处,因为它在执行流程中被触发“n”次。

博客链接之一指出上述错误是因为服务器端套接字关闭在客户预期之前。为了解决这一点上的更多问题,我尝试分析 Oracle TNSListener 日志 -listener.log 文件,但无法收集太多信息,因为该日志文件仅包含有关套接字 CONNECT 函数调用的信息。

  1. 除了博客链接提到的原因之外,导致上述错误的可能原因还有哪些?

  2. 如何配置 Oracle TNSListener 以提供有关套接字通信的更多详细信息?例如,当服务器套接字关闭事件被触发时跟踪信息。

如果有人能指出此错误的可能原因或提供更多信息以帮助我根据上述两点进一步解决此问题,我将不胜感激

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 further based on the above two points

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

四叶草在未来唯美盛开 2024-11-26 12:45:40

如果您有权访问 lsnrctl,则可以设置跟踪级别实用程序

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>

从文档中,trc_level 是以下之一:

指定以下跟踪级别之一:

  • off 表示无跟踪输出
  • user 表示用户跟踪信息
  • admin 表示管理跟踪信息
  • 支持Oracle 支持服务跟踪信息

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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文