如何解决由于远程方已关闭传输流
我正在尝试从服务总线主题中读取消息,但总是运气不佳。我的微服务在 kubernets 的 docker 容器中运行。我已经打开了端口 443 和 5671,但仍然没有运气。以下是我收到的 SB 连接字符串格式和异常。有人可以帮忙吗?
连接字符串格式: Endpoint=xxxxxxxxxxxxxxxxxxxxxxxx;SharedAccessKeyName=listen;SharedAccessKey=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
消息处理程序遇到异常 Microsoft.Azure.ServiceBus.ServiceBusCommunicationException:身份验证失败,因为远程方已关闭传输流。
---> System.IO.IOException:身份验证失败,因为远程方已关闭传输流。
在 System.Net.Security.SslStream.StartReadFrame(Byte[] buffer,Int32 readBytes,AsyncProtocolRequest asyncRequest)
在 System.Net.Security.SslStream.PartialFrameCallback(AsyncProtocolRequest asyncRequest)
--- 从上一个抛出异常的位置开始的堆栈跟踪结束 ---
在 System.Net.Security.SslStream.EndProcessAuthentication(IAsyncResult 结果)
在 System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult)
在 System.Net.Security.SslStream.c.b__64_2(IAsyncResult iar)
在 System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar,Func
2 endFunction,Action1 endAction,Task
1 promise,Boolean requiresSynchronization)
--- 从上一个抛出异常的位置开始的堆栈跟踪结束 ---
在 Microsoft.Azure.Amqp.TaskHelpers.EndAsyncResult(IAsyncResult asyncResult)
在 Microsoft.Azure.Amqp.StreamExtensions.EndAuthenticateAsClient(SslStream sslStream,IAsyncResult asyncResult)
在 Microsoft.Azure.Amqp.Transport.TlsTransport.HandleOpenComplete(IAsyncResult 结果,Boolean syncComplete)
--- 从上一个抛出异常的位置开始的堆栈跟踪结束 ---
在 Microsoft.Azure.Amqp.AsyncResult.End[TAsyncResult](IAsyncResult 结果)
在 Microsoft.Azure.Amqp.AmqpObject.OpenAsyncResult.End(IAsyncResult 结果)
在 Microsoft.Azure.Amqp.AmqpObject.EndOpen(IAsyncResult 结果)
在 Microsoft.Azure.Amqp.Transport.TlsTransportInitiator.HandleTransportOpened(IAsyncResult 结果)
在 Microsoft.Azure.Amqp.Transport.TlsTransportInitiator.OnTransportOpened(IAsyncResult 结果)
--- 从上一个抛出异常的位置开始的堆栈跟踪结束 ---
在 Microsoft.Azure.ServiceBus.ServiceBusConnection.CreateConnectionAsync(TimeSpan timeout)
在 Microsoft.Azure.Amqp.FaultTolerantAmqpObject1.OnCreateAsync(TimeSpan timeout) at Microsoft.Azure.Amqp.Singleton
1.GetOrCreateAsync(TimeSpan timeout)
在 Microsoft.Azure.Amqp.Singleton1.GetOrCreateAsync(TimeSpan timeout) at Microsoft.Azure.ServiceBus.Amqp.AmqpLinkCreator.CreateAndOpenAmqpLinkAsync() at Microsoft.Azure.ServiceBus.Core.MessageReceiver.CreateLinkAsync(TimeSpan timeout) at Microsoft.Azure.Amqp.FaultTolerantAmqpObject
1.OnCreateAsync(TimeSpan timeout)
在 Microsoft.Azure.Amqp.Singleton1.GetOrCreateAsync(TimeSpan timeout) at Microsoft.Azure.Amqp.Singleton
1.GetOrCreateAsync(TimeSpan timeout)
在 Microsoft.Azure.ServiceBus.Core.MessageReceiver.OnReceiveAsync(Int32 maxMessageCount,TimeSpan serverWaitTime)
--- 内部异常堆栈跟踪结束 ---
在 Microsoft.Azure.ServiceBus.Core.MessageReceiver.OnReceiveAsync(Int32 maxMessageCount,TimeSpan serverWaitTime)
在 Microsoft.Azure.ServiceBus.Core.MessageReceiver.c__DisplayClass64_0.1 operation,TimeSpan operationTimeout) at Microsoft.Azure.ServiceBus.RetryPolicy.RunOperation(Func
1 operation,TimeSpan operationTimeout)
在 Microsoft.Azure.ServiceBus.Core.MessageReceiver.ReceiveAsync(Int32 maxMessageCount,TimeSpan operationTimeout)
在 Microsoft.Azure.ServiceBus.Core.MessageReceiver.ReceiveAsync(TimeSpan operationTimeout)
在 Microsoft.Azure.ServiceBus.MessageReceivePump.MessagePumpTaskAsync()。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。