0

I am trying to to deploy an Node.js Docker image to Elastic Beanstalk using Travis CI. The tests and builds in Travis keep passing and successfully deploying however, I keep getting the following warn and error on my Elastic Beanstalk console

WARN: Environment health has transitioned from Info to Degraded. Incorrect application version found on all instances. Expected version "Sample Application" (deployment 1). Application update failed 31 seconds ago and took 15 minutes.

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.

I am using the free tier so I am not sure if that's the issue or what exactly I am doing wrong. Below is what my .travis.yml file looks like:

  sudo: required
services:
- docker
before_install:
- docker build -t poolafrica/pool_auth -f Dockerfile.dev .
script:
- docker run poolafrica/pool_auth npm run test -- --coverage

deploy:
  provider: elasticbeanstalk
  edge: true
  access_key_id: $AWS_ACCESS_ID
  secret_access_key:
    secure: $AWS_SECRET_KEY
  region: eu-west-2
  app: pool_auth
  env: PoolAuth-env
  bucket_name: elasticbeanstalk-eu-west-2-747115545713
  on:
    branch: master

  skip_cleanup: true
kenlukas
  • 2,886
  • 2
  • 14
  • 25

2 Answers2

0

I faced the same problem and the cause was the command timeout

Default max deployment time -Command timeout- is 600 (10 minutes)

Go to Your Environment → Configuration → Deployment preferences → Command timeout

Increase the Deployment preferences for example 1800

or upgrade the instance type to work faster

I hope that helps

Majali
  • 101
  • 1
0

I had a similar issue. For me the fix was bad formatting in an nginx conf file.

I changed listen: 3000; to listen 3000;.

It was a case of searching through the log files to find the cause of the issue. Very time consuming, but a good learning experience!

kba
  • 2,737
  • 1
  • 17
  • 18