aws / aws-codedeploy-agent

Host Agent for AWS CodeDeploy
https://aws.amazon.com/codedeploy
Apache License 2.0
330 stars 187 forks source link

DownloadBundle deployment lifecycle events for troubleshooting UnknownError: execution expired #383

Open tangzhiqiangh opened 1 year ago

tangzhiqiangh commented 1 year ago

here is no error message in codedeploy-agent.aws_wire.log. Codedeploy can sometimes be deployed successfully, but most of them fail this time. At first, I thought it was an S3 access problem because I set the aws security group outbound traffic limit for the instance. But I opened the outbound traffic to S3. When I opened all outbound traffic of 443 and 80, this error still appeared. Is there any other way to fix this error?

a-jackson commented 8 months ago

@tangzhiqiangh did you ever find a solution to this? We've started getting it today in ~50% of deploys

nassercarlos19 commented 2 weeks ago

A similar error, any update? Sometimes, it works; other times, it fails, but always at the DownloadBundle step.

Please help! :(

@a-jackson @tangzhiqiangh

a-jackson commented 2 weeks ago

@nassercarlos19 we found that when new instances came online sometimes the code deploy agent would not start and therefore the deployment would fail. I added a scheduled task to our image that runs every 5 minutes to check the service is running and start it if it isn't.

We only have this on our Windows image, Linux never had the same issues.

nassercarlos19 commented 2 weeks ago

Thanks, @a-jackson. In my case, the agent is always running, but for some reason, after downloading the bundle, I see the agent stopping and starting again. After this restart, it gets stuck until it time out after 1 hour and 10 minutes.

This is a random issue; sometimes it works, and sometimes fails.