ECS container health checks failing.

0

Hey there, I am deploying an ECR container via ECS & health checks are getting failed again & again saying "Task failed for container health checks", even though returned exit code is 0, target group is healthy, & logs indicate [28/Jun/2024:02:20:26 +0000] "GET /ping HTTP/1.1" 200 1 "-" "ELB-HealthChecker/2.0" that status 200 is being returned, Please help me out pinpointing the issue..

Vishnu
asked a month ago214 views
2 Answers
0

Hello.

Have you tried the troubleshooting in the documentation below?
https://repost.aws/knowledge-center/ecs-task-container-health-check-failures

profile picture
EXPERT
answered a month ago
profile picture
EXPERT
reviewed a month ago
  • Thanks for the time, I had another bug in code.

0

Hi Vishnu

The fact that your container health checks are failing despite an exit code of 0, successful target group status, and logs showing a 200-status code for the health check endpoint is indeed unusual.

Follow the links to resolve issue.

https://repost.aws/knowledge-center/ecs-task-stopped

https://docs.aws.amazon.com/AmazonECS/latest/developerguide/healthcheck.html

https://reintech.io/blog/implementing-container-health-checks-amazon-ecs

profile picture
EXPERT
Sandeep
answered a month ago
profile picture
EXPERT
reviewed a month ago
  • Thanks for the time, I had another bug in code.