-
Notifications
You must be signed in to change notification settings - Fork 207
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
Metadata error logs in Cloudwatch agent - 404 EC2MetadataError: failed to make EC2Metadata request #1435
Comments
how to download v.1.300048.1b904 binary? |
I'm also encountering this in v1.300049.1b929. EDIT: additional details from #1440 indicates:
Instance metadata tags instructions: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/work-with-tags-in-IMDS.html#allow-access-to-tags-in-IMDS |
This fixed it for me, thank you! I was wondering why my CloudWatch metrics stopped working yesterday - enabling the tags access on the EC2 did it. |
Reached out to AWS support per this. This is a bug that will be resolved in the next version. They advice against allowing access to tags in instance metadata. In the meanwhile, you can use 1.300048.1b904. |
Yes, downgrading to I also tried to keep the latest and enable the metadata on the EC2, the 404 error was gone but no logs where uploaded to CW. |
|
How do you get this to work from .ebextensions in an elastic beanstalk environment? I cannot get it to work.
|
This is happening with the RPM version as well for AL2 / amzn2 |
Same problem in Rocky 9 with amazon-cloudwatch-agent 1.300049.1b929. "Access to tags in instance metadata" already enabled. Both IMDSv2 set to optional / required still same problem. |
This also fixed it for me. I allowed instance metadata in my launch template like so: |
Describe the bug
cloudwatch agent logs throw repeated errors.
status code: 404, request id: D! should retry true for imds error : EC2MetadataError: failed to make EC2Metadata request
This only happened on v.1300049.
On v.1.300048.1b904, agent don't have error logs.
Steps to reproduce
Create an Ubuntu 22.04.5 LTS EC2 instance.
Create and attach Role to EC2 with "CloudWatchAgentServerPolicy" managed policy.
Install the cloudwatch agent using the documentation (root user):
3.1. wget https://amazoncloudwatch-agent.s3.amazonaws.com/ubuntu/amd64/latest/amazon-cloudwatch-agent.deb
3.3. dpkg -i -E ./amazon-cloudwatch-agent.deb
3.4. /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-config-wizard
3.5. /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a fetch-config -m ec2 -s -c file:/opt/aws/amazon-cloudwatch-agent/bin/config.json
Check the agent status: systemctl status amazon-cloudwatch-agent
What did you expect to see?
No errors on the status logs.
What did you see instead?
from journalctl, this log keeps repeating
What version did you use?
v1.300049.1b929
What config did you use?
Reference agent config output:
Environment
OS version: Ubuntu 22.04.5 LTS
Additional context
This only happened on v.1300049.
On v.1.300048.1b904, agent don't have error logs.
The text was updated successfully, but these errors were encountered: