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
0
7 comments

server.address works just fine:

0
Avatar
Permanently deleted user

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?

 

0

Try running with -Djava.net.preferIPv4Stack=true VM Option.

0
Avatar
Permanently deleted user

I see the process listening in tcp4 now but still cannot access it from outside the machine....

.....any other ideas?

0

This is not IntelliJ IDEA specific issue then, contact Amazon support for help.

0
Avatar
Permanently deleted user

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?

0

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.

0

Please sign in to leave a comment.