13

I'm hosting an application with AWS, using elasticbeanstalk. I'm using the toolbelt to push my application from my local machine. Up until a couple weeks ago, everything was working fine, but recently my changes aren't taking effect. I can see in the aws management console that my application is being pushed and deployed, but changes aren't coming through.

I checked the environment event log to see if anything was new from a typical deployment and the error I'm seeing is

ERROR   Update environment operation is complete, but with command timeouts. Try increasing the timeout period. For more information, see troubleshooting documentation.
ERROR   During an aborted deployment, some instances may have deployed the new application version. To ensure all instances are running the same version, re-deploy the appropriate application version.
ERROR   Failed to deploy application.
ERROR   Unsuccessful command execution on instance id(s) 'i-8d88a587'. Aborting the operation.

What is the problem exactly, and what can I do to fix this?

jordan
  • 9,570
  • 9
  • 43
  • 78
  • Have you fixed that? I just had this problem and it seems was error with Composer command in `.ebextensions` – Justinas Sep 10 '15 at 11:07
  • 1
    @Justinas I simply ended up starting up a fresh instance – jordan Sep 10 '15 at 15:55
  • 3
    Does it helped? Did you used same code or changed something? Post your answer how you solved this issue – Justinas Sep 11 '15 at 05:41
  • 2
    If the problem got solved by using a fresh instance probably it was due to the fact that, in your . ebextensions, sometimes you create files (like hooks, for instance) that doesn't get automatically deleted when you do another deploy. Let's say you created a pre-deploy hook that didn't work, you changed your local project and deployed again, that hook is still on the instance although you removed it from your repository. You'd have to either rebuild the environment, use a new one, or just log in to the EC2 instance and manually delete any stale files – Lawrence Gil Jan 20 '20 at 02:13
  • 1
    Rebuilding the environment solved the issue for me. – Jalal El-Shaer Feb 05 '22 at 06:27

3 Answers3

5

There could be several causes of this.

The next troubleshooting step is to download the most recent Elastic Beanstalk logs (either from the web console or with the eb logs command line tool.)

Open /var/log/eb-activity.log and look at the last few lines to determine the exact command that failed.

Examples could be

  • a server volume ran out of space or
  • a custom script in .ebextensions/ has a bug
dcorking
  • 1,146
  • 1
  • 14
  • 24
0

I checked .elasticbeanstalk/config.yml and some deploy configuration was missing:

deploy:
  artifact: target/yourjar.jar

gleitonfranco
  • 791
  • 6
  • 9
0

I faced this issue in two cases:

  1. I was trying to run artisan command as cron (the cron command was not correct obviously).

    I needed to rebuild the environment to resolve.

  2. I am running db migrations when deploying db name was wrong in the configuration file.

    I just corrected the db name and could deploy.

Adem Tepe
  • 564
  • 5
  • 10