I could not host my spring boot app to Amazon Web Services: Elastic Beanstalk. I did follow some video tutorials and stack overflow posts. still helpless. I want to host my war file to AWS and run it successfully. Here is my pom.xml and other stuff. it works well in the local. but after deploying to aws it does not work. the health status shown is severe.
Error Page Screenshot
POM.XML
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.cloudsofts.cloudschool</groupId>
<artifactId>CloudSchool</artifactId>
<version>1.0.0</version>
<name>Cloud School</name>
<description>School Management Software</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.9.RELEASE</version>
</parent>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
<version>0.7.0</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
New Error
------------------------------------
/var/log/nginx/error.log
-------------------------------------
2018/03/27 15:41:56 [error] 29286#0: *22 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.29.42, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:5000/", host: "172.31.2.252"
2018/03/27 15:41:56 [error] 29286#0: *24 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.11.79, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:5000/", host: "172.31.2.252"
2018/03/27 15:42:05 [error] 29286#0: *22 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.29.42, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:5000/", host: "172.31.2.252"
2018/03/27 15:42:06 [error] 29286#0: *24 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.11.79, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:5000/", host: "172.31.2.252"
2018/03/27 15:42:15 [error] 29286#0: *22 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.29.42, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:5000/", host: "172.31.2.252"
2018/03/27 15:42:16 [error] 29286#0: *24 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.11.79, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:5000/", host: "172.31.2.252"
2018/03/27 15:42:25 [error] 29286#0: *22 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.29.42, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:5000/", host: "172.31.2.252"
2018/03/27 15:42:26 [error] 29286#0: *24 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.11.79, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:5000/", host: "172.31.2.252"
2018/03/27 15:42:35 [error] 29286#0: *22 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.29.42, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:5000/", host: "172.31.2.252"
2018/03/27 15:42:36 [error] 29286#0: *24 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.11.79, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:5000/", host: "172.31.2.252"
2018/03/27 15:42:45 [error] 29286#0: *22 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.29.42, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:5000/", host: "172.31.2.252"
2018/03/27 15:42:46 [error] 29286#0: *24 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.11.79, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:5000/", host: "172.31.2.252"
2018/03/27 15:42:55 [error] 29286#0: *22 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.29.42, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:5000/", host: "172.31.2.252"
2018/03/27 15:42:56 [error] 29286#0: *24 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.11.79, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:5000/", host: "172.31.2.252"
2018/03/27 15:43:05 [error] 29286#0: *22 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.29.42, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:5000/", host: "172.31.2.252"
2018/03/27 15:43:06 [error] 29286#0: *24 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.11.79, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:5000/", host: "172.31.2.252"
2018/03/27 15:43:15 [error] 29286#0: *22 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.29.42, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:5000/", host: "172.31.2.252"
2018/03/27 15:43:16 [error] 29286#0: *24 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.11.79, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:5000/", host: "172.31.2.252"