在Linux上的Service Fabric中,如何查看已损坏或崩溃的容器中的日志?

时间:2018-09-19 21:04:55

标签: azure-service-fabric

我在Linux上有一个三节点的Service Fabric集群,该集群运行Docker容器。当容器运行时,我可以通过Service Fabric资源管理器访问日志。但是,如果容器失败,则无法通过这种方式查看日志。

文档(https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-containers-view-logs#access-the-logs-of-a-dead-or-crashed-container)指出,可以使用sfctl从失败的容器中检索日志。当我尝试此操作时,它不会返回任何有用的信息。

据我所知,我的ApplicationManifest.xml是根据上面链接中的说明配置的。这是相关部分的摘录:

<ContainerHostPolicies CodePackageRef="code" Isolation="process" ContainersRetentionCount="2" RunInteractive="true">

这是sfctl命令:

sfctl service get-container-logs --node-name _cl10prime_0 --application-id myapp --service-manifest-name myapp-appPkg --code-package-name code --previous

这是sfctl的输出:

{
  "additionalProperties": {},
  "content": ""
}

群集正在运行Service Fabric版本6.3.124.1。

如何查看发生故障的容器中的日志?

0 个答案:

没有答案