2017-04-20 51 views
0

我們有發生故障的現場(Windows)服務總線實例。服務總線在發佈消息時拋出System.ServiceModel.FaultException:50002

發佈消息時,我們得到一個「System.ServiceModel.FaultException: 50002」異常。我們不相信這是代碼相關的,因爲它開始發生在一直在工作的代碼分支上。此問題結束時提供了異常的完整堆棧跟蹤。

我在這個盒子上運行了下面的PowerShell命令,它們都顯示出服務總線運行正常。

get-sbFarmStatus 
get-sbFarm 
get-SBMessageContainer 
get-sbclientconfiguration 

服務總線資源管理器管理訪問的隊列和主題,但無法讀取任何消息

它,如下所示的輸出。

<17:59:37> The application is now connected to the sb://foo.com:9355/ServiceBusDefaultNamespace service bus namespace. 
<17:59:37> MessagingFactory successfully created 
<17:59:37> The queue batchrulesqueue has been succesfully retrieved. 
<17:59:37> The queue emailqueue has been succesfully retrieved. 
<17:59:37> The queue recordsubmittedqueue has been succesfully retrieved. 
<17:59:37> The topic iceeventstopic has been succesfully retrieved. 
<18:00:12> Exception: The remote server returned an error: (500) Internal Server Error. The server was unable to process the request; please retry the operation. If the problem persists, please contact your Service Bus administrator and provide the tracking id..TrackingId:d3433f00-708d-4494-b3de-aecadeb42eeb_GTPR-MC01,TimeStamp:19/04/2017 17:00:12. Method <GetSubscriptions>b__63: retry 1 of 10... 
<18:05:24> Exception: The remote server returned an error: (500) Internal Server Error. The server was unable to process the request; please retry the operation. If the problem persists, please contact your Service Bus administrator and provide the tracking id..TrackingId:c64a9847-67f9-4c44-b241-7d43526bbe6c_GTPR-MC01,TimeStamp:19/04/2017 17:05:24. Method <GetSubscriptions>b__63: retry 10 of 10. 
<18:06:01> Exception: The remote server returned an error: (500) Internal Server Error. The server was unable to process the request; please retry the operation. If the problem persists, please contact your Service Bus administrator and provide the tracking id..TrackingId:f1cb6f00-6753-4bde-80d4-a1e22b4fa904_GTPR-MC01,TimeStamp:19/04/2017 17:06:00 
<18:06:01> InnerException: The remote server returned an error: (500) Internal Server Error. 

當試圖創建隊列

<15:09:12> Exception: The remote server returned an error: (500) Internal Server Error. SubCode=50000. Internal Server Error.TrackingId:1d6b0877-7533-4ca9-a670-5bbbed247cc5_GTPR-MC01,TimeStamp:20/04/2017 14:09:12. Method <CreateQueue>b__7c: retry 1 of 10... 
<15:09:14> Exception: The remote server returned an error: (409) Conflict. SubCode=40901. Another conflicting operation is in progress..TrackingId:5137721b-0da9-4b33-860b-b0fb1822d802_GTPR-MC01,TimeStamp:20/04/2017 14:09:14. Method <CreateQueue>b__7c: retry 10 of 10. 
<15:09:14> Exception: The remote server returned an error: (409) Conflict. SubCode=40901. Another conflicting operation is in progress..TrackingId:f64591d2-efde-42fb-9cd9-89bb6168e9a0_GTPR-MC01,TimeStamp:20/04/2017 14:09:14 
<15:09:14> InnerException: The remote server returned an error: (409) Conflict. 

當試圖創建一個話題

<15:09:14> InnerException: The remote server returned an error: (409) Conflict. 
<15:10:47> Exception: The remote server returned an error: (500) Internal Server Error. SubCode=50000. Internal Server Error.TrackingId:9ade05de-9eb5-40bb-b33f-7bf4954bde9a_GTPR-MC01,TimeStamp:20/04/2017 14:10:47. Method <CreateTopic>b__90: retry 1 of 10. 
<15:10:49> Exception: The remote server returned an error: (409) Conflict. SubCode=40901. Another conflicting operation is in progress..TrackingId:dc98a3b4-8515-4dbf-b941-112613450641_GTPR-MC01,TimeStamp:20/04/2017 14:10:49. Method <CreateTopic>b__90: retry 10 of 10. 
<15:10:49> InnerException: The remote server returned an error: (409) Conflict. 

這是來自客戶端的完整的堆棧跟蹤。

System.AggregateException: One or more errors occurred. ---> Microsoft.ServiceBus.Messaging.MessagingException: 50002: Provider Internal Error.TrackingId:cfda6472-d5d2-4e6b-ad0a-00a745dd0be6_GTPR-MC01_GTPR-MC01,TimeStamp:19/04/2017 09:32:07 ---> System.ServiceModel.FaultException: 50002: Provider Internal Error.TrackingId:cfda6472-d5d2-4e6b-ad0a-00a745dd0be6_GTPR-MC01_GTPR-MC01,TimeStamp:19/04/2017 09:32:07 

Server stack trace: 
    at Microsoft.ServiceBus.Messaging.Sbmp.DuplexRequestBindingElement.DuplexRequestSessionChannel.ThrowIfFaultMessage(Message wcfMessage) 
    at Microsoft.ServiceBus.Messaging.Sbmp.DuplexRequestBindingElement.DuplexRequestSessionChannel.HandleMessageReceived(IAsyncResult result) 

Exception rethrown at [0]: 
    at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result) 
    at Microsoft.ServiceBus.Messaging.Sbmp.DuplexRequestBindingElement.DuplexRequestSessionChannel.EndRequest(IAsyncResult result) 
    at Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory`1.RequestSessionChannel.RequestAsyncResult.<GetAsyncSteps>b__4(RequestAsyncResult thisPtr, IAsyncResult r) 
    at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result) 

Exception rethrown at [1]: 
    at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result) 
    at Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory`1.RequestSessionChannel.EndRequest(IAsyncResult result) 
    at Microsoft.ServiceBus.Messaging.Sbmp.RedirectBindingElement.RedirectContainerChannelFactory`1.RedirectContainerSessionChannel.RequestAsyncResult.<>c__DisplayClass17.<GetAsyncSteps>b__a(RequestAsyncResult thisPtr, IAsyncResult r) 
    at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result) 

Exception rethrown at [2]: 
    at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result) 
    at Microsoft.ServiceBus.Messaging.Sbmp.RedirectBindingElement.RedirectContainerChannelFactory`1.RedirectContainerSessionChannel.EndRequest(IAsyncResult result) 
    at Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory`1.RequestSessionChannel.RequestAsyncResult.<GetAsyncSteps>b__4(RequestAsyncResult thisPtr, IAsyncResult r) 
    at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result) 

Exception rethrown at [3]: 
    at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result) 
    at Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory`1.RequestSessionChannel.EndRequest(IAsyncResult result) 
    at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result) 

Exception rethrown at [4]: 
    at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result) 
    at Microsoft.ServiceBus.Messaging.Sbmp.SbmpMessageSender.OnEndClose(IAsyncResult result) 
    --- End of inner exception stack trace --- 
    at Microsoft.ServiceBus.Messaging.Sbmp.SbmpMessageSender.OnEndClose(IAsyncResult result) 
    at Microsoft.ServiceBus.Messaging.MessageClientEntity.OnClose(TimeSpan timeout) 
    at Microsoft.ServiceBus.Messaging.MessageClientEntity.Close(TimeSpan timeout) 
    at Microsoft.ServiceBus.Messaging.Channels.ServiceBusOutputChannel.OnClose(TimeSpan timeout) 
    at System.ServiceModel.Channels.CommunicationObject.Close(TimeSpan timeout) 
    at System.ServiceModel.Channels.ServiceChannel.OnClose(TimeSpan timeout) 
    at System.ServiceModel.Channels.CommunicationObject.Close(TimeSpan timeout) 
    at System.ServiceModel.Channels.ServiceChannelFactory.OnClose(TimeSpan timeout) 
    at System.ServiceModel.Channels.ServiceChannelFactory.TypedServiceChannelFactory`1.OnClose(TimeSpan timeout) 
    at System.ServiceModel.Channels.CommunicationObject.Close(TimeSpan timeout) 
    at System.ServiceModel.ChannelFactory.OnClose(TimeSpan timeout) 
    at System.ServiceModel.Channels.CommunicationObject.Close(TimeSpan timeout) 
    at Messaging.Infrastructure.Tcp.ChannelFactoryComponents.ChannelFactoryAdapter`1.Dispose(Boolean disposing) 
    at Messaging.Infrastructure.Tcp.ChannelFactoryComponents.ChannelFactoryAdapter`1.Dispose() 
    at Messaging.Infrastructure.Tcp.Publishers.TprMessagePublisher`1.Publish(IEnumerable`1 messages, QueueType queueType) 
    at System.Threading.Tasks.Task.Execute() 
    --- End of inner exception stack trace --- 
    at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) 
    at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) 
    at MCNotifications.Application.Services.TaskService.Wait(Task task) in e:\Builds\19\Scrum\MCNotifications-R28\Sources\Assemblies\MCNotifications.Application\Services\TaskService.cs:line 16 
    at MCNotifications.Application.Services.EmailMessagePublisher.PublishEmailMessage(EmailMessageDto emailMessage) in e:\Builds\19\Scrum\MCNotifications-R28\Sources\Assemblies\MCNotifications.Application\Services\EmailMessagePublisher.cs:line 31 
    at MCNotifications.Application.Commands.EmailMessageCommand.ProcessMessage(BrokeredMessageContainer messageContainer) in e:\Builds\19\Scrum\MCNotifications-R28\Sources\Assemblies\MCNotifications.Application\Commands\EmailMessageCommand.cs:line 42 
    at MCNotifications.Application.Decorators.CompleteMessageDecorator.ProcessMessage(BrokeredMessageContainer messageContainer) in e:\Builds\19\Scrum\MCNotifications-R28\Sources\Assemblies\MCNotifications.Application\Decorators\CompleteMessageDecorator.cs:line 30 
---> (Inner Exception #0) Microsoft.ServiceBus.Messaging.MessagingException: 50002: Provider Internal Error.TrackingId:cfda6472-d5d2-4e6b-ad0a-00a745dd0be6_GTPR-MC01_GTPR-MC01,TimeStamp:19/04/2017 09:32:07 ---> System.ServiceModel.FaultException: 50002: Provider Internal Error.TrackingId:cfda6472-d5d2-4e6b-ad0a-00a745dd0be6_GTPR-MC01_GTPR-MC01,TimeStamp:19/04/2017 09:32:07 

有來自ServiceBus獲得更詳細的信息,找出哪些問題是,江郎才盡,並一直停留在這個問題上了一段時間的一種方式。

問候

史蒂夫

回答

1

正像人們常常我固定我的問題張貼本(有花幾天拉我的頭髮)後不久的情況。

正如此鏈接所述,爲了從ServiceBus獲取所有錯誤消息,您需要在事件查看器中啓用「顯示分析和調試日誌」。

https://msdn.microsoft.com/en-us/library/jj193001.aspx

尋找在微軟ServiceBus文件夾的操作部分拿給我的例外是由數據庫感十足的事務日誌引起的。當數據庫從實時備份重新創建時,清除日誌的過程不會隨之遷移。

Finding the exception