Skip to content
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

Random error on startup - Could not determine target lifecycle of instance: operation error ec2imds: GetMetadata, http response error StatusCode: 404, request to EC2 IMDS failed" module=agent.go #4487

Open
mello7tre opened this issue Feb 4, 2025 · 0 comments

Comments

@mello7tre
Copy link

mello7tre commented Feb 4, 2025

Hi, after update to 1.89.3 i am experiencing random error on startup.
I am running the official aws ecs image al2023-ami-ecs-hvm-2023.0.20250129-kernel-6.1-x86_64.
Docker container ecs-agent do not start and looking at log file /var/log/ecs/ecs-agent.log last lines are:

level=info time=2025-02-04T07:02:16Z msg="Loading state!" module=state_manager.go
level=info time=2025-02-04T07:02:16Z msg="Event stream ContainerChange start listening..." module=eventstream.go
level=info time=2025-02-04T07:02:16Z msg="Waiting for instance to go InService" module=agent.go
level=critical time=2025-02-04T07:02:21Z msg="Could not determine target lifecycle of instance: operation error ec2imds: GetMetadata, http response error StatusCode: 404, request to EC2 IMDS failed" module=agent.go

After i discover the problem, usually if i restart the service ecs, the second time it start up without any error.
But this is a problem because when happen, cluster ecs instance start up but do not connect to ECS cluster, and there is no watchdog service to mark it as bad and terminate the instance.

Regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant