I am having some issues getting JMX working on Jetty(9.1.3.v20140225), so I have had a read over the Jetty doco on this.

So I have added the following to the jetty.conf

# ========================================================
# jetty.conf Configuration for jetty.sh script
# --------------------------------------------------------
# This file is used by the jetty.sh script to provide
# extra configuration arguments for the start.jar command
# created by that script.
# Each line in this file becomes an arguement to start.jar
# in addition to those found in the start.ini file
# =======================================================

and I added jmx as part of the start.jar --add-to-start command as the doco told me as part of getting Jconsole connected to Jetty


[mybase]$ java /opt/jetty-dist/start.jar --add-to-start=jmx
INFO: jmx-remote      initialised in ${jetty.base}/start.ini (appended)
INFO: jmx             initialised transitively

Granted when I did this, it only added jmx and not jmx-remote, not sure why but I am hoping someone can let me know why.

In saying all of this from the documentation I have read I have covered off what they want to get this going.


But again what it states is not completely right as far as what I see in the package, hence the reason I have added jetty-jmx-remote in, as that has what the doco is saying should be in jetty-jmx.xml.

In anycase when I fire up Jetty I am seeing in the log file that it is starting

INFO:oejj.ConnectorServer:main: JMX Remote URL: service:jmx:rmi://host:1099/jndi/rmi://host:1099/jmxrmi

I can telnet to 1099 from the server, from my client, I have used nmap just to double check that the port is listen and also seen it in netstat. When I use VisualVM to connect I just get an error.

I have make sure that I have opened up all ports between my network and the location of the Jetty.

Can anyone point me in the right direction to get this going.



Sorted it, needed to manually add this in into the start.ini

## JMX Configuration
## Enable for an open port accessible by remote machines
## Strictly speaking you shouldn't need --exec to use this in most environments.
## If this isn't working, make sure you enable --exec as well

And updated this in the jetty-jmx.xml.

<Call class="java.lang.System" name="setProperty">

Plus did not need to do what I did to the jetty.conf.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.