The most typical error you’ll obtain throughout well being verify failures for Amazon ECS duties on AWS Fargate. The errors are:
- (service AWS-service) (port 8080) is unhealthy in (target-grouparn:uxyztargetgroup/aws-targetgroup/123456789) attributable to (purpose Well being checks failed with these codes: [502]) or [request timeout]
- (service AWS-Service) (port 8080) is unhealthy in target-group tf-20190411170 attributable to (purpose Well being checks failed)
- If the container is mapped to port 80, then make sure that the container safety group permits the load balancers inbound site visitors on port 80.
- You could confirm whether or not the load balancer well being ping port worth is correctly configured or not. If the port is just not correctly configured, the load balancer may de-register the container itself.
- Confirm the each ping port and well being verify path are correctly configured.
- Outline a minimal grace interval for well being checks. This informs the service scheduler to skip Elastic Load Balancing well being checks as soon as a process has been instantiated for a pre-defined period of time.
- You must repeatedly monitor the CPU and reminiscence statistics of the providers.
- Monitor your utility logs for any utility errors.
- Examine that your backend database is efficiently related.
Error 504 Troubleshooting
You’ll obtain the error 504 attributable to any of the next causes:- Load balancer fails to hook up with the goal earlier than the connection expires.
- Load balancer related to the goal, but it surely failed to reply earlier than the idle timeout interval expired.
- Your subnet’s community entry management record didn’t permit site visitors from the targets to the load balancer nodes on the ephemeral ports.
- Affirm that the backend has responded efficiently at once.
- Set the right response time-out worth. The well being verify will fail if the worth is lesser than the time required.
- Additionally, Examine your load balancer’s entry logs for extra details about points.
- First, verify that you’re passing the right command to the container and syntax.
- If the duty has been working for a while, then verify your utility logs in addition to the Amazon CloudWatch logs.