Elastic Beanstalk deploy always fails but works if starting new environment

Viewed 212

Similar question found here with no answers: Similar Question

I am having a tough time replicating this issue. But it has happened many times.

Basically, when I create the Elastic Beanstalk environment via Command Line like this:

  1. eb create
    • set up the configuration
  2. the environment is successfully deployed

BUT, (sometimes) if I change a simple print statement, and redeploy like this:

  1. eb deploy my-environment-name

  2. Deployment fails

I was unable to view the logs in this state, I basically then have to terminate the entire environment and then create the environment from scratch again.

Any idea what is causing this to happen? Like I said, it happens randomly so I was not able to get the logs, but one of the times, it mentioned that their was a problem with the docker file version, even though it works on creation.

This is my docker file:

# Build stage 
# 
FROM maven:3.8.1-jdk-8 
ADD src /tmp/src
ADD pom.xml /tmp/pom.xml
RUN mvn -f /tmp/pom.xml clean package

#
# Package stage
#
FROM openjdk:8
COPY --from=0 /tmp/target/para-host-0.0.1-SNAPSHOT.jar /usr/local/lib/para.jar
EXPOSE 5000
ENTRYPOINT ["java","-jar","/usr/local/lib/para.jar"]
0 Answers
Related