Search code examples
javawindowsamazon-web-servicesspring-bootwindows-server-2016

Springboot webserver running on Windows Server 2016 / AWS not working


I am having difficulties getting visibility to my cloud server (Windows Server 2016 OS on AWS) from external computer.

  1. I am taking the default springboot from https://start.spring.io/
    Using Java 8 and packaged as Jar.
  2. I use "gradle bootJar" to make the jar file.
  3. I boot up a windows 2016 server on AWS/EC2.
  4. I put the file on the cloud server.
  5. IIS is disabled.
  6. I install java 8 sdk
  7. I run the jar file in cmd with "java -jar -Dserver.port=80 myapp.jar"
  8. I open up HTTP and all traffic to and from the server in AWS.

Now locally(RDP into my cloud computer), I see the app fine at http://localhost:80. But remotely (eg. at work), I cannot reach the server location of http://"my servers public ipaddress":80.

Note: Running the app as a service with Winsw did not help my problem.

I also noticed that running IIS, I am able to see the default IIS screen from remote computers.


Solution

  • Make sure that Windows firewall is not blocking the port 80.