X-Ray in ECS: "Get instance id metadata failed"

0

Hello,

I am trying to use X-Ray on my ECS Fargate service. I have followed the steps here: https://docs.aws.amazon.com/xray/latest/devguide/xray-daemon-ecs.html

I have used the first Dockerfile from that page.

FROM amazonlinux
RUN yum install -y unzip
RUN curl -o daemon.zip https://s3.dualstack.us-east-2.amazonaws.com/aws-xray-assets.us-east-2/xray-daemon/aws-xray-daemon-linux-2.x.zip
RUN unzip daemon.zip && cp xray /usr/bin/xray
ENTRYPOINT ["/usr/bin/xray", "-b", "0.0.0.0:2000"]
EXPOSE 2000/udp

I have added the Docker image to an ECR repo and added one of these containers to my existing task definition.

In the logs for my container I see this:

2018-07-09 13:17:172018-07-09T20:17:17Z [Error] Get instance id metadata failed: RequestError: send request failed
2018-07-09 13:17:17caused by: Get http://169.254.169.254/latest/meta-data/instance-id: dial tcp 169.254.169.254:80: connect: invalid argument
2018-07-09 13:17:162018-07-09T20:17:16Z [Info] Initializing AWS X-Ray daemon 2.1.3
2018-07-09 13:17:162018-07-09T20:17:16Z [Info] Using buffer memory limit of 37 MB
2018-07-09 13:17:162018-07-09T20:17:16Z [Info] 592 segment buffers allocated
2018-07-09 13:17:162018-07-09T20:17:16Z [Info] Using region: us-west-2
asked 6 years ago3553 views
1 Answer
0

Hi there,

The X-Ray daemon will try to fetch EC2 metadata for telemetry data. This failure should not affect daemon functionality in any way except a log entry during start up as you see. You can turn it off by setting the daemon to local mode. See https://docs.aws.amazon.com/xray/latest/devguide/xray-daemon-configuration.html. Please let me know if you have any concern.

Thanks,
Haotian

AWS
answered 6 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions