-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Amazon Linux 2 - fluent-bit.service fails to start with error "Dependency failed for Fluent Bit." #10186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
7 tasks
@charltonstanley
Then run the below two commands to pickup the new sethostname service
|
@cpandya-we Thanks for this. I had to change
to
In order for the |
charltonstanley
added a commit
to PedigreeTechnologies/fluent-bit
that referenced
this issue
Apr 15, 2025
PR fluent#9845 added a service dependency "sethostname.service" for Amazon Linux 2, which uses Amazon's Instance Metadata Service (IMDS) to query and set the hostname. This works for instances using the legacy IMDSv1, however it fails when admins have enforced the usage of IMDSv2. This patch is a modification of @cpandya-we comment/work on fluent#10186. Fixes fluent#10186
2 tasks
charltonstanley
added a commit
to PedigreeTechnologies/fluent-bit
that referenced
this issue
Apr 16, 2025
PR fluent#9845 added a service dependency "sethostname.service" for Amazon Linux 2, which uses Amazon's Instance Metadata Service (IMDS) to query and set the hostname. This works for instances using the legacy IMDSv1, however it fails when admins have enforced the usage of IMDSv2. This patch is a modification of @cpandya-we comment/work on fluent#10186. Fixes fluent#10186 Signed-off-by: Charlton Stanley <[email protected]>
charltonstanley
added a commit
to PedigreeTechnologies/fluent-bit
that referenced
this issue
Apr 16, 2025
PR fluent#9845 added a service dependency "sethostname.service" for Amazon Linux 2, which uses Amazon's Instance Metadata Service (IMDS) to query and set the hostname. This works for instances using the legacy IMDSv1, however it fails when admins have enforced the usage of IMDSv2. This patch is a modification of @cpandya-we comment/work on fluent#10186. Fixes fluent#10186 Signed-off-by: Charlton Stanley <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Report
Describe the bug
#9845 was implemented to address a race condition, however this will fail for any instances that require the use of version 2 of AWS's Instance Metadata Service. IMDSv2 requires retrieving a token via a
PUT
and then passing that token when performing yourGET
.See the documentation here: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html#instance-metadata-retrieval-examples
To Reproduce
Log output from the new
setservice.service
dependency that was added in #9845.Expected behavior
Fluent-bit service starts
Screenshots
Screenshot of relevant EC2 Instance setting

Your Environment
Additional context
We are unable to upgrade to v4.0.0 on all of the instances in our AWS organization. We are smaller organization, but I know that we can't be the only AWS customers that, for security reasons, require IMDSv2 to be used over IMDSv1.
Security benefits of IMDSv2: https://aws.amazon.com/blogs/security/defense-in-depth-open-firewalls-reverse-proxies-ssrf-vulnerabilities-ec2-instance-metadata-service/
The text was updated successfully, but these errors were encountered: