Home:ALL Converter>AWS Elasticbeanstalk with Django: Incorrect application version found on all instances

AWS Elasticbeanstalk with Django: Incorrect application version found on all instances

Ask Time:2019-06-04T22:09:11         Author:HenryM

Json Formatter

I'm trying to deploy a django application on elasticbeanstalk. It has been working fine then suddenly stopped and I cannot figure out why.

When I do eb deploy I get

INFO: Environment update is starting.                               
INFO: Deploying new version to instance(s).                         
INFO: New application version was deployed to running EC2 instances.
INFO: Environment update completed successfully.      

Alert: An update to the EB CLI is available. Run "pip install --upgrade awsebcli" to get the latest version.
INFO: Attempting to open port 22.
INFO: SSH port 22 open.
INFO: Running ssh -i /home/ubuntu/.ssh/web-cdi_011017.pem [email protected] if ! grep -q 'WSGIApplicationGroup %{GLOBAL}' /etc/httpd/conf.d/wsgi.conf ; then echo -e 'WSGIApplicationGroup %{GLOBAL}' | sudo tee -a /etc/httpd/conf.d/wsgi.conf; fi;
INFO: Attempting to open port 22.
INFO: SSH port 22 open.
INFO: Running ssh -i /home/ubuntu/.ssh/web-cdi_011017.pem [email protected] sudo /etc/init.d/httpd reload
Reloading httpd: [  OK  ]

When I then run eb health, I get

Incorrect application version found on all instances. Expected version "app-c56a-190604_135423" (deployment 300).

If I eb ssh and look in /opt/python/current there is nothing there so nothing is being copied across

I think something may be wrong with .elasticbeanstalk/config.yml. Somehow the directory was deleted and setup again. This is the config.yml

branch-defaults:
  master:
    environment: app-prod
  scoring-dev:
    environment: app-dev
environment-defaults:
  app-prod:
    branch: null
    repository: null
global:
  application_name: my-app
  default_ec2_keyname: am-app_011017
  default_platform: arn:aws:elasticbeanstalk:us-west-2::platform/Python 2.7 running
    on 64bit Amazon Linux/2.3.1
  default_region: us-west-2
  include_git_submodules: true
  instance_profile: null
  platform_name: null
  platform_version: null
  profile: null
  sc: git
  workspace_type: Application

Please, any ideas about how to troubleshoot?

Author:HenryM,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/56445655/aws-elasticbeanstalk-with-django-incorrect-application-version-found-on-all-ins
HenryM :

I upgraded to the latest AWS stack for python 2.7 and that sorted it",
2019-09-30T19:45:11
yy