On Sat, Jul 11, 2009 at 8:56 AM, J G <skinny_joe...@hotmail.com> wrote:

>
> I have a SOLR JMX connection issue. I am running my JMX MBeanServer through
> Tomcat, meaning I am using Tomcat's MBeanServer rather than any other
> MBeanServer implemenation.
> I am having a hard time trying to figure out the correct JMX Service URL on
> my localhost for the accessing the SOLR MBeans. My current configuration
> consists of the following:
>
> JMX Service url = localhost:9000/jmxrmi
>
> So I have configured JMX to run on port 9000 on tomcat on my localhost and
> using the above service url i can access the tomcat jmx MBeanServer and get
> related JVM object information(e.g. I can access the MemoryMXBean object)
>
> However, I am having a harder time trying to access the SOLR MBeans. First,
> I could have the wrong service URL. Second, I'm confused as to which MBeans
> SOLR provides.
>
>
The service url is of the form --
"service:jmx:rmi:///jndi/rmi://localhost:9999/solr". The following code
snippet is taked from TestJmxMonitoredMap unit test:

        String url = "service:jmx:rmi:///jndi/rmi://localhost:9999/solr";
        JMXServiceURL u = new JMXServiceURL(url);
        connector = JMXConnectorFactory.connect(u);
        mbeanServer = connector.getMBeanServerConnection();

Solr exposes many MBeans, there's one named "searcher" which always refers
to the live SolrIndexSearcher. You can connect with jconsole once to see all
the mbeans.

Hope that helps.

-- 
Regards,
Shalin Shekhar Mangar.

Reply via email to