- Newest
- Most votes
- Most comments
Hello.
Have you tried the troubleshooting in the documentation below?
https://repost.aws/knowledge-center/ecs-task-container-health-check-failures
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
Thanks for the time, I had another bug in code.
I have a similar issue.
If I use "exit 0" container health checks are ok. If use "curl -f http://localhost:8080/health || exit 1" then i get this even "task b6f075b723ec40d0a130f228b46b5327 failed container health checks."
the target group is using same path "/health" for the health checks and they are ok. Could it be that the localhost is not resolved properly? I am using fargate setup.
Relevant content
- asked 4 years ago

Thanks for the time, I had another bug in code.