dimanche 31 mai 2015

Error deploying Play Framework on AWS Beanstalk Docker

Im running a Play Framework app on AWS Beanstalk with Docker (64bit Amazon Linux 2015.03 v1.4.1 running Docker 1.6.0).

Docker File:

FROM relateiq/oracle-java8
MAINTAINER XXXX
EXPOSE 9000
ADD files /
WORKDIR /opt/docker
RUN ["chown", "-R", "daemon", "."]
RUN ["chmod", "+x", "bin/app"]
USER daemon
ENTRYPOINT ["bin/app"]
CMD []

Dockerrun.aws.json

{
   "AWSEBDockerrunVersion": "1",
   "Ports": [{
       "ContainerPort": "9000"
   }]
}

When the instance first starts I get about 1 minute where its deployed as normal, then after I browse a few pages the error shows:

502 Bad Gateway

nginx/1.6.2

The error in the ElasticBeanstalk logs is:

Play server process ID is 1 This application is already running (Or delete /opt/docker/RUNNING_PID file).

I also get in the /var/log/docker-events.logthe following messages every 30 seconds:

2015-05-30T20:07:58.000000000Z d0425e47095e5e2637263a0fe9b49ed759f130f31c041368ea48ce3d99d1e947: (from aws_beanstalk/current-app:latest) start
2015-05-30T20:08:15.000000000Z d0425e47095e5e2637263a0fe9b49ed759f130f31c041368ea48ce3d99d1e947: (from aws_beanstalk/current-app:latest) die
2015-05-30T20:08:16.000000000Z d0425e47095e5e2637263a0fe9b49ed759f130f31c041368ea48ce3d99d1e947: (from aws_beanstalk/current-app:latest) start
2015-05-30T20:08:31.000000000Z d0425e47095e5e2637263a0fe9b49ed759f130f31c041368ea48ce3d99d1e947: (from aws_beanstalk/current-app:latest) die

Can anyone see my issue? Cheers.




5 commentaires:

  1. Ce commentaire a été supprimé par l'auteur.

    RépondreSupprimer
  2. Looking for a real estate template WordPress? You can find it on TemplateMonster.

    RépondreSupprimer
  3. Amazon has a simple web services interface that you can use to store and retrieve any amount of data, at any time, from anywhere on the web. then offering compute power, database storage,
    content delivery and other functionality to help businesses scale and grow.For more information visit
    aws training in chennai | aws training in annanagar | aws training in omr | aws training in porur | aws training in tambaram | aws training in velachery

    RépondreSupprimer