java - Grails: Connecting jconsole to local process on specified port -
i trying connect jconsole specified port local process. can connect local process using pid not using remote option. using ubuntu 14.04 , jdk 1.7 doing run app.
grails \ -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=xxx.xxx.xxx.xxx \ -dserver.port=8090 \ run-app hostname -i gives me xxx.xxx.xxx.xxx
grails 2.3 , later uses "forked mode" default, jvm running run-app spawns separate process run target application. therefore, rather passing -d options grails should configure them in buildconfig.groovy. find grails.project.fork alternative , add together jvmargs:
grails.project.fork = [ run:[...., jvmargs:['-dcom.sun.management.jmxremote=true', '-dcom.sun.management.jmxremote.port=9999', // etc. ]] ] using -d options on command line doing set jmx connector in grails process, not in application.
java grails jmx jconsole
No comments:
Post a Comment