Nelze se připojit k azurové náboji události z corpnet sítě

hlasů
0

Pracuji na Azure Hub událostí. Mám problém při připojování k azurové náboji událostí, když jsem připojen k corpnet sítě. Mám-li spustit kód bez spojování corpnet síť funguje to v pohodě. Test telnet proti náboji událostí vypadá dobře, když jsem připojen k corpnet sítě.

Nějaký nápad, jak vyřešit tento problém?

Níže je uveden kód, chybové hlášení a trasování zásobníku.

kód :

            public async Task SendDataAsync(CoffeeMachineData data)
            {
                EventData eventData = CreateEventData(data);
                await _eventHubClient.SendAsync(eventData);
            }



            private static EventData CreateEventData(CoffeeMachineData data)
            {
                var dataAsJson = JsonConvert.SerializeObject(data);
                var eventData = new EventData(Encoding.UTF8.GetBytes(dataAsJson));
                return eventData;
            }

Chybová zpráva :

            A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

Trasování zásobníku :

           at System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult)
           at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result)
           at System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult)
           at Microsoft.Azure.Amqp.Transport.TlsTransport.HandleOpenComplete(IAsyncResult result, Boolean syncComplete)
        --- End of stack trace from previous location where exception was thrown ---
           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
           at Microsoft.Azure.Amqp.ExceptionDispatcher.Throw(Exception exception)
           at Microsoft.Azure.Amqp.AsyncResult.End[TAsyncResult](IAsyncResult result)
           at Microsoft.Azure.Amqp.AmqpObject.OpenAsyncResult.End(IAsyncResult result)
           at Microsoft.Azure.Amqp.AmqpObject.EndOpen(IAsyncResult result)
           at Microsoft.Azure.Amqp.Transport.TlsTransportInitiator.HandleTransportOpened(IAsyncResult result)
           at Microsoft.Azure.Amqp.Transport.TlsTransportInitiator.OnTransportOpened(IAsyncResult result)
        --- 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.Azure.EventHubs.Amqp.AmqpEventHubClient.<CreateConnectionAsync>d__31.MoveNext()
        --- 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 System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
           at Microsoft.Azure.Amqp.FaultTolerantAmqpObject`1.<OnCreateAsync>d__5.MoveNext()
        --- 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 System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
           at Microsoft.Azure.Amqp.Singleton`1.<CreateValue>d__20.MoveNext()
        --- 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 System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
           at Microsoft.Azure.Amqp.Singleton`1.<GetOrCreateAsync>d__13.MoveNext()
        --- 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 System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
           at Microsoft.Azure.EventHubs.Amqp.AmqpEventDataSender.<CreateLinkAsync>d__12.MoveNext()
        --- 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 System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
           at Microsoft.Azure.Amqp.FaultTolerantAmqpObject`1.<OnCreateAsync>d__5.MoveNext()
        --- 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 System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
           at Microsoft.Azure.Amqp.Singleton`1.<CreateValue>d__20.MoveNext()
        --- 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 System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
           at Microsoft.Azure.Amqp.Singleton`1.<GetOrCreateAsync>d__13.MoveNext()
        --- 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.Azure.EventHubs.Amqp.AmqpEventDataSender.<OnSendAsync>d__10.MoveNext()
        --- End of stack trace from previous location where exception was thrown ---
           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
           at Microsoft.Azure.EventHubs.Amqp.AmqpEventDataSender.<OnSendAsync>d__10.MoveNext()
        --- 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.Azure.EventHubs.EventHubClient.<SendAsync>d__19.MoveNext()
        --- 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 System.Runtime.CompilerServices.TaskAwaiter.GetResult()
Položena 08/11/2018 v 00:02
zdroj uživatelem
V jiných jazycích...                            


2 odpovědí

hlasů
0

Našli jsme řešení pro toto. Museli jsme použít AmqpWebSockets při vytváření připojovací řetězec náboje událostí.

        var connectionStringBuilder = new EventHubsConnectionStringBuilder(eventHubConnectionString)
        {
            EntityPath = entityName,
            TransportType = TransportType.AmqpWebSockets
        };
Odpovězeno 05/12/2018 v 17:15
zdroj uživatelem

hlasů
0

Nějaký nápad, jak vyřešit tento problém?

Prosím, zkuste nastavit ConnectivityMode HTTPS (443 port)

ServiceBusEnvironment.SystemConnectivity.Mode = ConnectivityMode.Https 

Zdá se, že omezení firewallem, který blokuje veškerý provoz na portech 5671 a 5672 . TCP port je ve výchozím nastavení použit pro dopravu.

Mohli bychom získat více informací od AMQP 1,0 v Azure Service Bus a huby Event vedení protokolu .

Pokud je to možné, můžete mít vyzkoušet otevření portu 5671 a 5672 .

Odpovězeno 08/11/2018 v 03:50
zdroj uživatelem

Cookies help us deliver our services. By using our services, you agree to our use of cookies. Learn more