Target groups not populated with targets automatically with ecs managed with AWS copilot

0

I created an ECS cluster with AWS copilot and it was working fine. At a particular time, I got a 503 service unavailable error and found out that target group to which the Load balancer is pointing doesnt have any registered targets. It happened abruptly and no targets were removed manually. But at the same time there are tasks running under the service and we can scale up the tasks. But the created tasks are not found registered under the target groups.

Later I manually registered the targets for the target groups.

Auto scaling is given for 0-4. But even when new tasks are added, the new tasks are not added to the target groups. Inly the manually added single task is available in the target group.

I tried redeploying the service. For some reason, deploying completed successfully without any new revision created.

Is there any way to reactivate the automatic registration of targets to the target groups

To put some context, this 503 happened while I was fiddling with the load balancer listeners and later found there are no active targets registered.

Requesting your kind advice and suggestions on this

1개 답변
0

Check the ECS service definition. It should have the target group configured on the service, which is what tells ECS to register/deregister tasks to the target group/ELB https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-load-balancing.html

Is it possible when you were changing the listener, the target group got changed and there is a different one on the listener vs what's configured on ECS now?

AWS
답변함 6달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠