Why filebeat cannot start and stop after a few second

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 :

 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

@baber1223

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

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

1 Like

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