首页 > 解决方案 > 使用 Windows Azure 服务总线主题时的 CommunicationObjectAbortedException

问题描述

使用 Azure 服务总线时出现以下异常。我根据订阅的主题将我的 WebJob 构建为 ServiceBusTrigger 有人熟悉吗?

System.OperationCanceledException:无法执行操作,因为实体已关闭或中止。---> System.ServiceModel.CommunicationObjectAbortedException:内部服务器错误:服务器没有提供有意义的回复;这可能是由于会话过早关闭造成的。TrackingId:xxxxxxxxx,时间戳:5/3/2018 晚上 10:02:33 在 Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult 结果) 在 Microsoft.ServiceBus.Messaging.Sbmp.DuplexRequestBindingElement.DuplexRequestSessionChannel.EndRequest(IAsyncResult结果)在 Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory1.RequestSessionChannel.RequestAsyncResult.<>c.b__9_3(RequestAsyncResult thisPtr, IAsyncResult r) at Microsoft.ServiceBus.Messaging.IteratorAsyncResult1.StepCallback(IAsyncResult result) --- 堆栈跟踪从先前引发异常的位置结束 --- 在 Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result) 在 Microsoft.ServiceBus.Common.AsyncResult 1.End(IAsyncResult asyncResult) at Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory1 .RequestSessionChannel.EndRequest(IAsyncResult result) at Microsoft.ServiceBus.Messaging.Sbmp.RedirectBindingElement.RedirectContainerChannelFactory 1.RedirectContainerSessionChannel.RequestAsyncResult.<>c__DisplayClass8_1.b__4(RequestAsyncResult thisPtr, IAsyncResult r) at Microsoft.ServiceBus.Messaging.IteratorAsyncResult1.StepCallback(IAsyncResult result) --- 堆栈跟踪从上一个引发异常的位置结束---在 Microsoft.ServiceBus.Common .AsyncResult.End[TAsyncResult](IAsyncResult 结果) 在 Microsoft.ServiceBus.Common.AsyncResult 1.End(IAsyncResult asyncResult) at Microsoft.ServiceBus.Messaging.Sbmp.RedirectBindingElement.RedirectContainerChannelFactory1.RedirectContainerSessionChannel.EndRequest(IAsyncResult 结果) 在 Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory1.RequestSessionChannel.RequestAsyncResult.<>c.b__9_3(RequestAsyncResult thisPtr, IAsyncResult r) at Microsoft.ServiceBus.Messaging.IteratorAsyncResult1.StepCallback(IAsyncResult result) --- 堆栈跟踪从先前引发异常的位置结束 --- 在 Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result) 在 Microsoft.ServiceBus.Common.AsyncResult 1.End(IAsyncResult asyncResult) at Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory1 1& messages) --- End of inner exception stack trace --- at Microsoft.ServiceBus.Messaging.Sbmp.SbmpMessageReceiver.EndReceiveCommand(IAsyncResult result, IEnumerableMicrosoft.ServiceBus.Messaging.Sbmp.SbmpMessageReceiver.ReceiveAsyncResult.<>c.b__12_5(ReceiveAsyncResult thisPtr , IAsyncResult a) 在 Microsoft.ServiceBus.Messaging.IteratorAsyncResult1.StepCallback(IAsyncResult result) --- End of stack trace from previous location where exception was thrown --- at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result) at Microsoft.ServiceBus.Messaging.Sbmp.SbmpMessageReceiver.OnEndTryReceive(IAsyncResult result, IEnumerable1& 消息)在 Microsoft.ServiceBus.Messaging.IteratorAsyncResult 的 Microsoft.ServiceBus.Messaging.MessageReceiver.RetryReceiveAsyncResult.<>c.b__15_3(RetryReceiveAsyncResult thisPtr, IAsyncResult r) 1.StepCallback(IAsyncResult result) --- End of stack trace from previous location where exception was thrown --- at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result) at Microsoft.ServiceBus.Messaging.MessageReceiver.RetryReceiveAsyncResult.TryReceiveEnd(IAsyncResult r, IEnumerable1& 消息)在 Microsoft.ServiceBus.Messaging.MessageReceiver.EndTryReceive(IAsyncResult 结果, IEnumerable 1& messages) at Microsoft.ServiceBus.Messaging.MessageReceiver.EndReceive(IAsyncResult result) at Microsoft.ServiceBus.Messaging.MessageReceivePump.PumpAsyncResult.<>c.b__7_3(PumpAsyncResult thisPtr, IAsyncResult r) at Microsoft.ServiceBus.Messaging.IteratorAsyncResult1.StepCallback(IAsyncResult 结果)

标签: c#azureazure-servicebus-topics

解决方案


推荐阅读