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.