Azure Service Fabric激活错误 [英] Azure Service Fabric activation error

查看:67
本文介绍了Azure Service Fabric激活错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的一个应用程序部署到Service Fabric Cluster失败,并触发了不健康评估,并显示以下错误事件:There was an error during CodePackage activation.The service host terminated with exit code:3762504530

The deployment of one of my apps to a Service Fabric Cluster failed and triggered an Unhealthy Evaluation with an error event saying: There was an error during CodePackage activation.The service host terminated with exit code:3762504530

但是,在部署应用程序的节点上,健康状况"指示:The application was activated successfully.

However, on the node where the app is deployed, Health State indicates: The application was activated successfully.

有什么方法可以获取有关错误事件的更详细的报告吗?

Is there any way to get a more detailed report on the error event?

推荐答案

我通常通过RDP连接到受影响的节点,并在这种情况下执行以下操作:

I usually connect via RDP to the affected node and do the following things in such a case:

  • 检查控制台输出/控制台错误日志:Service Fabric将控制台输出(如果通过ServiceManifest.xml中的<ConsoleRedirection>启用)存储错误,并将错误存储在日志文件夹中.在您的DEV群集上,此名称应为C:\SfDevCluster\Data\_App\Node.x\<ApplicationTypeFolder>\log.在Azure中的默认安装上,它应为D:\SvcFab\_App\<ApplicationTypeFolder>\log

  • Check Console-Out / Console-Error logs: Service Fabric stores console output (if enabled via <ConsoleRedirection> in your ServiceManifest.xml) and errors in a log folder. On your DEV cluster, this should be C:\SfDevCluster\Data\_App\Node.x\<ApplicationTypeFolder>\log. On a default installation in Azure, it should be D:\SvcFab\_App\<ApplicationTypeFolder>\log

EventLog :. NET异常有时会显示在应用程序"日志中,但是Service Fabric也有其自己的子文件夹,其中可能包含有用的事件.

EventLog: .NET exceptions sometimes show up in the "Application" log, but Service Fabric also has its own subfolder which might contain helpful events.

PerfView :PerfView是一个非常强大的工具,可以监视ETW事件(适用于Windows的事件跟踪).由于.NET异常是作为ETW事件记录的,因此PerfView可能会向您显示有用的异常.这是一个快速教程:

PerfView: PerfView is a very powerful tool to monitor ETW events (Event Tracing for Windows). Since .NET exceptions are logged as ETW events, PerfView might show you helpful exceptions. Here's a quick tutorial:

  • 下载并运行 PerfView
  • 转到收集->收集".取消选择合并".
  • 单击开始收集".
  • 如果正在运行,请立即通过Process Explorer终止Service Fabric服务.片刻之后,Service Fabric将再次启动它.
  • 如果您的服务未运行,请重新部署您的服务.
  • 服务失败后,在PerfView中按停止收集".
  • 现在双击左侧树中的事件"-这将打开所有记录的ETW事件.
  • 搜索"Microsoft-Windows-DotNETRuntime/Exception/Start",然后双击它.
  • 您现在应该按时间顺序查看发生的所有.NET异常.
  • Download and run PerfView
  • Go to "Collect -> Collect". De-Select "Merge".
  • Click "Start Collection".
  • Now kill your Service Fabric Service through Process Explorer, in case it is running. Moments later, Service Fabric will start it again.
  • If your service is not running, re-deploy your service.
  • After the service failed, press "Stop collection" in PerfView.
  • Now double-click on "Events" in the left tree - this will open all recorded ETW events.
  • Search for "Microsoft-Windows-DotNETRuntime/Exception/Start" and double click on it.
  • You should now see all .NET exceptions that occurred, ordered by time.

这篇关于Azure Service Fabric激活错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆