locked
Hybrid Connection behind Proxy Server RRS feed

  • Question

  • Hi,

    I need to use the new Azure Hybrid Connection Manager (0.7.2) to connect my on-premise system to Azure. I can connect to the Internet using a Proxy server.

    I have updated both HybridConnectionManagerUi.exe.config and Microsoft.HybridConnectionManager.Listener.exe.config (in the folder C:\Program Files\Microsoft\HybridConnectionManager 0.7) to added the follow setting. Is this the correct way?

     <system.net>
    	<defaultProxy>
          		<proxy usesystemdefault="true" proxyaddress="http://proxy.local:8080" bypassonlocal="true" />
            </defaultProxy>
      </system.net>
    With kind regards.


    Avanade - Resuls Realized - www.avanade.com


    • Edited by R. de Veen Thursday, June 1, 2017 6:33 PM
    • Moved by Loydon Mendonca Wednesday, June 28, 2017 2:35 AM Better suited in the Service Bus forums
    Friday, May 26, 2017 1:03 PM

All replies

  • Update from team:

    "It is not clear what you are trying to do. The VPN gateway is already behind a load balancer"

    Please advise if the above helps, or indeed if you can clarify your query in more detail.

    Thanks,

    @AzureSupport

    Thursday, June 1, 2017 3:31 PM
  • I have installed the Azure Hybrid Connection v2 on my local machine in the corporate network. To make a connection to the Internet/Azure I have to use a Proxy.  I have edit the .config files to make sure the Hybrid Connection and the Manager are using the Proxy to connect to Azure and this is working.

    Would be nice if in the Manager i could configure the proxy settings like i can in for example Internet Explorer.


    Avanade - Resuls Realized - www.avanade.com

    Thursday, June 1, 2017 6:38 PM
  • I also have problems with the connection behind a proxy. After a few minutes when the connection is alive and I can connect to the on-prem resource, I get (newest log entries at the top):

    *************************************************************************

    Level Date and Time Source Event ID Task Category
    Error 6/14/2017 2:31:20 PM Microsoft-ServiceBus-Client 40304 (25230) "HybridConnection failed to start sb://example.servicebus.windows.net/onprempsrdb 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)."

    [service restarted manually here]

    Error 6/14/2017 2:30:48 PM Microsoft-ServiceBus-Client 40304 (25230) "HybridConnection failed to start sb://example.servicebus.windows.net/onprempsrdb 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)."

    [service restarted manually here]

    Error 6/14/2017 2:28:28 PM Microsoft-ServiceBus-Client 15001 (50533) "Null reference exception occurred. Error = System.NullReferenceException: Object reference not set to an instance of an object.
       at Microsoft.HybridConnectionManager.HybridConnectionService.CheckUserMetaDataAndRestartHybridConnections()."
    Error 6/14/2017 2:28:28 PM Microsoft-ServiceBus-Client 40311 (25223) HybridConnectionManager Management Server error: One or more errors occurred..
    Information 6/14/2017 2:22:19 PM Microsoft-ServiceBus-Client 40314 (25220) "HybridConnectionManager Trace: System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
       at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)
       at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
       --- End of inner exception stack trace ---
       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.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.HybridConnectionManager.Util.<AsyncPipeStream>d__0.MoveNext()."
    Error 6/14/2017 2:18:28 PM Microsoft-ServiceBus-Client 15001 (50533) "Null reference exception occurred. Error = System.NullReferenceException: Object reference not set to an instance of an object.
       at Microsoft.HybridConnectionManager.HybridConnectionService.CheckUserMetaDataAndRestartHybridConnections()."
    Error 6/14/2017 2:18:28 PM Microsoft-ServiceBus-Client 40311 (25223) HybridConnectionManager Management Server error: One or more errors occurred..

    [... and problems start after a few minutes]

    Information 6/14/2017 2:10:38 PM Microsoft-ServiceBus-Client 40302 (25232) HybridConnection running at Endpoint sb://example.servicebus.windows.net/onprempsrdb.

    *************************************************************************

    Any ideas? Maybe security certificates / trusted authorities? It doesn't look like firewall because it works for a few minutes every time after I remove and re-add the connection from the subscription by using the UI.

    Thanks!

    Wednesday, June 14, 2017 5:25 PM
  • This will be a tough one to troubleshoot on this thread, please if you are still having issues with this can you open a Azure Relay support case so we can look at network traces.
    Wednesday, June 21, 2017 9:52 PM
  • Hi Filipovici,

    could you solve this error?

    Kind regards

    Friday, November 3, 2017 11:21 AM
  • Hy, I got it working with a proxy:

    ...
    </runtime>
    <system.net>
     <defaultProxy>
      <proxy usesystemdefault="true" proxyaddress="http://myproxy.local:81" />
     </defaultProxy>
    </system.net>
    ...

    ... have fun to test it :-) On my system the conncetion was working after restart of the Windows service.
    Monday, August 20, 2018 11:47 AM