1

我正在尝试将示例 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 门户 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': ''}

对此的任何见解将不胜感激!

4

0 回答 0