Reputation: 1149
I have a spring boot application with an embedded Jetty and need to monitor the application using JMX.
I can access JMX infomation with jconsole as long as I start the application inside my windows development environment (JConsole offers the process to connect to on its own) But as soon as a run the application as executable jar with the parameters below, the ports will not be available and I cannot connect with jconsole
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=9010
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.local.only=false
-Djava.rmi.server.hostname=[server ip]
-Djava.rmi.activation.port=9011
netstat -tulpn does neither return port 9010 nor port 9011, and I cannot connect via jconsole.
MBeans etc. are available since I expose the JMX information as JSON, using jolikai, which is working fine but does not fit into our monitoring infrastructure.
Upvotes: 3
Views: 4415
Reputation: 10147
try the following parameters.
set JMX_OPTIONS=-Dcom.sun.management.jmxremote.port=8014
set JMX_OPTIONS= %JMX_OPTIONS% -Dcom.sun.management.jmxremote.ssl=false
set JMX_OPTIONS= %JMX_OPTIONS%-Dcom.sun.management.jmxremote.authenticate=false
set JMX_OPTIONS= %JMX_OPTIONS%-Dcom.sun.management.jmxremote.localConnectorAddress=10.250.0.10
Upvotes: 1