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
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?
I usually connect via RDP to the affected node and do the following things in such a case:
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 exceptions sometimes show up in the "Application" log, but Service Fabric also has its own subfolder which might contain helpful events.
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: