DB2通信错误 [英] DB2 Communication Error

查看:849
本文介绍了DB2通信错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们最近开发了一个应用程序,它将在DB2中运行查询,并向相应的收件人发送邮件。它在我们的本地系统和QA区域工作良好。但在生产中,很少查询失败(即使是罕见的,如在星期一次)。它会抛出以下异常。

We recently developed an application which will run a query in DB2 and send a mail to the corresponding recipient. It works well in our local system and QA region. But in production, few queries failed (even if it's rare, like once in week). It throws the exception below.

异常InnerDetails:


错误[40003] [IBM] [CLI驱动程序] SQL30081N检测到通信错误
。使用的通信协议:TCP / IP。
正在使用的通信API:SOCKETS。检测到错误为
的位置:111.111.111.111。通信功能检测
错误:recv。协议特定的错误代码:10004,
SQLSTATE = 08001

ERROR [40003] [IBM][CLI Driver] SQL30081N A communication error has been detected. Communication protocol being used: "TCP/IP". Communication API being used: "SOCKETS". Location where the error was detected: "111.111.111.111". Communication function detecting the error: "recv". Protocol specific error code(s): "10004", "", "". SQLSTATE=08001

由于错误只发生在生产中,而且不常发生,我们不确定它是否是代码或设置问题。

Since error occurs only in production and not very often, we are not sure whether it is the code or a setting issue. Do you have any idea?

推荐答案

这个特定的错误( SQL30081N )只是一个通用消息,指示网络问题在您的DB2客户端和服务器之间。在这种情况下,您需要查看协议特定的错误代码。在这里,它看起来像你在Windows上,而特定的代码(10004)没有在IBM文档中给出。

That particular error (SQL30081N) is just a generic message that indicates a network issue between your DB2 client and the server. In this case, you want to look at the Protocol specific error code(s). Here, it looks like you're on Windows, and that particular code (10004) isn't given in the IBM documentation.

所以,如果你google错误代码,您会发现此网页,其中显示:

So, if you google "windows network error codes", you'll find this page, which says:


WSAEINTR

10004

中断函数调用。

A blocking operation was interrupted by a call to WSACancelBlockingCall.


哪个链接到此页面有更多关于该特定功能的信息:

Which links to this page with more information on that specific function (emphasis mine):


WSACancelBlockingCall函数已根据Windows Sockets 2规范(版本2.2.0)中的合规性
删除。

The WSACancelBlockingCall function has been removed in compliance with the Windows Sockets 2 specification, revision 2.2.0.

此函数不是由WS2_32.DLL和Windows
直接导出的Sockets 2应用程序不应使用此函数。 Windows Sockets
1.1通过WINSOCK.DLL和WSOCK32.DLL支持调用此函数的应用程序。

The function is not exported directly by WS2_32.DLL and Windows Sockets 2 applications should not use this function. Windows Sockets 1.1 applications that call this function are still supported through the WINSOCK.DLL and WSOCK32.DLL.

阻止钩子通常用于保持一个单线程GUI
应用程序在调用阻塞函数期间响应。
应用程序应该使用单独的线程
(与主GUI线程分离),而不是
使用阻塞钩子,

Blocking hooks are generally used to keep a single-threaded GUI application responsive during calls to blocking functions. Instead of using blocking hooks, an applications should use a separate thread (separate from the main GUI thread) for network activity.

我猜测您的应用程序在生产应用程序中可能比其他环境阻塞更长时间,

I'm guessing that your application may be blocking for a longer time in your production application than your other environments, and something along the way is causing the interrupt.

希望这会引导你走正确的路径...

Hopefully this leads you down the right path...

这篇关于DB2通信错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆