investigate ECS unhealthy
Hi team,
I have My ECS fargate task, stopped due to failure and relaunched again
I'm trying to find the reason why the task was stopped in cloud watch but could not find anything/errors in cloud watch logs
is there any other way to investigate the reason why fargate task failed?
I ran this command :
aws ecs describe-tasks --tasks <task-id> --cluster <cluster-name>
I hade :
{
"tasks": [],
"failures": [
{
"arn": "arn:aws:ecs:region:123456789:task/4easdscsddsbdsdsdsdadssdwe9",
"reason": "MISSING"
}
]
}
it seems like a networking issue on the app mesh level, I have trace status like : Fault(5xx) for some calls
seems also it's a health check failure at the envoy level
Thank you
Hello Jess,
The "MISSING" status for the task during describe-tasks
CLI operation occurs either when you provide an incorrect task ID or when ECS had already reaped your stopped task. To find out details about the task that has already been reaped, you can contact AWS Premium Support and they will be able to provide you with the information.
If your issue is consistent, you can re-create the task and find out the reason for the task failure right after it has moved to STOPPED state. You can also find the reason for the task failure in ECS service events as explained in this doc.
I hope this information is helpful to you. Please reply if you have further questions related to this issue.
i'm using app mesh and cloud map (ApiGW => vpc link => NLB => virtual GW task => web app task) envoy image public.ecr.aws/appmesh/aws-appmesh-envoy:v1.21.1.0-prod health check with : curl -s http://localhost:9901/server_info | grep state | grep -q LIVE
the web task that contain x-ray, envoy and myapp containers fails each couple of hours
tasks fail around midnight
Relevant questions
How to register IP address for ECS task at startup so that other resources can find it
Accepted Answerasked 2 years agoECS: Random container failed to start - no log
asked 2 months agoboto3 ecs.describe_task call returns task missing
asked 2 months agoFargate: how to stop task after finishing
Accepted Answerasked 5 months agoinvestigate ECS unhealthy
asked 17 days agoNetwork path between ALB and ECS Fargate task
Accepted Answerasked 5 months agoECS Fargate Task in EventBridge has ResourceInitializationError
asked 3 months agoECS fails to remove a task from the load balancer target group?
asked 2 months agodefining the name of task definition json to run ecs task in github actions
asked 2 years agoECS Task Groups
asked 3 years ago
Did you run this command just when the task stop? Or after a while? Could you please share the task ID?