Open SongGithub opened 3 years ago
Hi @SongGithub! Thanks for the bug report. I have a couple of follow up questions so we can best resolve this issue.
First, are you using Classic Load Balancing, or Load Balancing V2 for your service? There are different usages for the --load-balancer-name
, --target-group-arn
, and --target-groups
flags depending on your use.
If you're using a classic load balancer, you will want to use the --load-balancer-name
flag. If you're using an Application or Network Load Balancer, the --target-group-arn
or --target-groups
flag will let you specify ELBv2 target groups.
What I suspect is happening is that you specified an ELBv1 load balancer the first time this service was created, deleted the target group attached to it, and are now using --target-group-arn
to specify the new one. Is that correct?
I am using ALB, and have always been using ALB, so there has been no transition from CLB to ALB
I'm facing the same issue.
echo "targetGroupArn=$AWS_TARGETGROUP_ARN,containerName=$CONTAINER_NAME,containerPort=$CONTAINER_PORT"
-> Returns the correct target-group-arn.
ecs-cli compose --file $DOCKERCOMPOSE_FILE --ecs-params $ECS_PARAMS_FILE --project-name $AWS_ECS_PROJECT_NAME service up --target-groups "targetGroupArn=$AWS_TARGETGROUP_ARN,containerName=$CONTAINER_NAME,containerPort=$CONTAINER_PORT" --create-log-groups --cluster-config $AWS_ECS_CONFIG_NAME --ecs-profile $AWS_ECS_PROFILE_NAME --region $AWS_REGION --timeout 12
-> Returns OLD target-group-arn does not exist.
Update: It's FIXED when I delete the old Service in ECS Cluster
Is there a fix that exists for this? Facing the same issue.
Seems like the only fix I've found is to delete the old service, but that seems, meh...
So do we have to delete the existing service and re-make to get it to work? Seems it's the only fix. Weird the Cloud Formation dashboard acknowledges the target group ARN has changed but provides no way to easily change it or force an update.
Issue on my end is the original target group was deleted and a new one made with same name, but AWS appends some auto-generated id at the end of the ARN.
I have this issue. Is there a fix? Really don't want to delete the old service
Summary
after replaced Target group with Terraform, and running ECSCLI. The CLI prompts error "the old Target group not exist"
Description
ecs-cli up --capability-iam --size 2 --launch-type EC2
)ecs-cli --version
) ecs-cli version 1.20.0 (7547c45)go version
) NAConfig files
docker-compose.yml
ecs-params.yml
~/.ecs/config
Expected Behavior
ECSCLI takes the new TG, and deploy normally.
Observed Behavior
ECSCLI remembers the deleted old TG ARN, and complains that it is missing, refuses to take the newly given TG ARN.