RPC_E_DISCONNECTED (0x80010108) error

讨论了RPC_E_DISCONNECTED(0x80010108)错误在不同Windows系统中通过DCOM连接OPC服务器时出现的问题及解决方法。

Posted: Fri Oct 20, 2006 11:05 am    Post subject: RPC_E_DISCONNECTED (0x80010108) error   

--------------------------------------------------------------------------------
 
Hi gentlemen,

There are several posts on the Forums, etc. relating to the following problem described in: http://support.microsoft.com/default.aspx?scid=KB;en-us;q293631 (DCOM Application Fails with RPC_E_DISCONNECTED).

We are experiencing this critical issue with our software that strongly affects the production of our customers.

Our OPC servers are running on Windows 2000 SP4 or Windows 2003 Server (with no service pack) system. The remote OPC clients are running on Windows 2000 system.

A few hours to a few days after connection, some OPC clients on one or more computers connected to OPC servers over DCOM will stop updating. The client still successfully "pings" the server with calls to GetStatus() and DCOM never cleans up any of the established connections, so to our clients it just looks like all the DA items have stopped changing. Quitting the applications and running them again always corrects the problem.

It sounds like this known DCOM bug in Windows 2000.

Our question is: how can we fix this issue either on Windows 2000 and Windows 2003 Server (which service pack or hotfix must we apply on theses operating systems) ?

We have heard about a Post-Service Pack 4 COM+ 1.0 Hotfix Rollup Package 31 (http://support.microsoft.com/kb/888000/en-us). Do you think it will fix the issue for Windows 2000 and do you have any experience using this hotfix ?

Regards
 
Back to top      
 
 
Randy

 

Joined: 27 Feb 2003
Posts: 3553
Location: OPC Foundation
 Posted: Fri Oct 20, 2006 11:16 am    Post subject:   

--------------------------------------------------------------------------------
 
This is problem has been confirmed to be a bug in DCOM by Microsoft. There is apparently a fix available but I heard it is only available but I don't know which one it is. I will investigate further.
 
Back to top       
 
 
AlexanderK

 

Joined: 08 Nov 2006
Posts: 2
Location: Russia
 Posted: Wed Nov 08, 2006 1:02 pm    Post subject: changes made in client software, waiting for result   

--------------------------------------------------------------------------------
 
Hi, thd, and everyone interested,
The eror RPC _E_DISCONNECTED began to appear on the client workstations, for which I provide support, about two months ago. Though
for two years before it didn't. I don't know the exact reasons why it didn't appear earlier, may be some changes were made in LAN configuration, don't know, but the same way as "thd" writes it badly affected the work of our users, to the point of refusal from the newly installed SCADA system. The error appeared exactly with the same frequency "A few hours to a few days after connection". I have tried many things to get rid of it, all useless. in the article
http://support.microsoft.com/kb/293631 Microsoft declares that the problem was fixed in Windows 2000 SP3, but on my client's computers it was installed, so it couldn't help. Then I read again the Microsoft explanation of the bug origin in the same article and tried to change client software in order to create different working logic for DCOM client software. Now, after yesterday's corrections I do not have this error on all three workstations where I updated client software. May be it will still appear, I am not 100% sure, but untill now, near 20 hours of work it didn't. I will not go in details and explain the measures taken, better wait a day or two more, then if the changes will prove to be helping I will post here another message explaining what I did with client software. One thing still I have to tell now, the client software is developed by myself, so I have a full source code and freedom of modifications. My DCOM server which is called by clients is not actually OPC server, but it doesn't matter.
May be it is a bit too early for me to post a message on the subject, but, at least it gives some info on the given subject, giving the thread author a feeling that he is not "all alone" facing this sort of problem.

Alexander
 
Back to top       
 
 
AlexanderK

 

Joined: 08 Nov 2006
Posts: 2
Location: Russia
 Posted: Mon Nov 13, 2006 2:56 pm    Post subject: RPC _E_DISCONNECTED   

--------------------------------------------------------------------------------
 
As promised, I inform here, that what I did, resolved the problem,
in fact major thing was to initialize a COM library to work in multithreaded apartment.
I used CoInitializeEx(NULL,COINIT_APARTMENTTHREADED );
//COINIT_MULTITHREADED );
I didn't manage to use the parameter COINIT_MULTITHREADED,
as you may see from the code snippet, but with parameter
COINIT_APARTMENTTHREADED, it somehow did help anyway. Though after 6 days of work I still had the same error, but only once and on one station. Well, that is all for now. I didn't apply the above mentioned Microsoft HotFix, since it was difficult to get.

Alexander
 
Posted: Mon Oct 13, 2003 12:20 pm    Post subject: RPC_E_DISCONNECTED (0x80010108) error   

--------------------------------------------------------------------------------
 
Hello all,

We are having problems with an OPC server in a customer's system that I hope someone might be able to shed some light on.

The problem we experience is that after the connection between an OPC client and server has been up for a week or so, the OPC server appears to stop sending updates to the client. We ran a TCP sniffer to see what was happening at the packet level, and the packet trace reveals that all of a sudden, requests issued from the server to the client fail with error code 0x80010108 (RPC_E_DISCONNECTED). However, requests from the client to the server work fine, so updates performed by the client are received ok by the server (but are not reflected back to the client until the connection is reset). Once the error occurs, we are also unable to connect to the OPC server with another OPC client until we have disconnected the original client (before we disconnect, any new clients attempting a connection fail with an 'RPC server unavailable' error).

The problem appears similar to the bug described in http://support.microsoft.com/default.aspx?scid=KB;en-us;q293631, but both the client and server machines in our case are running Win2000 SP4 (the problem also occurs with SP3, we upgraded to see if that would fix the problem).

Additionally, the OPC client is connected to quite a number of OPC servers, but only one particular server fails in this way (and it's always the same server), all the others do not have any problems. Incidentally, the operating system on the other OPC server machines is Windows NT, not 2000.

Has anyone else seen this happen with Win2K before and been able to get around it somehow?

Thanks a lot for any help!

Thomas Hansen
TRAFSYS as
 
Back to top      
 
 
Randy

 

Joined: 27 Feb 2003
Posts: 3553
Location: OPC Foundation
 Posted: Mon Oct 13, 2003 7:39 pm    Post subject:   

--------------------------------------------------------------------------------
 
What SP is running on the NT server machines?

Regards
 
Back to top        
 
 

Guest

 

 

 Posted: Tue Oct 14, 2003 7:07 am    Post subject: Re:   

--------------------------------------------------------------------------------
 
Randy wrote:
What SP is running on the NT server machines?


They run NT4 SP6. I also just discovered that one of the OPC server machines is Win2K SP2, but like all the NT machines it has never exhibited any problems like the one I describe above.

I also noticed that the machine running the OPC server that fails has an English version of Win2K, while the machine with the OPC client runs a Norwegian version of Win2K (both SP4). Although language settings should be orthogonal to DCOM problems, previous experience has shown that different languages tend to introduce subtly different behaviour (and bugs) in the same circumstances...

Thanks again for taking the time to look at this.

Thomas Hansen
TRAFSYS as
 
Back to top    
 
 
Randy

 

Joined: 27 Feb 2003
Posts: 3553
Location: OPC Foundation
 Posted: Tue Oct 14, 2003 6:08 pm    Post subject:   

--------------------------------------------------------------------------------
 
Quote:
requests issued from the server to the client fail with error code 0x80010108 (RPC_E_DISCONNECTED). 

This could indicate that a there is a bug in the client application that either: releases all references to the object the server is attempting to use or the client explicitly calls CoDisconnectObject() on that object.

You might see this error if the callback object in the client is running in a single threaded appartment and that thread terminates (the DCOM infrastructure in the client would likely call CoDisconnectObject()).

Regards
 

 

MvErrorDefine.h内容为: #ifndef _MV_ERROR_DEFINE_H_ #define _MV_ERROR_DEFINE_H_ #include "MvISPErrorDefine.h" /********************************************************************/ /// \~chinese /// \name 正确码定义 /// @{ /// \~english /// \name Definition of correct code /// @{ #define MV_OK 0x00000000 ///< \~chinese 成功,无错误 \~english Successed, no error /// @} /********************************************************************/ /// \~chinese /// \name 通用错误码定义:范围0x80000000-0x800000FF /// @{ /// \~english /// \name Definition of General error code /// @{ #define MV_E_HANDLE 0x80000000 ///< \~chinese 错误或无效的句柄 \~english Error or invalid handle #define MV_E_SUPPORT 0x80000001 ///< \~chinese 不支持的功能 \~english Not supported function #define MV_E_BUFOVER 0x80000002 ///< \~chinese 缓存已满 \~english Buffer overflow #define MV_E_CALLORDER 0x80000003 ///< \~chinese 函数调用顺序错误 \~english Function calling order error #define MV_E_PARAMETER 0x80000004 ///< \~chinese 错误的参数 \~english Incorrect parameter #define MV_E_RESOURCE 0x80000006 ///< \~chinese 资源申请失败 \~english Applying resource failed #define MV_E_NODATA 0x80000007 ///< \~chinese 无数据 \~english No data #define MV_E_PRECONDITION 0x80000008 ///< \~chinese 前置条件有误,或运行环境已发生变化 \~english Precondition error, or running environment changed #define MV_E_VERSION 0x80000009 ///< \~chinese 版本不匹配 \~english Version mismatches #define MV_E_NOENOUGH_BUF 0x8000000A ///< \~chinese 传入的内存空间不足 \~english Insufficient memory #define MV_E_ABNORMAL_IMAGE 0x8000000B ///< \~chinese 异常图像,可能是丢包导致图像不完整 \~english Abnormal image, maybe incomplete image because of lost packet #define MV_E_LOAD_LIBRARY 0x8000000C ///< \~chinese 动态导入DLL失败 \~english Load library failed #define MV_E_NOOUTBUF 0x8000000D ///< \~chinese 没有可输出的缓存 \~english No Avaliable Buffer #define MV_E_ENCRYPT 0x8000000E ///< \~chinese 加密错误 \~english Encryption error #define MV_E_OPENFILE 0x8000000F ///< \~chinese 打开文件出现错误 \~english open file error #define MV_E_BUF_IN_USE 0x80000010 ///< \~chinese 缓存地址已使用 \~english Buffer already in use #define MV_E_BUF_INVALID 0x80000011 ///< \~chinese 无效的缓存地址 \~english Buffer address invalid #define MV_E_NOALIGN_BUF 0x80000012 ///< \~chinese 缓存对齐异常 \~english Buffer alignmenterror error #define MV_E_NOENOUGH_BUF_NUM 0x80000013 ///< \~chinese 缓存个数不足 \~english Insufficient cache count #define MV_E_PORT_IN_USE 0x80000014 ///< \~chinese 串口被占用 \~english Port is in use #define MV_E_IMAGE_DECODEC 0x80000015 ///< \~chinese 解码错误(SDK校验图像异常)\~english Decoding error (SDK verification image exception) #define MV_E_UINT32_LIMIT 0x80000016 /// \~chinese 图像大小超过unsigned int返回,接口不支持 #define MV_E_IMAGE_HEIGHT 0x80000017 /// \~chinese 图像高度异常(残帧丢弃) \~english image height anomaly (discard incomplete images) #define MV_E_NOENOUGH_DDR 0x80000018 ///< \~chinese DDR缓存不足 \~english The DDR cache is Insufficient #define MV_E_NOENOUGH_STREAM 0x80000019 ///< \~chinese 流通道不足 \~english The stream channel is Insufficient #define MV_E_NORESPONSE 0x8000001A ///< \~chinese 设备无响应 \~english No response from device #define MV_E_UNKNOW 0x800000FF ///< \~chinese 未知的错误 \~english Unknown error /// @} /********************************************************************/ /// \~chinese /// \name GenICam系列错误:范围0x80000100-0x800001FF /// @{ /// \~english /// \name GenICam Series Error Codes: Range from 0x80000100 to 0x800001FF /// @{ #define MV_E_GC_GENERIC 0x80000100 ///< \~chinese 通用错误 \~english General error #define MV_E_GC_ARGUMENT 0x80000101 ///< \~chinese 参数非法 \~english Illegal parameters #define MV_E_GC_RANGE 0x80000102 ///< \~chinese 值超出范围 \~english The value is out of range #define MV_E_GC_PROPERTY 0x80000103 ///< \~chinese 属性 \~english Property #define MV_E_GC_RUNTIME 0x80000104 ///< \~chinese 运行环境有问题 \~english Running environment error #define MV_E_GC_LOGICAL 0x80000105 ///< \~chinese 逻辑错误 \~english Logical error #define MV_E_GC_ACCESS 0x80000106 ///< \~chinese 节点访问条件有误 \~english Node accessing condition error #define MV_E_GC_TIMEOUT 0x80000107 ///< \~chinese 超时 \~english Timeout #define MV_E_GC_DYNAMICCAST 0x80000108 ///< \~chinese 转换异常 \~english Transformation exception #define MV_E_GC_UNKNOW 0x800001FF ///< \~chinese GenICam未知错误 \~english GenICam unknown error /// @} /********************************************************************/ /// \~chinese /// \name GigE_STATUS对应的错误码:范围0x80000200-0x800002FF /// @{ /// \~english /// \name GigE_STATUS Error Codes: Range from 0x80000200 to 0x800002FF /// @{ #define MV_E_NOT_IMPLEMENTED 0x80000200 ///< \~chinese 命令不被设备支持 \~english The command is not supported by device #define MV_E_INVALID_ADDRESS 0x80000201 ///< \~chinese 访问的目标地址不存在 \~english The target address being accessed does not exist #define MV_E_WRITE_PROTECT 0x80000202 ///< \~chinese 目标地址不可写 \~english The target address is not writable #define MV_E_ACCESS_DENIED 0x80000203 ///< \~chinese 设备无访问权限 \~english No permission #define MV_E_BUSY 0x80000204 ///< \~chinese 设备忙,或网络断开 \~english Device is busy, or network disconnected #define MV_E_PACKET 0x80000205 ///< \~chinese 网络包数据错误 \~english Network data packet error #define MV_E_NETER 0x80000206 ///< \~chinese 网络相关错误 \~english Network error #define MV_E_SUPPORT_MODIFY_DEVICE_IP 0x8000020E ///< 在固定IP模式下不支持修改设备IP模式 \~english Current Mode Not Support Modify Ip #define MV_E_KEY_VERIFICATION 0x8000020F ///< \~chinese 秘钥校验错误 \~english SwitchKey error #define MV_E_IP_CONFLICT 0x80000221 ///< \~chinese 设备IP冲突 \~english Device IP conflict /// @} /********************************************************************/ /// \~chinese /// \name USB_STATUS对应的错误码:范围0x80000300-0x800003FF /// @{ /// \~english /// \name USB_STATUS Error Codes: Range from 0x80000300 to 0x800003FF /// @{ #define MV_E_USB_READ 0x80000300 ///< \~chinese 读usb出错 \~english Reading USB error #define MV_E_USB_WRITE 0x80000301 ///< \~chinese 写usb出错 \~english Writing USB error #define MV_E_USB_DEVICE 0x80000302 ///< \~chinese 设备异常 \~english Device exception #define MV_E_USB_GENICAM 0x80000303 ///< \~chinese GenICam相关错误 \~english GenICam error #define MV_E_USB_BANDWIDTH 0x80000304 ///< \~chinese 带宽不足 \~english Insufficient bandwidth #define MV_E_USB_DRIVER 0x80000305 ///< \~chinese 驱动不匹配或者未装驱动 \~english Driver mismatch or unmounted drive #define MV_E_USB_UNKNOW 0x800003FF ///< \~chinese USB未知的错误 \~english USB unknown error /// @} /********************************************************************/ /// \~chinese /// \name 升级时对应的错误码:范围0x80000400-0x800004FF /// @{ /// \~english /// \name Upgrade Error Codes: Range from 0x80000400 to 0x800004FF /// @{ #define MV_E_UPG_FILE_MISMATCH 0x80000400 ///< \~chinese 升级固件不匹配 \~english Firmware mismatches #define MV_E_UPG_LANGUSGE_MISMATCH 0x80000401 ///< \~chinese 升级固件语言不匹配 \~english Firmware language mismatches #define MV_E_UPG_CONFLICT 0x80000402 ///< \~chinese 升级冲突(设备已经在升级了再次请求升级即返回此错误) \~english Upgrading conflicted (repeated upgrading requests during device upgrade) #define MV_E_UPG_INNER_ERR 0x80000403 ///< \~chinese 升级时设备内部出现错误 \~english Camera internal error during upgrade #define MV_E_UPG_UNKNOW 0x800004FF ///< \~chinese 升级时未知错误 \~english Unknown error during upgrade /// @} #endif //_MV_ERROR_DEFINE_H_
最新发布
11-07
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值