Stu*_*ght 5 azure-service-fabric
我在Linux上有一个三节点的Service Fabric集群,该集群运行Docker容器。当容器运行时,我可以通过Service Fabric资源管理器访问日志。但是,如果容器失败,则无法通过这种方式查看日志。
该文档(https://docs.microsoft.com/zh-cn/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">
Run Code Online (Sandbox Code Playgroud)
这是sfctl命令:
sfctl service get-container-logs --node-name _cl10prime_0 --application-id myapp --service-manifest-name myapp-appPkg --code-package-name code --previous
Run Code Online (Sandbox Code Playgroud)
这是sfctl的输出:
{
"additionalProperties": {},
"content": ""
}
Run Code Online (Sandbox Code Playgroud)
群集正在运行Service Fabric版本6.31.14.1。
如何查看发生故障的容器中的日志?
| 归档时间: |
|
| 查看次数: |
203 次 |
| 最近记录: |