nicht in der Lage zu Azure Ereignisse Hub von Corpnet Netzwerk verbinden

stimmen
0

Ich arbeite an Azure Event-Hub. Ich habe ein Problem, wenn sie azur Ereignis Hub anschließen, wenn ich verbunden bin Netzwerk Corpnet. Wenn ich den Code ausführen, ohne Corpnet Netzwerk beitreten funktioniert es gut. Telnet-Test gegen den Ereignis-Hub sieht gut aus, wenn ich angeschlossenes Netz Corpnet.

Jede Idee, wie dieses Problem zu lösen?

Unten ist der Code, Fehlermeldung und Stack-Trace.

Code :

            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;
            }

Fehlermeldung :

            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

Stack - Trace :

           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()
Veröffentlicht am 08/11/2018 um 00:02
quelle vom benutzer
In anderen Sprachen...                            


2 antworten

stimmen
0

Wir fanden die Lösung. Wir hatten AmqpWebSockets zu verwenden, während die Verbindungszeichenfolge der Veranstaltungs Hub aufzubauen.

        var connectionStringBuilder = new EventHubsConnectionStringBuilder(eventHubConnectionString)
        {
            EntityPath = entityName,
            TransportType = TransportType.AmqpWebSockets
        };
Beantwortet am 05/12/2018 um 17:15
quelle vom benutzer

stimmen
0

Jede Idee, wie dieses Problem zu lösen?

Sie haben einen Versuch die ConnectivityMode auf https einzustellen (Port 443)

ServiceBusEnvironment.SystemConnectivity.Mode = ConnectivityMode.Https 

Es scheint , dass Firewall - Beschränkung , die blockiert den Verkehr auf den Ports 5671 und 5672 . TCP - Port ist standardmäßig für Verkehr eingesetzt werden.

Wir könnten mehr Informationen von AMQP 1.0 in erhalten Azure Service Bus und Event - Hub Protokollführung .

Wenn möglich, könnten Sie einen Versuch haben den Port öffnen 5671 und 5672 .

Beantwortet am 08/11/2018 um 03:50
quelle vom benutzer

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