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 Minu Theresa Thomas <mi...@gmail.com> on 2017/08/31 17:59:39 UTC

How to check if a solr core is down and is ready for a solr re-start

Hello Team,

I have few experiences where restart of a solr node is the only option when
a core goes down. I am trying to automate the restart of a solr server when
a core goes down or the replica is unresponsive over a period of time.

I have a script to check if the cores/ replicas associated with a node is
up. I have two approaches - One is to get the cores from solr CLUSTERSTATUS
API and do a PING on each core. If atleast one core on the node doesn't
repond to ping, then mark that node down and do restart after few retries.
Second is to get the cores from the solr CLUSTERSTATUS API along with its
status. If the status is down, then mark that node down and do a restart
after few retries.

Which is the best way/ recommended approach to check if a core associated
with a node is down and is ready for a solr service restart?

Thanks!

Re: How to check if a solr core is down and is ready for a solr re-start

Posted by Erick Erickson <er...@gmail.com>.
I have to ask a completely different question: "Why are the replicas
down in the first place?" Having to restart the Solr node is a
sledgehammer of a solution, I'd put more effort into finding out why
that's happening in the first place.

Are you getting OOM errors? Any other exception? Is the OOM killer
script executing?

Best,
Erick

On Thu, Aug 31, 2017 at 10:59 AM, Minu Theresa Thomas
<mi...@gmail.com> wrote:
> Hello Team,
>
> I have few experiences where restart of a solr node is the only option when
> a core goes down. I am trying to automate the restart of a solr server when
> a core goes down or the replica is unresponsive over a period of time.
>
> I have a script to check if the cores/ replicas associated with a node is
> up. I have two approaches - One is to get the cores from solr CLUSTERSTATUS
> API and do a PING on each core. If atleast one core on the node doesn't
> repond to ping, then mark that node down and do restart after few retries.
> Second is to get the cores from the solr CLUSTERSTATUS API along with its
> status. If the status is down, then mark that node down and do a restart
> after few retries.
>
> Which is the best way/ recommended approach to check if a core associated
> with a node is down and is ready for a solr service restart?
>
> Thanks!