我们有现场(Windows)服务总线实例,它已经发生了故障。
发布消息时,我们会收到“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获取更详细的信息,以找出问题所在,用完了想法,并且已经坚持了一段时间。
此致
史蒂夫
答案 0 :(得分:1)
正如经常发生这种情况一样,我在发布此事后不久就解决了我的问题(花了几天时间把头发拉出来)。
如此链接所述,为了从ServiceBus获取所有错误消息,您需要在事件查看器中启用“显示分析和调试日志”。
https://msdn.microsoft.com/en-us/library/jj193001.aspx
查看Microsoft-ServiceBus文件夹的“操作”部分,显示异常是由数据库的事务日志已满引起的。从实时备份重新创建数据库后,清除日志的过程不会随之迁移。