Do you have any idea what I can't access my application hosted on Amazon Elastic Beanstalk?
Configuration: Tomcat 8.5 with Java 8 running on 64bit Amazon Linux/3.0.6 My app: Java spring boot application
On my localhost, everything is working fine.
I've set the server.port = 5000 in my application.properties file.
When i trying to get my app login page using link:
http://testenv-env.eu-west-1.elasticbeanstalk.com/employee/login
I received and 404 error:
HTTP Status 404 – Not Found Type Status Report
Message /employee/login
but when I add a port to the link:
http://testenv-env.eu-west-1.elasticbeanstalk.com:5000/employee/login
the error is: This site can’t be reached.
My security group configuration:
/var/log/tomcat8/localhost_access_log.txt
127.0.0.1 - - [17/Nov/2018:10:19:04 +0000] "GET / HTTP/1.1" 404 1074
127.0.0.1 - - [17/Nov/2018:10:21:16 +0000] "GET /employee/login HTTP/1.1" 404 1092
127.0.0.1 - - [17/Nov/2018:10:29:02 +0000] "GET / HTTP/1.1" 404 1074
127.0.0.1 - - [17/Nov/2018:10:29:56 +0000] "GET /employee/login HTTP/1.1" 404 1092
/var/log/httpd/error_log
[Sat Nov 17 10:19:18.529071 2018] [mpm_worker:notice] [pid 3716:tid 140569196038208] AH00295: caught SIGTERM, shutting down
[Sat Nov 17 10:19:22.241929 2018] [ssl:warn] [pid 25414:tid 140137380542528] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Sat Nov 17 10:19:22.243341 2018] [mpm_worker:notice] [pid 25414:tid 140137380542528] AH00292: Apache/2.4.34 (Amazon) OpenSSL/1.0.2k-fips configured -- resuming normal operations
[Sat Nov 17 10:19:22.243372 2018] [core:notice] [pid 25414:tid 140137380542528] AH00094: Command line: '/usr/sbin/httpd'
and my pom.xml dependencies:
<groupId>com.project</groupId>
<artifactId>iam</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>iam</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.0.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>bootstrap</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>