Reputation: 854
I am getting error:
communication with the underlying transaction manager has failed
when I am trying to run my application from visual studio 2010. I have search on google for this problem, I have tried all possible solutions to resolve this error.
Here i have made change in my DTC properties.
-- 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
Please let me know, if anyone knows the solution for this problem.
Thanks Manoj Sitapara
Upvotes: 29
Views: 56012
Reputation: 13
I got the failed communication error while trying to set up DTC and MSMQ on a cluster. In my case the underlying error was "Ran out of memory." I was able to send transactional messages from the cluster to another server, but not back from that server to the cluster. My service would throw this exception:
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)
This article had the very obscure solution: http://www.nervousadmin.com/category/microsoft/windows/dtc/
To summarize:
There is a guid in the registry for the key ClusterDefaultResource under HKLM\Cluster\ResourceTypes\Distributed Transaction Coordinator that needs to align with the guid argument on the DTC service's path to executable.
Another symptom of this issue is that you would get an out of memory error if you try to access the DTC properties via the Component Services management console. Look in the console tree under Component Services/Computers/My Computer/Distributed Transaction Coordinator and right click on each of the DTCs listed there. This will throw the error if your guids are not aligned.
Upvotes: 0
Reputation: 15697
Check the MSDTC troubleshooting guide, which lists duplicate CIDs as a potential issue. You can use the following Powershell script to detect duplicate CIDs and reinstall MSDTC if needed using WinRM:
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."
}
}
Upvotes: 7
Reputation: 13976
Download DTCPing
on all computers involved in the distributed transaction and run it.
Most of the times it will give you the exact error and what's wrong (like identical CID's), etc.
Possible reasons:
hosts
file to add mappings IP/hostname or, if in a domain, add DNS aliases for them.Upvotes: 20