Elastic Beanstalk Deploy never terminates on CircleCi but App is deployed

Hi there,

I use a pretty simple pipeline (push to git then npm install my server, then npm install my front-end, test then build) and then it is deployed to AWS using EB. However the app does deploy to AWS but does not terminate the task in CircleCi leaving it in “Running Forever”.

Any ideas why this may be?

Could you add a Linux timeout to your deploy step? If it deploys but still times out, perhaps there is a platform bug. Also, if you have a verbose mode to your deploy, switch it on, so you can see how far it is getting.

1 Like

Hello @halfer,

  1. If I add a timeout it will time out and fail which is not optimal as builds that pass will still be marked as failed in CircleCi right?

  2. Here is the verbose xoutput:

     eb deploy MyEnvironment -v
     INFO: Deploying code to MyEnvironment in region eu-west-1
     INFO: Getting version label from git with git-describe
     Creating application version archive "app-ba79-290727_140126".
     INFO: creating zip using git archive HEAD
     INFO: git archive output: .babelrc
     List of all my files
     INFO: Uploading archive to s3 location: MyEnvironment/app-ba79-290727_140126.zip
    
     Uploading: [##################################################] 100% Done...
    
     INFO: Creating AppVersion app-ba79-290727_140126
    
    

It then hangs here forever but it successfully deploys to AWS and I can see the changes I made.

Also, thanks for helping me out!

Yes. I did not mean this to be a permanent solution - just that if you can show that it has deployed and it is still hanging, then it may be worth filing a bug with Circle. Given your verbose output, perhaps you can say that you have shown there to be a problem already?

Hey @halfer,

No luck on the bug post! I think i’ll just add a timeout! How would you approach this?

A timeout just takes a time and a command, so yours would probably be:

timeout 5m eb deploy MyEnvironment -v

where “5m” can be any number (e.g. 5) and any unit (e.g. m=minutes, s=seconds, etc).

Separately, I think I have identified a platform bug where the server stdout hangs onto the process even after the output has finished, but it is very sporadic, in my experience. Does your issue happen every time, or infrequently?

Everytime!

1 Like

Had a similar issue and found a suggestion to add the permission elasticbeanstalk:DescribeEvents
to the deploy user.

Resolved my issue.