Connections to port 8000 from host machine do not work (connection refused), but local debugging works on the guest machine.
I'm running tomcat 8.5 inside a vagrant box with centos image and self signed cert. The host machine is running windows 7. I can access tomcat's manager application on a secure port 8443 with https, and I can access my webapp also on a secure port 8443 with https. 8443 is not forwarded. Non-secure connections also work on host port 8080, which is forwarded to guest port 80 on vagrant box.
After shutting down tomcat, bin/shutdown.sh
and restarting in debug mode via bin/catalina.sh jpda start
I can attach jdb on port 8000 via jdb -attach 8000
and I can view threads and classes, and after setting a breakpoint and hitting the app on the secure 8443 I can step through the execution.
I have tried forwarding host port 9000 to guest port 8000 in the Vagrantfile, and also tried various connectors set in tomcat's bin/server.xml to allow connections on port 8000. To allow remote connections, I had to add context files in tomcat's conf/Catalina/localhost with the following text for tomcat's manager application as well as my application:
<Context privileged="true" antiResourceLocking="false"
docBase="${catalina.home}/webapps/manager">
<Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="^.*$" />
</Context>
I feel like there is probably something else I need to do for tomcat to allow a remote connection on port 8000, but I'm unable to find it with a couple hours of google searches and experimentation.