1

I have a spring-boot application using undertow as the embedded container. I am trying to enable remote JMX access. The application is deployed as an executable jar, if that makes any difference.

So far, I have tried starting the jar with the -Dcom.sun.management.jmxremote family of properties set, as mentioned here How to access Spring-boot JMX remotely. It doesn't work.

Since undertow is a "sibling" project to WildFly and JBoss AS, I have also tried connecting to jmx endpoint using the http-remoting-jmx protocol (with jboss-cli-client.jar in jconsole's classpath) using a link like this:

service:jmx:http-remoting-jmx://<host>:<port>

as mentioned in https://dzone.com/articles/remote-jmx-access-wildfly-or. This also doesn't work.

I have specified all the spring.jmx properties in the application.properties file like this:

# JMX config
spring.jmx.default-domain=host
spring.jmx.enabled=true
spring.jmx.server=mbeanServer

Running jconsole or visualvm locally works and I can see all the registered JMX Mbeans I care about.

So, my guess is that I am missing something regarding the remote JMX configuration but what is it? Bear in mind, the port I am using for JMX access is available, since I have another application (deployed on tomcat using spring boot) where remote JMX connection is possible.

Thanks in advance for any hints.

Community
  • 1
  • 1
  • What's the exact command that you used when you tried launching your app using System properties to enable JMX? – Andy Wilkinson Feb 24 '16 at 08:14
  • `java -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port= -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -jar application.jar` That's the command that's used. `application.jar` is the spring-boot created executable jar (fatjar). – Anastasios Livogiannis Feb 24 '16 at 08:19
  • did you manage to solve the problem? – Shadi Oct 09 '17 at 07:52

0 Answers0