# Why filebeat cannot start and stop after a few second

**URL:** <https://discuss.elastic.co/t/why-filebeat-cannot-start-and-stop-after-a-few-second/346406>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [November 3, 2023, 8:12pm UTC](https://discuss.elastic.co/t/why-filebeat-cannot-start-and-stop-after-a-few-second/346406 "2023-11-03T20:12:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![baber1223](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/baber1223/32/83533_2.png) [@baber1223](https://discuss.elastic.co/u/baber1223)\
**Post date:** [November 3, 2023, 8:12pm UTC](https://discuss.elastic.co/t/why-filebeat-cannot-start-and-stop-after-a-few-second/346406/1 "2023-11-03T20:12:06Z")

</div>

My elasticsearch version = 8.10.4  
filebeat version : 8.7

I cannot install latest version of filebeat on my redhat 6.4 . Now when start filebeat . it is stopping after a few second . and this is my filebeat log :

```auto
 tail -f /var/log/filebeat/filebeat-20231103-29.ndjson
{"log.level":"info","@timestamp":"2023-11-03T23:35:20.141+0330","log.origin":{"file.name":"instance/beat.go","file.line":724},"message":"Home path: [/usr/share/filebeat] Config path: [/etc/filebeat] Data path: [/var/lib/filebeat] Logs path: [/var/log/filebeat]","service.name":"filebeat","ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2023-11-03T23:35:20.141+0330","log.origin":{"file.name":"instance/beat.go","file.line":732},"message":"Beat ID: 5bf86e3b-d3a6-42da-a412-288c10d34e98","service.name":"filebeat","ecs.version":"1.6.0"}
{"log.level":"warn","@timestamp":"2023-11-03T23:35:23.039+0330","log.logger":"add_cloud_metadata","log.origin":{"file.name":"add_cloud_metadata/provider_aws_ec2.go","file.line":81},"message":"read token request for getting IMDSv2 token returns empty: Put \"http://169.254.169.254/latest/api/token\": dial tcp 169.254.169.254:80: connect: no route to host. No token in the metadata request will be used.","service.name":"filebeat","ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2023-11-03T23:35:24.642+0330","log.origin":{"file.name":"instance/beat.go","file.line":396},"message":"filebeat stopped.","service.name":"filebeat","ecs.version":"1.6.0"}
{"log.level":"error","@timestamp":"2023-11-03T23:35:24.644+0330","log.origin":{"file.name":"instance/beat.go","file.line":1071},"message":"Exiting: /var/lib/filebeat/filebeat.lock: data path already locked by another beat. Please make sure that multiple beats are not sharing the same data path (path.data)","service.name":"filebeat","ecs.version":"1.6.0"}

```

Also don't know what is this ip address "169.254.169.254:80"  
? I don't have this range in my network

```auto

```

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [November 4, 2023, 12:31am UTC](https://discuss.elastic.co/t/why-filebeat-cannot-start-and-stop-after-a-few-second/346406/2 "2023-11-04T00:31:07Z")

</div>

@baber1223

> [@baber1223](#):
>
> `{"log.level":"error","@timestamp":"2023-11-03T23:35:24.644+0330","log.origin":{"file.name":"instance/beat.go","file.line":1071},"message":"Exiting: /var/lib/filebeat/filebeat.lock: data path already locked by another beat. Please make sure that multiple beats are not sharing the same data path (path.data)","service.name":"filebeat","ecs.version":"1.6.0"}`

My Guess there is already a filebeat running ... Did you stop the previous version before you tried to install the new version?

perhaps try

`ps -ef | grep filebeat`

> who is 169.254.169.254  
> The 169.254. 169.254 IP address is **a “magic” IP in the cloud world, in AWS it used to retrieve user data and instance metadata specific to a instance**. It can only be accessed locally from instances and available without encryption and authentication.

You can disable the cloud metadata processors in the filebeat.yml

---

<div class="post-metadata">

**Author:** ![baber1223](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/baber1223/32/83533_2.png) [@baber1223](https://discuss.elastic.co/u/baber1223)\
**Post date:** [November 4, 2023, 5:22am UTC](https://discuss.elastic.co/t/why-filebeat-cannot-start-and-stop-after-a-few-second/346406/3 "2023-11-04T05:22:03Z")

</div>

Thanks . The issue solved . We had to stop other filebeat that is running

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 2, 2023, 7:22am UTC](https://discuss.elastic.co/t/why-filebeat-cannot-start-and-stop-after-a-few-second/346406/4 "2023-12-02T07:22:09Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
