[英]MSDTC - Communication with the underlying transaction manager has failed
我收到錯誤:
與底層事務管理器的通信失敗
當我試圖從visual studio 2010運行我的應用程序。我在谷歌搜索此問題,我已嘗試所有可能的解決方案來解決此錯誤。
在這里,我改變了我的DTC屬性。
-- Network DTC Access
-- Allow Inbound
-- Allow Outbound
-- Allow Remote Administrator
-- Allow Remote Clients
-- No Authentication Required
-- Enable XA Transaction
-- Enable SNA LU 6.2 Transaction
如果有人知道這個問題的解決方案,請告訴我。
謝謝Manoj Sitapara
嘗試允許DTC通過防火牆進行通信。
在分布式事務中涉及的所有計算機上下載DTCPing
並運行它。
大多數時候它會給你確切的錯誤和錯誤(比如相同的CID)等等。
可能的原因:
hosts
文件以添加映射IP /主機名,或者,如果在域中,則為它們添加DNS別名。 查看MSDTC故障排除指南 ,其中列出了重復的CID作為潛在問題。 您可以使用以下Powershell腳本來檢測重復的CID,並在需要時使用WinRM重新安裝MSDTC:
write-host "Checking for duplicate CIDs and reinstalling MSDTC if needed."
$servers = "server1","server2","server3"
$CIDs = Invoke-Command -ComputerName $servers -ScriptBlock { gci Microsoft.PowerShell.Core\Registry::HKEY_CLASSES_ROOT\CID | foreach { $_.Name } | Out-String -Stream } #Array of all CIDs on all servers
$UniqueCIDs = $CIDs | select -Unique
if($CIDs.Length -eq $UniqueCIDs.Length){
Write-Output "All CIDs are unique, so we don't need to reinstall MSDTC"
} else {
Write-Output "Found duplicate CIDs, so we need to reinstall MSDTC on all VMs"
Invoke-Command -ComputerName $servers -ScriptBlock {
write-output "`r`nUninstalling MSDTC to regenerate CIDs on $env:computername"
msdtc -uninstall | Write-Output
sleep 25 #wait for previous command to finish
write-output "`r`nReinstalling MSDTC to regenerate CIDs on $env:computername"
msdtc -install | Write-Output
sleep 25 #wait for previous command to finish
write-output "`r`nSetting MSDTC service to automatic on $env:computername"
Set-Service msdtc -startuptype "auto"
write-output "`r`nWARNING: $env:computername may need to be restarted for changes to take effect."
}
}
嘗試在群集上設置DTC和MSMQ時,我收到了失敗的通信錯誤。 在我的情況下,潛在的錯誤是“Ran out of memory”。 我能夠將事務性消息從群集發送到另一台服務器,但不能從該服務器返回到群集。 我的服務會拋出這個異常:
System.Transactions.TransactionAbortedException: The transaction has aborted.
---> System.Transactions.TransactionManagerCommunicationException: Communication
with the underlying transaction manager has failed. --->
System.Runtime.InteropServices.COMException: Ran out of memory (Exception from HRESULT: 0x80000002)
這篇文章有一個非常模糊的解決方案: http : //www.nervousadmin.com/category/microsoft/windows/dtc/
總結一下:
注冊表中有一個guid,用於HKLM \\ Cluster \\ ResourceTypes \\ Distributed Transaction Coordinator下的關鍵ClusterDefaultResource,它需要與DTC服務的可執行路徑上的guid參數對齊。
此問題的另一個症狀是,如果您嘗試通過組件服務管理控制台訪問DTC屬性,則會出現內存不足錯誤。 在組件服務/計算機/我的電腦/分布式事務處理協調器下的控制台樹中查找,然后右鍵單擊其中列出的每個DTC。 如果你的guid沒有對齊,這將拋出錯誤。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.