ElasticBeanstalk - application changes not showing
Asked Answered
C

4

15

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?

Calabresi answered 22/7, 2015 at 20:29 Comment(5)
Have you fixed that? I just had this problem and it seems was error with Composer command in .ebextensionsSignalman
@Signalman I simply ended up starting up a fresh instanceCalabresi
Does it helped? Did you used same code or changed something? Post your answer how you solved this issueSignalman
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 filesBole
Rebuilding the environment solved the issue for me.Trichome
F
6

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
Fic answered 2/9, 2019 at 13:32 Comment(0)
T
0

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

deploy:
  artifact: target/yourjar.jar

Transhumance answered 11/12, 2021 at 16:41 Comment(0)
A
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.

Armitage answered 15/2, 2022 at 14:24 Comment(0)
W
0

There are many issues with awsebcli while working with Python.12 and Django > 2. This is how I solved the issue

*Installed Python 9.

*pip install django==2.2

  • django-admin startproject myApp

  • Then I replaced the settings.py with my original projects's settings.py

  • pip install awsebcli (make sure that it's added to PATH (environment_variables) in your local system.

*From AWS Console > Codecommit

  • Create new repository

*Copy the URL and clone the repo to your local machine.

Then:

  • eb init -p python-3.8 myApp-name (Not necessary to use python-3.8 itself)

  • eb init

  • eb create myEnv

  • Complete production necessities.

  • Then type eb deploy

Wallraff answered 9/4 at 15:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.