2
votes

I use AWS CodeDeploy to deploy builds from GitHub to EC2 instances in AutoScaling Group.

It's working fine for Windows 2012 R2 with all Deployment configurations.

But for Windows 2016 it totally fails on "OneAtTime" deploy; During "AllAtOnce" deploy only one or two instances deployed successfully, all other fails.

In the logfile on agent this suspicious message is present:

ERROR [codedeploy-agent(1104)]: CodeDeploy Instance Agent Service: CodeDeploy Instance Agent Service: error during start or run: Errno::ETIMEDOUT - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. - connect(2)

All policies, roles, software, builds and other stuff are the same, I even tested this on brand new AWS account.

Does anybody faced such behaviour?

2

2 Answers

1
votes

I ran into the same problem, but during my investigation, I found out that server's route table had wrong routes for 169.254.169.254 network (there was specified the gateway from the network where my template was captured), so that it couldn't read instance metadata.

-1
votes

From the above error it looks like the agent isn't able to talk to CodeDeploy endpoint after instance starts up. Please check if the routing tables and other proxy related settings are set up correctly. Also if you do not have it already, you can turn on the debug log by setting :verbose to true in the agent config and restart the agent. This would help debug the issue better.