You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Alexey Serba <as...@gmail.com> on 2011/06/24 13:13:41 UTC

Re: Weird issue with solr and jconsole/jmx

I just encountered the same bug - JMX registered beans don't survive
Solr core reloads.

I believe the reason is that when you do core reload
* when the new core is created - it overwrites/over-register beans in
registry (in mbeanserver)
* when the new core is ready in the core register phase CoreContainer
closes old core that results to unregistering jmx beans

As a result there's only one bean in registry
"id=org.apache.solr.search.SolrIndexSearcher,type=Searcher@33099cc
main" left after Core reload. It is because this in the only new
(dynamically named bean) that is created by new core and not
un-registered in oldCore.close. I'll try to reproduce that in test and
file bug in Jira.


On Tue, Mar 16, 2010 at 4:25 AM, Andrew Greenburg <ag...@gmail.com> wrote:
> On Tue, Mar 9, 2010 at 7:44 PM, Chris Hostetter
> <ho...@fucit.org> wrote:
>>
>> : I connected to one of my solr instances with Jconsole today and
>> : noticed that most of the mbeans under the solr hierarchy are missing.
>> : The only thing there was a Searcher, which I had no trouble seeing
>> : attributes for, but the rest of the statistics beans were missing.
>> : They all show up just fine on the stats.jsp page.
>> :
>> : In the past this always worked fine. I did have the core reload due to
>> : config file changes this morning. Could that have caused this?
>>
>> possibly... reloading the core actually causes a whole new SolrCore
>> object (with it's own registry of SOlrInfoMBeans) to be created and then
>> swapped in place of hte previous core ... so perhaps you are still looking
>> at the "stats" of the old core which is no longer in use (and hasn't been
>> garbage collected because the JMX Manager still had a refrence to it for
>> you? ... i'm guessing at this point)
>>
>> did disconnecting from jconsole and reconnecting show you the correct
>> stats?
>
> Disconnecting and reconnecting didn't help. The queryCache and
> documentCache and some others started showing up after I did a commit
> and opened a new searcher, but the whole tree never did fill in.
>
> I'm guessing that the request handler stats stayed associated with the
> old, no longer visible core in JMX since new instances weren't created
> when the core reloaded. Does that make sense? The stats on the web
> stats page continued to be fresh.
>