Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enable remote JMX on Jetty

Tags:

java

jmx

jetty

I'm trying to enable remote JMX on a Jetty 6.1.26 instance running on Windows. I have 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 "connection refused".

I have found several guides on the internet, but no one seems to help. Please note that I'm running Jetty standalone, from the "Jetty-Service.exe" wrapper.

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

like image 825
Luciano Fiandesio Avatar asked Mar 14 '11 10:03

Luciano Fiandesio


1 Answers

I'm answering my own question.

This is the way I have 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
like image 108
Luciano Fiandesio Avatar answered Oct 22 '22 19:10

Luciano Fiandesio