Remote JMX options for Maven debug
Posted by davidnewcomb on 14 Jun 2021 in Java
When trying to workout why a maven build is failing, I used these options to switch on JMX support inside Maven.
Once Maven was running I connected jconsole
to read the stats.
Log lines have their thread name:
MAVEN_OPTS=" -Dorg.slf4j.simpleLogger.showThreadName=true"
Port to listen on:
MAVEN_OPTS+=" -Dcom.sun.management.jmxremote.port=9010"
Allow remote connections:
MAVEN_OPTS+=" -Dcom.sun.management.jmxremote.local.only=false"
Switch off authentication:
MAVEN_OPTS+=" -Dcom.sun.management.jmxremote.authenticate=false"
Make sure app binds to the external interface:
MAVEN_OPTS+=" -Djava.rmi.server.hostname=vmware"
Make sure no security stuff gets in the way:
MAVEN_OPTS+=" -Djava.security.policy=all.policy"
Switch off SSL, so there is no complaining about certificates:
MAVEN_OPTS+=" -Dcom.sun.management.jmxremote.ssl=false"
No feedback yet
Form is loading...