JMX with Solr

Java Management Extensions (JMX) is a technology that makes it possible for complex systems to be controlled by tools without the systems and tools having any previous knowledge of each other. In essence, it is a standard interface by which complex systems can be viewed and manipulated.

Solr, like any other good citizen of the Java universe, can be controlled via a JMX interface. Once enabled, you can use a JMX client, like jconsole, to connect with Solr.

If you are unfamiliar with JMX, you may find the following overview useful:

Configuring JMX

JMX support is configured by defining a metrics reporter, as described in the section the section JMX Reporter.

If you have an existing MBean server running in Solr’s JVM, or if you start Solr with the system property, Solr will automatically identify its location on startup even if you have not defined a reporter explicitly in solr.xml. You can also define the location of the MBean server with parameters defined in the reporter definition.

Configuring MBean Servers

Versions of Solr prior to 7.0 defined JMX support in solrconfig.xml. This has been changed to the metrics reporter configuration defined above. Parameters for the reporter configuration allow defining the location or address of an existing MBean server.

An MBean server can be started at the time of Solr’s startup by passing the system parameter See Oracle’s documentation for additional settings available to start and control an MBean server at

Configuring a Remote Connection to Solr JMX

If you need to attach a JMX-enabled Java profiling tool, such as JConsole or VisualVM, to a remote Solr server, then you need to enable remote JMX access when starting the Solr server. Simply change the ENABLE_REMOTE_JMX_OPTS property in the or (for Windows) file to true. You’ll also need to choose a port for the JMX RMI connector to bind to, such as 18983. For example, if your Solr include script sets:


The JMX RMI connector will allow Java profiling tools to attach to port 18983. When enabled, the following properties are passed to the JVM when starting Solr: \ \ \ \ \

We don’t recommend enabling remote JMX access in production, but it can sometimes be useful when doing performance and user-acceptance testing prior to going into production.

For more information about these settings, see:

Making JMX connections into machines running behind NATs (e.g., Amazon’s EC2 service) is not a simple task. The java.rmi.server.hostname system property may help, but running jconsole on the server itself and using a remote desktop is often the simplest solution. See