Orders stuck in Queued state or Distributed Transaction Manager (MSDTC) errors in the Event Viewer

Problem

Distributed Transaction fails with workflow manager when SQL is installed on a Separate SQL Server than ZervicePoint:

Message: Error when trying to get process workflow markup from configuration:
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)  
   --- End of inner exception stack trace ---  
   at System.Transactions.TransactionInterop.GetOletxTransactionFromTransmitterPropigationToken(Byte[] propagationToken)  
   at System.Transactions.TransactionStatePSPEOperation.PSPEPromote(InternalTransaction tx)
   at System.Transactions.TransactionStateDelegatedBase.EnterState(InternalTransaction tx)
   at System.Transactions.EnlistableStates.Promote(InternalTransaction tx)
   at System.Transactions.Transaction.Promote()
   at System.Transactions.TransactionInterop.ConvertToOletxTransaction(Transaction transaction)  
   at System.Transactions.TransactionInterop.GetExportCookie(Transaction transaction, Byte[] whereabouts)  
   at System.Data.SqlClient.SqlInternalConnection.GetTransactionCookie(Transaction transaction, Byte[] whereAbouts)  
   at System.Data.SqlClient.SqlInternalConnection.EnlistNonNull(Transaction tx)  
   at System.Data.SqlClient.SqlInternalConnection.Enlist(Transaction tx)  
   at System.Data.SqlClient.SqlInternalConnectionTds.Activate(Transaction transaction)  
   at System.Data.ProviderBase.DbConnectionInternal.ActivateConnection(Transaction transaction)  
   at System.Data.ProviderBase.DbConnectionPool.PrepareConnection(DbConnection owningObject, DbConnectionInternal obj, Transaction transaction)  
   at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)  
   at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)  
   at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)  
   at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)  
   at System.Data.SqlClient.SqlConnection.Open()  
   at System.Data.Linq.SqlClient.SqlConnectionManager.UseConnection(IConnectionUser user)
   at System.Data.Linq.SqlClient.SqlProvider.get_IsSqlCe()
   at System.Data.Linq.SqlClient.SqlProvider.InitializeProviderMode()
   at System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query)
   at System.Data.Linq.DataQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator()  
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)  
   at Zipper.ZervicePoint.ProcessComponent.Queries.Projections.ProcessDataProjection.Execute(IQueryable`1 context)  
   at Zipper.ZervicePoint.ProcessComponent.Queries.GetProcessById.Execute()
   at Zipper.ZervicePoint.ProcessSystem.Builders.XamlBuilder.GetXaml(String storeName, ServiceModel service)  
   at Zipper.ZervicePoint.ProcessSystem.Service.Services.WorkflowService.GetProcessForService(String store, Int32 serviceId)  
Category: Process  
Priority: -1  
EventId: 0  
Severity: Error  
Title:  
Machine: S024  
Application Domain:
Zipper.ZervicePoint.ProcessSystem.WorkflowService.exe  
Process Id: 4348  
Process Name: C:\Program Files\Zipper\ZervicePoint\ProcessSystem\Zipper.ZervicePoint.ProcessSystem.WorkflowService.exe  
Win32 Thread Id: 5884  
Thread Name:  
Extended Properties:


Message: Error when trying to get process workflow markup from configuration:
System.Transactions.TransactionManagerCommunicationException: Network access for
Distributed Transaction Manager (MSDTC) has been disabled. Please enable DTC for
network access in the security configuration for MSDTC using the Component Services
Administrative tool. ---> System.Runtime.InteropServices.COMException: The transaction
manager has disabled its support for remote/network transactions. (Exception from HRESULT: 0x8004D024)  
   at System.Transactions.Oletx.ITransactionShim.Export(UInt32 whereaboutsSize, Byte[] whereabouts, Int32& cookieIndex, UInt32& cookieSize, CoTaskMemHandle& cookieBuffer)
   at System.Transactions.TransactionInterop.GetExportCookie(Transaction transaction, Byte[] whereabouts)  
   --- End of inner exception stack trace ---  
   at System.Transactions.Oletx.OletxTransactionManager.ProxyException(COMException comException)
   at System.Transactions.TransactionInterop.GetExportCookie(Transaction transaction, Byte[] whereabouts)
   at System.Data.SqlClient.SqlInternalConnection.GetTransactionCookie(Transaction transaction, Byte[] whereAbouts)  
   at System.Data.SqlClient.SqlInternalConnection.EnlistNonNull(Transaction tx)  
   at System.Data.SqlClient.SqlInternalConnection.Enlist(Transaction tx)  
   at System.Data.SqlClient.SqlInternalConnectionTds.Activate(Transaction transaction)  
   at System.Data.ProviderBase.DbConnectionInternal.ActivateConnection(Transaction transaction)  
   at System.Data.ProviderBase.DbConnectionPool.PrepareConnection(DbConnection owningObject, DbConnectionInternal obj, Transaction transaction)  
   at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)  
   at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)  
   at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)  
   at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)  
   at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)  
   at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)  
   at System.Data.SqlClient.SqlConnection.Open()  
   at System.Data.Linq.SqlClient.SqlConnectionManager.UseConnection(IConnectionUser user)  
   at System.Data.Linq.SqlClient.SqlProvider.get_IsSqlCe()  
   at System.Data.Linq.SqlClient.SqlProvider.InitializeProviderMode()  
   at System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query)  
   at System.Data.Linq.DataQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator()  
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)  
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)  
   at Zipper.ZervicePoint.ProcessComponent.Queries.Projections.ProcessDataProjection.Execute(IQueryable`1 context)
   at Zipper.ZervicePoint.ProcessComponent.Queries.GetProcessById.Execute()  
   at Zipper.ZervicePoint.ProcessSystem.Builders.XamlBuilder.GetXaml(String storeName, ServiceModel service)  
   at Zipper.ZervicePoint.ProcessSystem.Service.Services.WorkflowService.GetProcessForService(String store, Int32 serviceId)  
Category: Process  
Priority: -1  
EventId: 0  
Severity: Error  
Title:  
Machine: S024  
Application Domain:
Zipper.ZervicePoint.ProcessSystem.WorkflowService.exe  
Process Id: 4348  
Process Name: C:\Program Files\Zipper\ZervicePoint\ProcessSystem\Zipper.ZervicePoint.ProcessSystem.WorkflowService.exe  
Win32 Thread Id: 5884  
Thread Name:  
Extended Properties:

Solution

  1. Check out this troubleshooting guide. http://msdn.microsoft.com/en-us/library/aa561924.aspx

  2. At the installation both the ZervicePoint application server and the SQL server had the same CID's so we reinstalled the MSDTC to generate new unique CID on the SQL server.

    #View: CIDs (These must be different on all systems)
    ls Microsoft.PowerShell.Core\Registry::HKEY_CLASSES_ROOT\CID | select Name
    #Reinstall MSDTC to regenerate CIDs.
    msdtc -uninstall
    sleep 5
    msdtc -install
    sleep 5
    Set-Service msdtc -startuptype "auto"
    #Reboot for changes to take effect
    
  3. At this specific installation I also had to open firewall rules for Distributed Transaction Manager and enable Network DTC Access both on the SQL server and the ZervicePoint server. msdtc firewall rules

    • And enable the Network DTC Access

    msdtc config

Troubleshooting guidelines