本文介绍了Filebeat:数据路径已被另一个拍子锁定.请确保多个节拍没有共享相同的数据路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

查看其中一个filebeat窗格中的日志,我可以看到:

Looking at the logs in one of the filebeat pods i can see this:

2021-01-04T10:10:52.754Z        DEBUG   [add_cloud_metadata]    add_cloud_metadata/providers.go:129     add_cloud_metadata: fetchMetadata ran for 2.351101ms
2021-01-04T10:10:52.754Z        INFO    [add_cloud_metadata]    add_cloud_metadata/add_cloud_metadata.go:93     add_cloud_metadata: hosting provider type detected as openstack, metadata={"ava
ilability_zone":"us-east-1c","instance":{"id":"i-08f536567bd9945df","name":"ip-10-101-2-178.ec2.internal"},"machine":{"type":"m5.2xlarge"},"provider":"openstack"}
2021-01-04T10:10:52.755Z        DEBUG   [processors]    processors/processor.go:120     Generated new processors: add_cloud_metadata={"availability_zone":"us-east-1c","instance":{"id":"i-08f5
36567bd9945df","name":"ip-10-101-2-178.ec2.internal"},"machine":{"type":"m5.2xlarge"},"provider":"openstack"}, add_docker_metadata=[match_fields=[] match_pids=[process.pid, process.ppid]]
2021-01-04T10:10:52.755Z        INFO    instance/beat.go:392    filebeat stopped.
2021-01-04T10:10:52.755Z        ERROR   instance/beat.go:956    Exiting: data path already locked by another beat. Please make sure that multiple beats are not sharing the same data path (pat
h.data).
Exiting: data path already locked by another beat. Please make sure that multiple beats are not sharing the same data path (path.data).

您会看到filebeat停止并显示错误:

as you can see the filebeat stopped with an error :

data path already locked by another beat. Please make sure that multiple beats are not sharing the same data path (path.data).

在github/forum中搜索问题后,我发现了这个问题:
https://discuss.elastic.co/t/data-path-already-locked by-another-beat/219852/4

After searching the problem in github/forum i found this :
https://discuss.elastic.co/t/data-path-already-locked-by-another-beat/219852/4

看起来像我的问题,我正在使用默认的filebeat-kubernetes.yaml,并且在ELK/Filebeats文档中没有有关如何在filebeat-kubernetes.yaml中添加唯一路径的信息.我在哪里添加它们以及如何使它们独特?谢谢

Which looks like my problem,Im using the default filebeat-kubernetes.yaml , and there is no information in ELK / Filebeats docs on how to add unique paths in the filebeat-kubernetes.yaml
where do i add them and how do i make them unique?Thanks

推荐答案

我遇到了同样的问题.这意味着您的数据路径(/var/lib/filebeats)被另一个filebeat实例锁定.因此,请执行 sudo systemctl stop filebeat (以我为例),以确保您没有运行filebeat然后使用 sudo filebeat -e 运行filebeat,它将在控制台中打印日志

I had the same problem. It means that your data path (/var/lib/filebeats) are locked by another filebeat instance. So execute sudo systemctl stop filebeat (in my case) to be ensure that you don't have running filebeatand then run filebeat with sudo filebeat -e which prints logs in console

我还尝试了您共享的链接,但是它没有帮助我.在这里,另一个解决方案可能会为您提供帮助: https://discuss.elastic.co/t/data-path-already-locked-by-another-beat/219852/2

I also tried link, that you shared, but it didn't help me. Here another solutions, may be it would help you: https://discuss.elastic.co/t/data-path-already-locked-by-another-beat/219852/2

这篇关于Filebeat:数据路径已被另一个拍子锁定.请确保多个节拍没有共享相同的数据路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-29 22:13