Troubleshooting App Service Hybrid Connection Manager

I wrote this article “Enable logging for your Hybrid Connection Manager, troubleshooting”, but that was for the deprecated Hybrid Connection feature which uses Azure Biztalk.   You would see any ‘classic’ connections in the ‘Classic hybrid connections’ area on the Hybrid connections as seen in Figure 1.

Figure 1, classic hybrid connections

If you are running classic hybrid connections, migrate to the new Azure App Service Hybrid Connections which are based on Azure Service Bus Relay, read more about that here.

*Note: always be running the most current version of the HCM, see Figure 1, the most current version will be the one in the portal on the Hybrid connections page.  Click on ‘Download connection manager’ to get the package for installation on the endpoint to which you want the Azure Function or Azure App Service to connect to.

There are already some very nice articles about troubleshooting HCM issues, so I will link to them here:

HybridConnection failed to start sb://readiness-sb017.servicebus.windows.net/readiness-function-hc017 One or more errors occurred.    at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at Microsoft.HybridConnectionManager.HybridConnectionService.StartEndpoint(HybridConnectionElement hybridConnectionElement).

HybridConnectionManager Trace: System.ObjectDisposedException: Cannot access a disposed object.
Object name: ‘System.Net.Sockets.NetworkStream’.
at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
at System.Threading.Tasks.TaskFactory`1.FromAsyncTrimPromise`1.Complete(TInstance thisRef, Func`3 endMethod, IAsyncResult asyncResult, Boolean requiresSynchronization)
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.HybridConnectionManager.Util.<AsyncPipeStream>d__0.MoveNext().

HybridConnectionManager Trace: System.ObjectDisposedException: Cannot access a disposed object.
Object name: ‘System.Net.Sockets.NetworkStream’.
at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
at System.Threading.Tasks.TaskFactory`1.FromAsyncTrimPromise`1.Complete(TInstance thisRef, Func`3 endMethod, IAsyncResult asyncResult, Boolean requiresSynchronization)
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.HybridConnectionManager.Util.<AsyncPipeStream>d__0.MoveNext().

I wrote some other Hybrid Connection articles here:

To get a overview of the project I worked on, read the following articles as well.