1

I am trying to get a sample Service Fabric Mesh application deployed to Azure. The deployment shows as being successful, but I am unable to access the application once it is deployed. The only evidence I can find that there is an issue is the "UnhealthyEvaluation" property returned when querying the app via PowerShell CLI.

Here is what that shows.

PS C:\WINDOWS\system32> az mesh app show --resource-group Proto --name todolistapp-CsProto
{
  "debugParams": null,
  "description": "todolistapp description.",
  "diagnostics": null,
  "healthState": "Warning",
  "id": "/subscriptions/2224ba65-ee14-4fa5-b62c-f586d05b6bb5/resourcegroups/Proto/providers/Microsoft.ServiceFabricMesh/applications/todolistapp-CsProto",
  "location": "eastus",
  "name": "todolistapp-CsProto",
  "provisioningState": "Succeeded",
  "resourceGroup": "Proto",
  "serviceNames": [
    "WebFrontEnd",
    "Service1"
  ],
  "services": null,
  "status": "Ready",
  "statusDetails": null,
  "tags": {},
  "type": "Microsoft.ServiceFabricMesh/applications",
  "unhealthyEvaluation": "Unhealthy deployed applications: 100% (1/1), MaxPercentUnhealthyDeployedApplications=0%.\r\n  Unhealthy deployed application:     ApplicationName='fabric:/todolistapp-CsProto', NodeName='_Dev_1', AggregatedHealthState='Warning'.\r\n    Unhealthy deployed service packages: 50% (
1/2).\r\n      Unhealthy deployed service package: ApplicationName='fabric:/todolistapp-CsProto', ServiceManifestName='Service1Pkg',     ServicePackageActivationId='5a5b1584-ea7d-46bf-9ce2-ad56b2c843ff', NodeName='_Dev_1', AggregatedHealthState='Warning'.\r\n        Unhealthy event: SourceId='System.Hos
ting', Property='CodePackageActivation:Service1:EntryPoint', HealthState='Warning', ConsiderWarningAsError=false. 'There was an error during CodePackage     activation.System.Fabric.FabricException (-2147017731)\r\nFailed to start Container. ContainerName=sf-155-f0b08730-815a-421c-a312-0334c3f9b11c_5a5b
1584-ea7d-46bf-9ce2-ad56b2c843ff, ApplicationId=SingleInstance_148_App155, ApplicationName=fabric:/todolistapp-CsProto. DockerRequest returned StatusCode=InternalServerError with     ResponseBody={\"message\":\"failed to create endpoint sf-155-f0b08730-815a-421c-a312-0334c3f9b11c_5a5b1584-ea7d-46bf-9ce2
-ad56b2c843ff on network nat: HNS failed with error : You were not connected beca'\r\n"
}

I'm happy to provide any additional information that might be helpful in figuring this out. Part of the problem is that the Azure Portal UI for the Service Fabric Mesh application and services does not show any logging. I believe that is because the logs have not yet been implemented there. Additionally, querying the container logs via PowerShell CLI isn't returning anything either.

PowerShell Container Log

PS C:\WINDOWS\system32> az mesh code-package-log get --resource-group Proto --app-name todolistapp-CsProto --service-name WebFrontEnd --replica-name 0 --code-package-name WebFrontEnd
{'additional_properties': {}, 'content': ''}

and

PS C:\WINDOWS\system32> az mesh code-package-log get --resource-group Proto --app-name todolistapp-CsProto --service-name Service1 --replica-name 0 --code-package-name Service1
{'additional_properties': {}, 'content': ''}

Any insight on this would be greatly appreciated!

  • Needless to say this is a preview tech... I've noticed that if your container exits immediately i.e. standard consolve application that prints "hello world" and exits, Azure thinks it's unhealthy. Changing it to infinite loop like printing every second makes it healthy. Apparently it's a bug. – Ivan G. Nov 05 '18 at 23:07

0 Answers0