Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS CodeDeploy: stuck on install step

I'm running through this tutorial to create a deployment pipeline with my custom .net-based docker image.
But when I start a deployment, it's stuck on install phase, so I have to stop it manually: enter image description here

After that I get a couple of running tasks with different task definitions (note :1 and :4, 'cause I've tried to run deployment 4 times by now): enter image description here

They also change their state RUNNING->PROVISIONING->PENDING all the time. And the list of stopped tasks grows: enter image description here

Q: So, how to hunt down the issue with CodeDeploy? Why It's running forever?

UPDATE: It is connected to health checks.

UPDATE: I'm getting this:

(service dataapi-dev-service, taskSet ecs-svc/9223370487815385540) (port 80) is unhealthy in target-group dataapi-dev-tg1 due to (reason Health checks failed with these codes: [404]).

Don't quite understand, why is it failing for newly created container, 'cause the original one passes health-check.

like image 427
orkenstein Avatar asked Nov 18 '25 04:11

orkenstein


2 Answers

While the ECS task is running, ELB (Elastic Load Balancer) will constantly do healthchecking the container as you config in the target group to check if the container is still responding.

From your debug message, the container (api) responded the healthcheck path with 404.

I suggest you config the healhcheck path in target group dataapi-dev-tg1.

like image 166
Duy Phan Avatar answered Nov 20 '25 04:11

Duy Phan


For those who are still hitting this issue: in my case the ECS cluster had no outbound connectivity.

Possible solutions to this problem:

  • make security groups you use with your VPC allow outbound traffic
  • make sure that the route table you use with VPC has subnet associations with subnets you use with your load balancer (examine route tables)

I have able to figure it out because I enabled CloudWatch during ECS cluster creation and got CannotPullContainerError. For more information on solving this problem look into Cannot Pull Container Image Error.

like image 42
pbn Avatar answered Nov 20 '25 04:11

pbn



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!