java - Cannot connect to localhost using service:jmx/rmi//..... When Using Visual VM with Tomcat within Vagrant -
i've got vagrant vm running tomcat , wanted connect visualvm monitor performance of vm during tests.
i followed this guide setup configuration recommended creating setenv.sh script , placing within /usr/share/tomcat7/bin. found setenv wasn't being run, placed following in /etc/tomcat/tomcat.conf instead:
java_opts="-dcom.sun.management.jmxremote=true - dcom.sun.management.jmxremote.port=9901 -dcom.sun.management.jmxremote.ssl=false
m.sun.management.jmxremote.authenticate=false -djava.rmi.server.hostname=localhost -dcom.sun.management.jmxremote.rmi.port=9909"
i believe config working when running following, can see ports active:
[vagrant@localhost ~]$ netstat -lntu | grep 99 tcp6 0 0 :::9901 :::* listen tcp6 0 0 :::9909 :::* listen
here config vagrant file:
# ports enabled visualvm work. config.vm.network "forwarded_port", guest: 9901, host: 9905 config.vm.network "forwarded_port", guest: 9909, host: 9907
however after entering following config, or close variations of (have tried 127.0.0.1 & enabling "do not require ssl" " ".
i have tried ports 9901, 9905, 9909.
any thoughts on how solve this?
Comments
Post a Comment