java - what else do I need to configure jconsole on server -


i want use jmx jconsole.here relevant line in .sh file

## enable jconsole access java_opts="$java_opts -dcom.sun.management.jmxremote  -dcom.sun.management.jmxremote.port=9999 -dcom.sun.management.jmxremote.password.file=/usr/pkg/tomcat-rusznak/jmxremote.password -dcom.sun.management.jmxremote.access.file=/usr/pkg/tomcat-rusznak/jmxremote.access -djava.rmi.server.hostname=ba.accra.com" 

here content of jmxremote.password file

monitorrole password controlrole password 

here content of jmxremote.access file

monitorrole   readonly controlrole   readwrite \               create javax.management.monitor.*,javax.management.timer.* \               unregister 

but when provide correct hostname, port , try log in monitorrole - password pair this:

connection failed: connection refused. 

why?

i checked lot of similar questions, example know stackoverflow need include hostname (-djava.rmi.server.hostname=ba.accra.com) too, not solve problem, misssing. else need?

edited

i dont know if relevant or not add had no problem launch jconsole locally (although connection refused) can not launch on server!

jconsole: not found 

ok, actually, following options enabled default:

  • com.sun.management.jmxremote.authenticate
  • com.sun.management.jmxremote.ssl

and explained here, if have ssl enabled, need run jconsole ssl configured properly. think should try disable ssl adding option in script launch application: com.sun.management.jmxremote.ssl=false


Comments