DTCPing 工具表示一切都应该没问题。实际的异常是:
System.Transactions.TransactionManagerCommunicationException:
与底层事务管理器的通信失败。 --->
System.Runtime.InteropServices.COMException:MSDTC 事务
经理无法将交易推送到目的地
交易经理由于沟通问题。可能的原因
是:存在防火墙并且没有例外
MSDTC进程,两台机器无法通过它们找到对方
NetBIOS 名称,或未启用对网络事务的支持
对于两个事务管理器之一。 (HRESULT 的异常:
0x8004D02A)
该服务在虚拟机上运行。其他服务器能够运行分布式事务,因此数据库盒配置正确。
DTCPing tool says everything should be fine. The actual exception is:
System.Transactions.TransactionManagerCommunicationException:
Communication with the underlying transaction manager has failed. --->
System.Runtime.InteropServices.COMException: The MSDTC transaction
manager was unable to push the transaction to the destination
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:
0x8004D02A)
The service runs on a VM. Other servers are able to run distributed transactions, so DB box is configured properly.
发布评论
评论(2)
这里有一篇关于此主题的好文章:对 MSDTC 进行故障排除。它最初是为 BizTalk Server 编写的,但也适用于其他服务器。
由于您是在 VPC 上运行,因此 DTC 可能与同一网络上的另一台计算机共享一些标识符。请查看本文中的“确保为 MSDTC 分配唯一的 CID 值”一章(另请参阅 http://blogs.msdn.com/b/johnlee/archive/2008/09/09/msdtc-on-virtual-machines.aspx),尽管我相信 DTCPing 应该告诉你关于它...您还可以尝试
msdtc -uninstall
和msdtc -install
来修复此问题。您还应该检查您的服务器是否未使用某些 VPN 或加密技术。我记得这可能会引起问题。
There is a good article on this subject here: Troubleshooting Problems with MSDTC. It was originally written for BizTalk Server but applies on other server as well.
Since you're running off a VPC, it's possible the DTC shares some identifiers with another machine on the same network. Please check the "Ensure that MSDTC is assigned a unique CID value" chapter in this article (see also http://blogs.msdn.com/b/johnlee/archive/2008/09/09/msdtc-on-virtual-machines.aspx), although I believe DTCPing should tell you about it... You can also try
msdtc -uninstall
andmsdtc -install
to fix this.You should also check if your server are not using some VPN or encryption technology. I kinda remember this can cause issues.
有人已经提到了唯一的 ID,请确保在执行其他操作之前执行此操作,我见过人们花了很多时间沿着其他路线走,结果发现这就是问题所在。
也就是说,我发现一个名为 DTCTester 的工具比 DTCPing 更有用。 http://support.microsoft.com/kb/293799
使用起来比DTCPing,但它的测试也更接近您通常想要做的事情,从而为您提供更清晰的测试结果。
* 确保所有可能的防火墙/过滤软件均已禁用和/或不存在 *
我再怎么强调也不为过,我曾经花了近 90 分钟试图说服客户他的 VPN 软件是充当个人防火墙并阻止传入套接字。一旦他禁用它,问题就消失了。 (顺便说一下,该软件是 Cisco VPN 客户端,设置为“状态防火墙(始终开启)” - 是的,它始终开启:))
请记住,DTC 是双向流量,因此双方都必须如此,并且您还需要确保两台机器都允许“启用网络 DTC 访问”。我还发现,确保两台机器上的 DTC 设置同步通常也能确保可靠的交互。
Someone has already mentioned unique IDs, make sure you do that before you do anything else, I've seen people blow up a LOT of time going down other routes only to find out that was all the problem was.
That said, I have found a tool called DTCTester to be more useful than DTCPing. http://support.microsoft.com/kb/293799
It's a little bit harder to use than DTCPing, but it also tests much closer to what you are normally looking to do which gives you a cleaner test result.
* Make sure that all possible firewall/filtering software is disabled and/or non-existant *
I can't stress that enough, I once spent almost 90 minutes trying to convince a cusotmer that his VPN sofware was acting as a personal firewall and blocking incoming sockets. Once he disabled it, the problems went away. (the software incidently was Cisco VPN Client, the setting was "Stateful Firewall (Always On)" - yep, it's ALWAYS on :) )
Remember that DTC is two-way traffic, so this has to be true on both sides, and you also need to ensure both machines have 'Enable Network DTC Access" allowed. I have also found that making sure the DTC settings on both boxes are synchronized generally ensures solid interaction as well.