-
Notifications
You must be signed in to change notification settings - Fork 68
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
[Error] Unable to fetch region from EC2 metadata: EC2MetadataRequestError: failed to get EC2 instance identity document #203
Comments
Hi, thanks for providing this feedback. In IMDSv2 public doc "Compatibility with AWS SDKS" it seems AWS SDK for go v1 is ok, we will do more investigation. As a workaround currently, could you please add |
Thanks for the response. It seems indeed v1 of the Go SDK should offer support for using the IMDSv2. Can you comment on why it does not seem to work in xray-daemon? Is there some changes needed to make that happen? I was able to mitigate that issue with the region by using the ENV variable (
|
I order an EC2 instance(Linux) and launch xray daemon by following https://docs.aws.amazon.com/xray/latest/devguide/xray-daemon-ec2.html without EC2MetadataError issue. Could you tell how do you run xray daemon? |
We are seeing this issue as well:
Any idea on fixes? For now we have mitigated by using FWIW this is what the log looks like when we set
|
Hi
We are running x-ray-daemon @ 3.3.7 (latest at the time) on EC2 instances as part of an ECS task.
Until recently we used to run 3.2.0 but encountered issues when we tried to enforce use of EC2 IMDSv2 via a config setting.
Tried to upgrade to 3.3.7 which I thought would help, but apparently it seems it does not, the daemon fails to start:
After digging in the repository, it seems to me that the issue might be caused by the fact that AWS SDK for GO (v1) does not offer support to seamlessly use IMDSv2:
https://github.com/aws/aws-xray-daemon/blob/56bcdadc0e5808f4428ed6e3e54a88a2ceca2f82/pkg/conn/conn.go#L45C11-L45C11
Based on my research, AWS SDK for GO (v2) should have such support out of the box.
Can you confirm and advise when such support could be expected in x-ray-daemon?
Thanks!
The text was updated successfully, but these errors were encountered: