Embedded Tomcat access from outside localhost
Answered
When I launch a "Spring Boot" run/debug configuration in IntelliJ, I can only reach the running web service on localhost. Is there something about running this inside IntelliJ that prevents access from outside the machine it is running on? I attempted to set the server.address to 0.0.0.0 but has no affect.
application.properties entries:
server.address=0.0.0.0
server.port = 9080
Please sign in to leave a comment.
server.address works just fine:
Thanks for the quick response.
I'm running this on AWS EC2 and see the following when I launch the application on server.port=9082. Still cannot reach the running instance when run from the debug/run configuration. If I package it up in a Docker container it behaves just fine. Any thoughts?
Try running with -Djava.net.preferIPv4Stack=true VM Option.
I see the process listening in tcp4 now but still cannot access it from outside the machine....
.....any other ideas?
This is not IntelliJ IDEA specific issue then, contact Amazon support for help.
You were correct. It turned out to be a firewall issue on the VM. Docker was managing (opening/closing) the port when launched in a container. Is that something IntelliJ can do?
IntelliJ IDEA can run certain commands on the remote systems and can also integrate with Docker, so it would depend on how you configure it.