由于通信问题,MSDTC 事务管理器无法从源事务管理器中提取事务 [英] The MSDTC transaction manager was unable to pull the transaction from the source transaction manager due to communication problems

查看:101
本文介绍了由于通信问题,MSDTC 事务管理器无法从源事务管理器中提取事务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在服务器 1 上托管了我的 Webapp,在服务器 2 上托管了我的数据库

I have hosted my Webapp on server 1 and my database on server 2

但是我遇到以下错误

与底层事务管理器的通信失败."

我用谷歌搜索并发现一个帖子,其中提到这是 DTC(分布式事务)的问题我在 server2(DB 服务器)上启用了 DTC,并在防火墙中例外.

I googled and found a post which mentioned that it is the issue of DTC(Distributed Transaction) I enabled DTC on server2(DB server) and made an exception of it in Firewall.

但还是一样的错误.

这是完整的堆栈跟踪

消息:System.Transactions.TransactionManagerCommunicationException:与底层事务管理器的通信失败.---> System.Runtime.InteropServices.COMException:由于通信问题,MSDTC 事务管理器无法从源事务管理器中提取事务.可能的原因是:存在防火墙并且它没有 MSDTC 进程的例外,两台机器无法通过它们的 NetBIOS 名称找到对方,或者两个事务管理器之一没有启用对网络事务的支持.(来自 HRESULT 的异常:0x8004D02B)在 System.Transactions.Oletx.IDtcProxyShimFactory.ReceiveTransaction(UInt32 propgationTokenSize, Byte[] propgationToken, IntPtr managedIdentifier, Guid& transactionIdentifier, OletxTransactionIsolationLevel&isolationLevel, ITransactionShim& transactionShim)在 System.Transactions.TransactionInterop.GetOletxTransactionFromTransmitterPropigationToken(Byte[]propagationToken)

Message: System.Transactions.TransactionManagerCommunicationException: Communication with the underlying transaction manager has failed. ---> System.Runtime.InteropServices.COMException: The MSDTC transaction manager was unable to pull the transaction from the source transaction manager due to communication problems. Possible causes are: a firewall is present and it doesn't have an exception for the MSDTC process, the two machines cannot find each other by their NetBIOS names, or the support for network transactions is not enabled for one of the two transaction managers. (Exception from HRESULT: 0x8004D02B) at System.Transactions.Oletx.IDtcProxyShimFactory.ReceiveTransaction(UInt32 propgationTokenSize, Byte[] propgationToken, IntPtr managedIdentifier, Guid& transactionIdentifier, OletxTransactionIsolationLevel& isolationLevel, ITransactionShim& transactionShim) at System.Transactions.TransactionInterop.GetOletxTransactionFromTransmitterPropigationToken(Byte[] propagationToken)

请多多指教

推荐答案

我们遇到了完全相同的情况,而且不止一次.每次都是以下之一:

We had the exact same situation, and more than once. Each time, it was one of the following:

  1. 服务器 DNS 中的 IP 地址已过时(如错误消息中所述:两台机器无法通过它们的 NetBIOS 名称找到彼此").您可以通过在命令提示符下尝试 ping servername 从一台服务器到另一台服务器来检查是否是这种情况.如果按名称 ping 失败而按 IP ping 成功(或按名称 ping 返回错误的 IP),那么您应该与系统管理员交谈以查看 DNS/DHCP.

  1. The IP address in the DNS for the server is outdated (as said in error message: "two machines cannot find each other by their NetBIOS names"). You can check if this is the case by trying ping servername from one server to another in the command prompt. If the ping by name fails and ping by IP succeeds (or ping by name returns the wrong IP), than you should talk to the System Admins to take a look at DNS/DHCP.

服务器是作为预配置服务器的映像创建的(例如,如果您正在使用虚拟机,而不是为每台服务器进行全新安装,您只需克隆映像).这是一个问题,因为 DTC 有一个内部标识符" - 如果进行映像克隆,您的两个安装现在具有相同的 DTC ID,并且将无法相互通信.解决方案是简单地卸载并重新安装 DTC.

The servers are created as an image of preconfigured server (for example, if you are working with virtual machines, and instead of doing a fresh install for each of the servers, you simply clone the image). This is a problem because DTC has an internal "Identifier" - and in case of image cloning both your installations now have same DTC ID, and won't be able to communicate with each other. The solution is to simply uninstall and install the DTC again.

希望有帮助.

这篇关于由于通信问题,MSDTC 事务管理器无法从源事务管理器中提取事务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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