# Not able to index data if one ES goes down in cluster

**URL:** <https://discuss.elastic.co/t/not-able-to-index-data-if-one-es-goes-down-in-cluster/13212>\
**Category:** Elasticsearch\
**Created:** [August 14, 2013, 12:56pm UTC](https://discuss.elastic.co/t/not-able-to-index-data-if-one-es-goes-down-in-cluster/13212 "2013-08-14T12:56:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hanish\_Bansal](https://avatars.discourse-cdn.com/v4/letter/h/e36b37/32.png) [@Hanish\_Bansal](https://discuss.elastic.co/u/Hanish_Bansal)\
**Post date:** [August 14, 2013, 12:56pm UTC](https://discuss.elastic.co/t/not-able-to-index-data-if-one-es-goes-down-in-cluster/13212/1 "2013-08-14T12:56:43Z")

</div>

Hi All,

I am running 3 nodes ElasticSearch cluster. I have 2 shards in one index.

ES nodes details are as:

Node 0 --\> serve shard0 of index livemass\_ipdr\_0  
Node 1 --\> serve shard1 of index livemass\_ipdr\_0  
Node 2 --\> No shard

where livemass\_ipdr\_0 is index name.

I am indexing continuous stream of records, if my node-0 goes down  
(crashed) then i am getting below exception:  
org.elasticsearch.action.NoShardAvailableActionException:  
[livemass\_ipdr\_0][0] No shard available for  
[[livemass\_ipdr\_0][livemass\_ipdr][a84f412d873040c4804898b642b14b95]:  
routing [null]

I am not able to index data if any node goes down which has shard.

How can i resolve this problem?

--  
_Thanks & Regards_  
_Hanish Bansal_

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Rafal\_Kuc\_3](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rafal_kuc_3/32/799_2.png) [@Rafal\_Kuc\_3](https://discuss.elastic.co/u/Rafal_Kuc_3)\
**Post date:** [August 14, 2013, 1:07pm UTC](https://discuss.elastic.co/t/not-able-to-index-data-if-one-es-goes-down-in-cluster/13212/2 "2013-08-14T13:07:59Z")

</div>

Hello!

This is expected behavior - when losing one primary shard (and you have no replicas) your index is not complete and the cluster goes to red health state. This means that indexing request will not be processed. You can for example add replicas for your index, which will allow some of your nodes to crash, but the cluster will still be operational.

For example if you would add another node to your cluster and have 1 replica, you would have something like this:

Node 0 - primary shard 0

Node 1 - primary shard 1

Node 2 - replica of primary shard 0

Node 3 - replica of primary shard 1

Now if your Node 0 would crash, the Node 2 (actually the replica shard) would take over the role of the primary shard and you would still be able to index data.

_--_

Regards,

Rafał Kuć

Sematext :: [http://sematext.com/](http://sematext.com/) _:: Solr - Lucene - ElasticSearch_

Hi All,

I am running 3 nodes ElasticSearch cluster. I have 2 shards in one index.

ES nodes details are as:

Node 0 --\> serve shard0 of index livemass\_ipdr\_0

Node 1 --\> serve shard1 of index livemass\_ipdr\_0

Node 2 --\> No shard

where livemass\_ipdr\_0 is index name.

I am indexing continuous stream of records, if my node-0 goes down (crashed) then i am getting below exception:

org.elasticsearch.action.NoShardAvailableActionException: [livemass\_ipdr\_0][0] No shard available for [[livemass\_ipdr\_0][livemass\_ipdr][a84f412d873040c4804898b642b14b95]: routing [null]

I am not able to index data if any node goes down which has shard.

How can i resolve this problem?

--

**Thanks & Regards**

Hanish Bansal

--

You received this message because you are subscribed to the Google Groups "elasticsearch" group.

To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).

For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Hanish\_Bansal](https://avatars.discourse-cdn.com/v4/letter/h/e36b37/32.png) [@Hanish\_Bansal](https://discuss.elastic.co/u/Hanish_Bansal)\
**Post date:** [August 14, 2013, 1:16pm UTC](https://discuss.elastic.co/t/not-able-to-index-data-if-one-es-goes-down-in-cluster/13212/3 "2013-08-14T13:16:26Z")

</div>

Hi Rafal,

Thanks for quick response !!

I want to know one more thing: Is ES perform same behaviour in case of  
searching the data ?

I mean if one shard not available(in case i have no replicas), can i search  
the data on that index or not?

On Wed, Aug 14, 2013 at 6:37 PM, Rafał Kuć [r.kuc@solr.pl](mailto:r.kuc@solr.pl) wrote:

> Hello!
> 
> This is expected behavior - when losing one primary shard (and you have no  
> replicas) your index is not complete and the cluster goes to red health  
> state. This means that indexing request will not be processed. You can for  
> example add replicas for your index, which will allow some of your nodes to  
> crash, but the cluster will still be operational.
> 
> For example if you would add another node to your cluster and have 1  
> replica, you would have something like this:
> 
> Node 0 - primary shard 0  
> Node 1 - primary shard 1  
> Node 2 - replica of primary shard 0  
> Node 3 - replica of primary shard 1
> 
> Now if your Node 0 would crash, the Node 2 (actually the replica shard)  
> would take over the role of the primary shard and you would still be able  
> to index data.
> 
> \*--  
> Regards,  
> Rafał Kuć  
> Sematext :: _[http://sematext.com/](http://sematext.com/)_ :: Solr - Lucene - Elasticsearch
> 
> - 
> 
> Hi All,
> 
> I am running 3 nodes Elasticsearch cluster. I have 2 shards in one index.
> 
> ES nodes details are as:
> 
> Node 0 --\> serve shard0 of index livemass\_ipdr\_0  
> Node 1 --\> serve shard1 of index livemass\_ipdr\_0  
> Node 2 --\> No shard  
> where livemass\_ipdr\_0 is index name.
> 
> I am indexing continuous stream of records, if my node-0 goes down  
> (crashed) then i am getting below exception:  
> org.elasticsearch.action.NoShardAvailableActionException:  
> [livemass\_ipdr\_0][0] No shard available for  
> [[livemass\_ipdr\_0][livemass\_ipdr][a84f412d873040c4804898b642b14b95]:  
> routing [null]
> 
> I am not able to index data if any node goes down which has shard.
> 
> How can i resolve this problem?
> 
> ## -- \*Thanks & Regards Hanish Bansal \*
> 
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
_Thanks & Regards_  
_Hanish Bansal_

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Rafal\_Kuc\_3](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rafal_kuc_3/32/799_2.png) [@Rafal\_Kuc\_3](https://discuss.elastic.co/u/Rafal_Kuc_3)\
**Post date:** [August 14, 2013, 1:33pm UTC](https://discuss.elastic.co/t/not-able-to-index-data-if-one-es-goes-down-in-cluster/13212/4 "2013-08-14T13:33:55Z")

</div>

Hello!

As for the search - you should still be able to search, however some portion of your data (in your case about 50% of it with the default routing) will be unavailable. When querying, ElasticSearch will tell you how many shards were queried and how many of them were successful or failed, for example:

{

"took" : 115,

"timed\_out" : false,

"\_shards" : {

```
"total" : 5,

"successful" : 4,

"failed" : 0

```

},

"hits" : {

...

}

}

_--_

Regards,

Rafał Kuć

Sematext :: [http://sematext.com/](http://sematext.com/) _:: Solr - Lucene - ElasticSearch_

Hi Rafal,

Thanks for quick response !!

I want to know one more thing: Is ES perform same behaviour in case of searching the data ?

I mean if one shard not available(in case i have no replicas), can i search the data on that index or not?

On Wed, Aug 14, 2013 at 6:37 PM, Rafał Kuć \<[r.kuc@solr.pl](mailto:r.kuc@solr.pl)\> wrote:

Hello!

This is expected behavior - when losing one primary shard (and you have no replicas) your index is not complete and the cluster goes to red health state. This means that indexing request will not be processed. You can for example add replicas for your index, which will allow some of your nodes to crash, but the cluster will still be operational.

For example if you would add another node to your cluster and have 1 replica, you would have something like this:

Node 0 - primary shard 0

Node 1 - primary shard 1

Node 2 - replica of primary shard 0

Node 3 - replica of primary shard 1

Now if your Node 0 would crash, the Node 2 (actually the replica shard) would take over the role of the primary shard and you would still be able to index data.

_--_

Regards,

Rafał Kuć

Sematext :: [http://sematext.com/](http://sematext.com/) _:: Solr - Lucene - ElasticSearch_

Hi All,

I am running 3 nodes ElasticSearch cluster. I have 2 shards in one index.

ES nodes details are as:

Node 0 --\> serve shard0 of index livemass\_ipdr\_0

Node 1 --\> serve shard1 of index livemass\_ipdr\_0

Node 2 --\> No shard

where livemass\_ipdr\_0 is index name.

I am indexing continuous stream of records, if my node-0 goes down (crashed) then i am getting below exception:

org.elasticsearch.action.NoShardAvailableActionException: [livemass\_ipdr\_0][0] No shard available for [[livemass\_ipdr\_0][livemass\_ipdr][a84f412d873040c4804898b642b14b95]: routing [null]

I am not able to index data if any node goes down which has shard.

How can i resolve this problem?

--

**Thanks & Regards**

Hanish Bansal

--

You received this message because you are subscribed to the Google Groups "elasticsearch" group.

To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch%2Bunsubscribe@googlegroups.com).

For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--

You received this message because you are subscribed to the Google Groups "elasticsearch" group.

To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch%2Bunsubscribe@googlegroups.com).

For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--

**Thanks & Regards**

Hanish Bansal

--

You received this message because you are subscribed to the Google Groups "elasticsearch" group.

To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).

For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Hanish\_Bansal](https://avatars.discourse-cdn.com/v4/letter/h/e36b37/32.png) [@Hanish\_Bansal](https://discuss.elastic.co/u/Hanish_Bansal)\
**Post date:** [August 14, 2013, 1:35pm UTC](https://discuss.elastic.co/t/not-able-to-index-data-if-one-es-goes-down-in-cluster/13212/5 "2013-08-14T13:35:52Z")

</div>

Thanks Rafal 🙂

On Wed, Aug 14, 2013 at 7:03 PM, Rafał Kuć [r.kuc@solr.pl](mailto:r.kuc@solr.pl) wrote:

> Hello!
> 
> As for the search - you should still be able to search, however some  
> portion of your data (in your case about 50% of it with the default  
> routing) will be unavailable. When querying, Elasticsearch will tell you  
> how many shards were queried and how many of them were successful or  
> failed, for example:
> 
> {  
> "took" : 115,  
> "timed\_out" : false,  
> "\_shards" : {  
> "total" : 5,  
> "successful" : 4,  
> "failed" : 0  
> },  
> "hits" : {  
> ...
> 
> }  
> }
> 
> _--  
> Regards,  
> Rafał Kuć  
> Sematext :: \*  
> [http://sematext.com/](http://sematext.com/)_ :: Solr - Lucene - Elasticsearch
> 
> - 
> 
> Hi Rafal,
> 
> Thanks for quick response !!
> 
> I want to know one more thing: Is ES perform same behaviour in case of  
> searching the data ?
> 
> I mean if one shard not available(in case i have no replicas), can i  
> search the data on that index or not?
> 
> On Wed, Aug 14, 2013 at 6:37 PM, Rafał Kuć [r.kuc@solr.pl](mailto:r.kuc@solr.pl) wrote:  
> Hello!
> 
> This is expected behavior - when losing one primary shard (and you have no  
> replicas) your index is not complete and the cluster goes to red health  
> state. This means that indexing request will not be processed. You can for  
> example add replicas for your index, which will allow some of your nodes to  
> crash, but the cluster will still be operational.
> 
> For example if you would add another node to your cluster and have 1  
> replica, you would have something like this:
> 
> Node 0 - primary shard 0  
> Node 1 - primary shard 1  
> Node 2 - replica of primary shard 0  
> Node 3 - replica of primary shard 1
> 
> Now if your Node 0 would crash, the Node 2 (actually the replica shard)  
> would take over the role of the primary shard and you would still be able  
> to index data.
> 
> \*--  
> Regards,  
> Rafał Kuć  
> Sematext :: _[http://sematext.com/](http://sematext.com/)_ :: Solr - Lucene - Elasticsearch
> 
> - 
> 
> Hi All,
> 
> I am running 3 nodes Elasticsearch cluster. I have 2 shards in one index.
> 
> ES nodes details are as:
> 
> Node 0 --\> serve shard0 of index livemass\_ipdr\_0  
> Node 1 --\> serve shard1 of index livemass\_ipdr\_0  
> Node 2 --\> No shard  
> where livemass\_ipdr\_0 is index name.
> 
> I am indexing continuous stream of records, if my node-0 goes down  
> (crashed) then i am getting below exception:  
> org.elasticsearch.action.NoShardAvailableActionException:  
> [livemass\_ipdr\_0][0] No shard available for  
> [[livemass\_ipdr\_0][livemass\_ipdr][a84f412d873040c4804898b642b14b95]:  
> routing [null]
> 
> I am not able to index data if any node goes down which has shard.
> 
> How can i resolve this problem?
> 
> --  
> \*Thanks & Regards  
> Hanish Bansal  
> \*--  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> \*Thanks & Regards  
> Hanish Bansal  
> \*--  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
_Thanks & Regards_  
_Hanish Bansal_

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 2:21am UTC](https://discuss.elastic.co/t/not-able-to-index-data-if-one-es-goes-down-in-cluster/13212/6 "2017-07-06T02:21:13Z")

</div>


