11.05.2016 Views

Apache Solr Reference Guide Covering Apache Solr 6.0

21SiXmO

21SiXmO

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

JMX with JVM parameters. Remove this to disable exposing <strong>Solr</strong> configuration and statistics to JMX. If this is<br />

specified, <strong>Solr</strong> will try to list all available MBeanServers and use the first one to register MBeans.<br />

Configuring an Existing MBeanServer with agentId<br />

The command:<br />

<br />

enables JMX support in <strong>Solr</strong> if and only if an existing MBeanServer is found matching the given agentId. If<br />

multiple servers are found, the first one is used. If none is found, an exception is raised and depending on the<br />

configuration, <strong>Solr</strong> may refuse to start.<br />

Configuring a New MBeanServer<br />

The command:<br />

<br />

creates a new MBeanServer exposed for remote monitoring at the specific service URL. If the<br />

JMXConnectorServer can't be started (probably because the serviceUrl is bad), an exception is thrown.<br />

Example<br />

<strong>Solr</strong>'s sample_techproducts_configs config set uses the simple configuration option. If you start<br />

the example with the necessary JVM system properties to launch an internal MBeanServer, <strong>Solr</strong> will register with<br />

it and you can connect using a tool like jconsole:<br />

1.<br />

Launch the techproducts example with JMX enabled:<br />

bin/solr -e techproducts -Dcom.sun.management.jmxremote<br />

2.<br />

3.<br />

4.<br />

Start jconsole (provided with the Sun JDK in the bin directory).<br />

Connect to the " start.jar" shown in the list of local processes.<br />

Switch to the "MBeans" tab. You should be able to see " solr/techproducts" listed there, at which<br />

point you can drill down and see details of every solr plugin.<br />

Configuring a Remote Connection to <strong>Solr</strong> JMX<br />

If you want to connect to <strong>Solr</strong> remotely, you need to pass in some extra parameters, documented here:<br />

http://docs.oracle.com/javase/8/docs/technotes/guides/management/agent.html<br />

Making JMX connections into machines running behind NATs (e.g. Amazon's EC2 service) is not a<br />

simple task. The java.rmi.server.hostname system property may help, but running jconsole on<br />

the server itself and using a remote desktop is often the simplest solution. See http://web.archive.org/we<br />

b/20130525022506/http://jmsbrdy.com/monitoring-java-applications-running-on-ec2-i.<br />

<strong>Apache</strong> <strong>Solr</strong> <strong>Reference</strong> <strong>Guide</strong> <strong>6.0</strong><br />

542

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!