Filebeat 部署为 Daemonset - 退出:无法获取锁定文件:无法启动,数据目录属于带 pid 的进程

问题描述 投票:0回答:1

我正在通过 helm 将 filebeat 部署为 Kubernetes 中的 Daemonset。但 Pod 没有出现,容器崩溃了

k logs filebeat-filebeat-hd525 -n filebeat
{"log.level":"info","@timestamp":"2024-07-03T14:27:00.099Z","log.origin":{"file.name":"instance/beat.go","file.line":708},"message":"Home path: [/usr/share/filebeat] Config path: [/usr/share/filebeat] Data path: [/usr/share/filebeat/data] Logs path: [/usr/share/filebeat/logs]","service.name":"filebeat","ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2024-07-03T14:27:00.100Z","log.origin":{"file.name":"instance/beat.go","file.line":716},"message":"Beat ID: 6dded609-01d1-4348-9b4b-fcffe799377c","service.name":"filebeat","ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2024-07-03T14:27:00.100Z","log.origin":{"file.name":"instance/beat.go","file.line":392},"message":"filebeat stopped.","service.name":"filebeat","ecs.version":"1.6.0"}
{"log.level":"error","@timestamp":"2024-07-03T14:27:00.100Z","log.origin":{"file.name":"instance/beat.go","file.line":1057},"message":"Exiting: cannot obtain lockfile: connot start, data directory belongs to process with pid 8","service.name":"filebeat","ecs.version":"1.6.0"}
Exiting: cannot obtain lockfile: connot start, data directory belongs to process with pid 8

我无法登录 Pod 查看 filebeat 进程正在运行或删除锁定文件。不知道如何解决该问题。

关于如何解决这个问题有什么建议吗?

谢谢。

kubernetes filebeat daemonset
1个回答
0
投票

转到节点机器上的 /var/lib/${daemon_set_name}-logs-data 并删除 filebeat.lock

© www.soinside.com 2019 - 2024. All rights reserved.