For some reason, I cannot connect java pid on the production server using VisualVM.
I pass the jvm parameter in setenv.sh file:
export JAVA_OPTS="-Dcom.sun.management.jmxremote=true \
-Dcom.sun.management.jmxremote.port=9999\
-Dcom.sun.management.jmxremote.authenticate=false\
-Dcom.sun.management.jmxremote.ssl=false \
-Djava.rmi.server.hostname=192.168.1.2"
and put this file in the $ / usr / share / tomcat7 / bin / directory. and for authentication, both jmxremote.password and jmxremote.access are placed in the directory "/ var / lib / tomcat7 / conf /".
File permissions :
**$sudo chown tomcat7:tomcat7 /var/lib/tomcat7/conf/jmxremote.*** is ensuring that both file owned by tomcat7
**$ sudo chmod 0600 /var/lib/tomcat7/conf/jmxremote.***
$ sudo cat jmxremote.password
admin alonegk
$ sudo cat jmxremote.access
admin readwrite
The same thing works fine while I did this on the dev server, as well as on my localhost.
Thanks pending.
source
share