我正在尝试将示例Service Fabric Mesh应用程序部署到Azure。部署显示为成功,但是一旦部署,我将无法访问该应用程序。我可以发现存在问题的唯一证据是通过PowerShell CLI查询应用程序时返回了“ UnhealthyEvaluation”属性。
这是显示的内容。
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"
}
我很高兴提供任何其他信息,可能有助于弄清这一点。问题的部分原因是Service Fabric Mesh应用程序和服务的Azure Portal UI不显示任何日志记录。我认为这是因为尚未在此处实施日志。此外,通过PowerShell CLI查询容器日志也不会返回任何内容。
PowerShell容器日志
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': ''}
和
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': ''}
对此有任何见识将不胜感激!