Azure Service Bus主题中的基础IOException

时间:2014-11-18 16:41:03

标签: .net azure servicebus

我们在应用程序中积极使用Azure Service Bus主题。最近我们开始为我们的一些主题获得奇怪的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)

对于某些主题,此问题不时出现,但对于某些主题,它是永久性的。相同的代码用于所有应用程序的所有主题。我们已经尝试了不同的方法来解决这个问题 - 主题重命名,不同的代码更改,但没有运气。

什么可能导致此类问题?有没有人有这样的东西?

1 个答案:

答案 0 :(得分:0)

幸运的是,我们在项目中发现了与此相关的问题。问题出在我们在代码中应用的显式SSLv3中。 Azure在Service Bus服务上停用SSLv3后,我们的代码被破坏了。

这里的好教训:永远不要在项目范围内使用显式协议。