简体   繁体   English

Azure Service Bus主题中的底层IOException

[英]Underlying IOException in Azure Service Bus Topics

We're actively using Azure Service Bus topics in our application. 我们正在应用程序中积极使用Azure Service Bus主题。 Recently we started to get strange IOExceptions for some of our topics: 最近,我们开始对某些主题感到奇怪的IOExceptions:

Microsoft.ServiceBus.Messaging.MessagingException The underlying connection was closed: An       unexpected error occurred on a send. TAsyncResult End[TAsyncResult](System.IAsyncResult) 
Server stack trace: 


Exception rethrown at [0]: 
   at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
   at Microsoft.ServiceBus.NamespaceManager.OnEndTopicExists(IAsyncResult result)
   at Microsoft.ServiceBus.NamespaceManager.TopicExists(String path)
   at XXX.Core.Logic.Services.Bus.Impl.ServiceBusServiceBase.EnsureTopicExists(String topic)
   at XXX.Core.Logic.Services.Bus.Impl.ServiceBusSenderServiceImpl.SendBrokeredMessage(Object state)
________________________________________
System.Net.WebException The underlying connection was closed: An unexpected error occurred on a send. System.Net.WebResponse EndGetResponse(System.IAsyncResult)    at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at Microsoft.ServiceBus.Messaging.ServiceBusResourceOperations.GetAsyncResult`1.b__2d(GetAsyncResult`1 thisPtr, IAsyncResult r)
   at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result)
________________________________________
System.IO.IOException Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. Void EndWrite(System.IAsyncResult)    at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult)
   at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar)
________________________________________
System.Net.Sockets.SocketException An existing connection was forcibly closed by the remote host Int32 EndRead(System.IAsyncResult)    at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)

For some topics this issue comes from time to time, but for some topics it is permanent. 对于某些主题,此问题有时会出现,但对于某些主题,它是永久性的。 Same code is used for all topics all over application. 整个应用程序中的所有主题均使用相同的代码。 We've tried different ways to workaround this - topic renaming, different code changes, but with no luck. 我们尝试了不同的方法来解决此问题-主题重命名,不同的代码更改,但是没有运气。

What could cause such kind of issues? 是什么原因引起此类问题? Does anybody ever had such kind of stuff? 有人曾经有过这样的东西吗?

Fortunately, we found an issue related to that in our project. 幸运的是,我们在项目中发现了一个与此相关的问题。 The problem was in explicit SSLv3 that we applied in our code. 问题出在我们在代码中应用的显式SSLv3中。 After Azure deactivated SSLv3 on Service Bus service our code broken. 在Azure停用Service Bus服务上的SSLv3之后,我们的代码将损坏。

Good lesson here: never use explicit protocols project wide. 这里有个很好的教训:不要在整个项目中使用显式协议。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM