【发布时间】:2017-02-14 03:07:01
【问题描述】:
我遇到了 Service Fabric Explorer 中的以下异常:
Unhealthy event: SourceId='System.RA', Property='ReplicaOpenStatus', HealthState='Warning', ConsiderWarningAsError=false.
Replica had multiple failures in API call: IStatelessServiceInstance.Open(); Error = System.Reflection.TargetInvocationException (-2146232828)
Exception has been thrown by the target of an invocation.
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.AspNetCore.Hosting.Internal.ConfigureBuilder.Invoke(Object instance, IApplicationBuilder builder)
at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()
at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()
at FRSecure.AssessmentDesigner.Web.WebHostBuilderHelper.GetWebHost(IWebHostBuilder webHostBuilder, String protocol, String port, String environment) in D:\a\1\s\web_assessmentdesigner\WebHostBuilderHelper.cs:line 16
at web_assessmentdesigner.WebHostingService.Microsoft.ServiceFabric.Services.Communication.Runtime.ICommunicationListener.OpenAsync(CancellationToken cancellationToken) in D:\a\1\s\web_assessmentdesigner\WebHostingService.cs:line 75
at Microsoft.ServiceFabric.Services.Runtime.StatelessServiceInstanceAdapter.d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ServiceFabric.Services.Runtime.StatelessServiceInstanceAdapter.d__0.MoveNext()
这是我所知道的:
- 应用在本地集群上安装和运行良好,但在 Azure 上却不行。
- App 由无状态 API 和有状态服务组成。有状态服务启动良好。大约 2 分钟后,无状态者进入失败状态。
我的问题是:如何或在哪里可以获得有关潜在异常的更多信息?该服务在启动之前就失败了,因此我的日志记录尚不可用。我在门户上的诊断中看不到任何内容。当无法在本地复制此类问题时,解决此类问题的最佳方法是什么?
【问题讨论】: