MSDTC,与底层事务管理器的通信失败+ Windows Azure VM

时间:2016-11-03 13:15:07

标签: azure transactionscope msdtc

我的应用程序部署在2个Windows Azure虚拟机上。 1台用于sql server的机器,另一台用于应用程序。

在应用程序中,我使用的是TransactionScope。所以我在两个虚拟机上应用了事务配置,如下图所示。

enter image description here

此外,我已在两台计算机上的防火墙中允许分布式事务处理协调器。

我有一个长时间运行的进程,有一个循环,在每个循环中我有一个单独的TransactionScope。有时,并非总是如此,我得到以下例外。

Communication with the underlying transaction manager has failed. ------- Inner Exception: 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.

两个虚拟机上都安装了“System Center Endpoint Protection”,我也没有结果关闭了实时保护。

我尝试在sql VM上运行该进程,一切正常,没有例外。

1 个答案:

答案 0 :(得分:1)

实际上,经过几天的搜索和调查,我找到了问题的根源。问题是2台机器不能通过net bios名称进行ping操作。他们只能通过IP进行ping操作。解决ping问题后。一切都很好。