- Newest
- Most votes
- Most comments
it seems it is orphaned targets in your ECS cluster's target groups. Orphaned targets are instances that are registered with a target group but are not serving traffic for any running tasks or services.
some steps resolve the issue:
Go to the AWS Management Console, navigate to the EC2 service, and then select "Target Groups" from the sidebar. Check each target group associated with your ECS services and look for targets that do not correspond to any of your running tasks or services.
Double-check the configuration of your Auto Scaling Group (ASG) (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-verify-scaling-activity.html)to ensure that it is correctly registered with the ECS cluster and that it is using the appropriate launch configuration or launch template.
Review the configuration of your ECS services to ensure that they are correctly configured to use the newly created capacity provider and ASG. Make sure that the desired task count and task definition are set correctly.
Log in to the ECS container instances running in your cluster and check their status. Verify that they are healthy and running the expected tasks. You can use ECS CLI or AWS CLI commands to retrieve information about the container instances and running tasks. (https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-health-checks.html)
Ensure that the load balancer associated with your ECS services is configured correctly and is targeting the appropriate target groups. Check for any misconfigurations or inconsistencies in the load balancer settings.
If you identify orphaned targets in your target groups, you can manually deregister them from the target group using the AWS Management Console or CLI. This will remove the unnecessary targets and prevent them from receiving traffic. )https://docs.aws.amazon.com/elasticloadbalancing/latest/application/delete-target-group.html)
If you continue to experience issues, you may want to consider reaching out to AWS Support for further assistance and troubleshooting.
Relevant content
- asked 5 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
Back with an update, I have found that every time the ASG adds a new instance, it creates a registered target in each target group associated to the ALB on port 80 and it remains unhealthy, I guess it is because of the EC2 health checks property that is always active in the ASG. My only temporary solution has been to delete the Registered target on port 80 in each Target Group manually after each scale out of the ASG.