Enable Remote JMX on Jetty

I am trying to enable remote JMX on a Jetty 6.1.26 instance running on Windows. I tried several approaches, but the result is always the same:

When I try to connect from jconsole to service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi , I got a "connection refused".

I found several manuals on the Internet, but no one seems to help. Note that I run Jetty separately from the Jetty-Service.exe shell.

It would be great if anyone could suggest a way to enable remote JMX on the jetty.

+8
java jetty jmx
source share
2 answers

I answer my question.

Here is how I found to start Jetty with JMX enabled:

 java -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=1099 -jar start.jar etc/jetty-jmx.xml etc/jetty.xml 
+18
source share

What kind of jetty is it? I had to do the same yesterday. Firstly, I had to uncomment the etc / jetty-jmx.xml file in the start.ini file (installation root.) Then I had to add the same jmx system properties that you mentioned in your comment above. If you do not edit start.ini, you will not see Jetty-related MBeans, but you can connect through jConsole.

0
source share

All Articles