# Unassigned Shards Problem

**URL:** <https://discuss.elastic.co/t/unassigned-shards-problem/17680>\
**Category:** Elasticsearch\
**Created:** [May 22, 2014, 4:22pm UTC](https://discuss.elastic.co/t/unassigned-shards-problem/17680 "2014-05-22T16:22:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brian\_Wilkins](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brian_wilkins/32/1241_2.png) [@Brian\_Wilkins](https://discuss.elastic.co/u/Brian_Wilkins)\
**Post date:** [May 22, 2014, 4:22pm UTC](https://discuss.elastic.co/t/unassigned-shards-problem/17680/1 "2014-05-22T16:22:45Z")

</div>

I have five nodes : Two Master Nodes, One Balancer Node, One Workhorse  
Node, and One Coordinator Node.

I am shipping events from logstash, redis, to elasticsearch.

At the moment, my cluster is RED. The shards are created but no index is  
created. I used to get an index like logstash.2014-05-22, but not anymore.

I deleted all my data, Cluster health goes GREEN.

However, as soon as data is sent from logstash -\> redis -\> elasticsearch,  
my cluster health goes RED. I end up with unassigned shards. In my  
/var/log/elasticsearch/logstash.log on my master, I see this in the log:

[2014-05-22 12:03:20,599][INFO][cluster.metadata] [Bora]  
[logstash-2014.05.22] creating index, cause [auto(bulk api)], shards  
[5]/[1], mappings [_default_]

On my master, this is the configuration:

cluster:  
name: logstash  
routing:  
allocation:  
awareness:  
attributes: rack  
node:  
data: true  
master: true

curl -XGET '[http://localhost:9200/\_cluster/health?pretty=true](http://localhost:9200/_cluster/health?pretty=true)'  
{  
"cluster\_name" : "logstash",  
"status" : "red",  
"timed\_out" : false,  
"number\_of\_nodes" : 5,  
"number\_of\_data\_nodes" : 3,  
"active\_primary\_shards" : 0,  
"active\_shards" : 0,  
"relocating\_shards" : 0,  
"initializing\_shards" : 0,  
"unassigned\_shards" : 10  
}

Is there an incorrect setting? I also installed ElasticHQ. It tells me the  
same information.

Brian

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/03c5974b-ae50-4f1c-9ba3-4ef94b564323%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/03c5974b-ae50-4f1c-9ba3-4ef94b564323%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 22, 2014, 9:10pm UTC](https://discuss.elastic.co/t/unassigned-shards-problem/17680/2 "2014-05-22T21:10:25Z")

</div>

It does create an index, it says so in the log - [logstash-2014.05.22]  
creating index - it's jut not assigning things.

You've set routing.allocation.awareness.attribute, but have you set the  
node value, ie node.rack?  
See

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

Regards,  
Mark Walkom

Infrastructure Engineer  
Campaign Monitor  
email: [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)  
web: [www.campaignmonitor.com](http://www.campaignmonitor.com)

On 23 May 2014 02:22, Brian Wilkins [bwilkins@gmail.com](mailto:bwilkins@gmail.com) wrote:

> I have five nodes : Two Master Nodes, One Balancer Node, One Workhorse  
> Node, and One Coordinator Node.
> 
> I am shipping events from logstash, redis, to elasticsearch.
> 
> At the moment, my cluster is RED. The shards are created but no index is  
> created. I used to get an index like logstash.2014-05-22, but not anymore.
> 
> I deleted all my data, Cluster health goes GREEN.
> 
> However, as soon as data is sent from logstash -\> redis -\> elasticsearch,  
> my cluster health goes RED. I end up with unassigned shards. In my  
> /var/log/elasticsearch/logstash.log on my master, I see this in the log:
> 
> [2014-05-22 12:03:20,599][INFO][cluster.metadata] [Bora]  
> [logstash-2014.05.22] creating index, cause [auto(bulk api)], shards  
> [5]/[1], mappings [_default_]
> 
> On my master, this is the configuration:
> 
> cluster:  
> name: logstash  
> routing:  
> allocation:  
> awareness:  
> attributes: rack  
> node:  
> data: true  
> master: true
> 
> curl -XGET '[http://localhost:9200/\_cluster/health?pretty=true](http://localhost:9200/_cluster/health?pretty=true)'  
> {  
> "cluster\_name" : "logstash",  
> "status" : "red",  
> "timed\_out" : false,  
> "number\_of\_nodes" : 5,  
> "number\_of\_data\_nodes" : 3,  
> "active\_primary\_shards" : 0,  
> "active\_shards" : 0,  
> "relocating\_shards" : 0,  
> "initializing\_shards" : 0,  
> "unassigned\_shards" : 10  
> }
> 
> Is there an incorrect setting? I also installed ElasticHQ. It tells me the  
> same information.
> 
> Brian
> 
> --  
> 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).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/03c5974b-ae50-4f1c-9ba3-4ef94b564323%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/03c5974b-ae50-4f1c-9ba3-4ef94b564323%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/03c5974b-ae50-4f1c-9ba3-4ef94b564323%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/03c5974b-ae50-4f1c-9ba3-4ef94b564323%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAEM624YGofrc55ND%3DXb3QW9cu799R0AKjB6\_5Nmse\_rMc9qcAw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEM624YGofrc55ND%3DXb3QW9cu799R0AKjB6_5Nmse_rMc9qcAw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Brian\_Wilkins](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brian_wilkins/32/1241_2.png) [@Brian\_Wilkins](https://discuss.elastic.co/u/Brian_Wilkins)\
**Post date:** [May 22, 2014, 10:38pm UTC](https://discuss.elastic.co/t/unassigned-shards-problem/17680/3 "2014-05-22T22:38:21Z")

</div>

Thanks for your reply. I set the node.rack to rack\_one on all the nodes as  
a test. In ElasticHQ, on the right it shows no indices. It is empty. In my  
master, I see that the nodes are identifying with rack\_one (all of them).

Any other clues?

Thanks

Brian

On Thursday, May 22, 2014 5:10:25 PM UTC-4, Mark Walkom wrote:

> It does create an index, it says so in the log - [logstash-2014.05.22]  
> creating index - it's jut not assigning things.
> 
> You've set routing.allocation.awareness.attribute, but have you set the  
> node value, ie node.rack?  
> See  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-cluster.html#allocation-awareness)
> 
> Regards,  
> Mark Walkom
> 
> Infrastructure Engineer  
> Campaign Monitor  
> email: [ma...@campaignmonitor.com](mailto:ma...@campaignmonitor.com) \<javascript:\>  
> web: [www.campaignmonitor.com](http://www.campaignmonitor.com)
> 
> On 23 May 2014 02:22, Brian Wilkins \<[bwil...@gmail.com](mailto:bwil...@gmail.com) \<javascript:\>\>wrote:
> 
> > I have five nodes : Two Master Nodes, One Balancer Node, One Workhorse  
> > Node, and One Coordinator Node.
> > 
> > I am shipping events from logstash, redis, to elasticsearch.
> > 
> > At the moment, my cluster is RED. The shards are created but no index is  
> > created. I used to get an index like logstash.2014-05-22, but not anymore.
> > 
> > I deleted all my data, Cluster health goes GREEN.
> > 
> > However, as soon as data is sent from logstash -\> redis -\> elasticsearch,  
> > my cluster health goes RED. I end up with unassigned shards. In my  
> > /var/log/elasticsearch/logstash.log on my master, I see this in the log:
> > 
> > [2014-05-22 12:03:20,599][INFO][cluster.metadata] [Bora]  
> > [logstash-2014.05.22] creating index, cause [auto(bulk api)], shards  
> > [5]/[1], mappings [_default_]
> > 
> > On my master, this is the configuration:
> > 
> > cluster:  
> > name: logstash  
> > routing:  
> > allocation:  
> > awareness:  
> > attributes: rack  
> > node:  
> > data: true  
> > master: true
> > 
> > curl -XGET '[http://localhost:9200/\_cluster/health?pretty=true](http://localhost:9200/_cluster/health?pretty=true)'  
> > {  
> > "cluster\_name" : "logstash",  
> > "status" : "red",  
> > "timed\_out" : false,  
> > "number\_of\_nodes" : 5,  
> > "number\_of\_data\_nodes" : 3,  
> > "active\_primary\_shards" : 0,  
> > "active\_shards" : 0,  
> > "relocating\_shards" : 0,  
> > "initializing\_shards" : 0,  
> > "unassigned\_shards" : 10  
> > }
> > 
> > Is there an incorrect setting? I also installed ElasticHQ. It tells me  
> > the same information.
> > 
> > Brian
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/03c5974b-ae50-4f1c-9ba3-4ef94b564323%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/03c5974b-ae50-4f1c-9ba3-4ef94b564323%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/03c5974b-ae50-4f1c-9ba3-4ef94b564323%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/03c5974b-ae50-4f1c-9ba3-4ef94b564323%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/5bd4c3d5-3be5-44ef-a8a6-5dba6876130c%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/5bd4c3d5-3be5-44ef-a8a6-5dba6876130c%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Brian\_Wilkins](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brian_wilkins/32/1241_2.png) [@Brian\_Wilkins](https://discuss.elastic.co/u/Brian_Wilkins)\
**Post date:** [May 22, 2014, 10:56pm UTC](https://discuss.elastic.co/t/unassigned-shards-problem/17680/4 "2014-05-22T22:56:24Z")

</div>

Went back and read the page again. So I made one master, workhorse, and balancer with rackid of rack\_two for testing. One master shows rackid of rack\_one. All nodes were restarted. The shards are still unassigned. Also,the indices in ElasticHQ are empty.

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/4ac7b65e-3bc7-4f51-85e5-65ca3719880d%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4ac7b65e-3bc7-4f51-85e5-65ca3719880d%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Brian\_Wilkins](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brian_wilkins/32/1241_2.png) [@Brian\_Wilkins](https://discuss.elastic.co/u/Brian_Wilkins)\
**Post date:** [May 23, 2014, 10:19am UTC](https://discuss.elastic.co/t/unassigned-shards-problem/17680/5 "2014-05-23T10:19:53Z")

</div>

I removed all the extra allocation stuff. When I did that, the shards were  
all propogated. Health is green again.

On Thursday, May 22, 2014 6:56:24 PM UTC-4, Brian Wilkins wrote:

> Went back and read the page again. So I made one master, workhorse, and  
> balancer with rackid of rack\_two for testing. One master shows rackid of  
> rack\_one. All nodes were restarted. The shards are still unassigned.  
> Also,the indices in ElasticHQ are empty.

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/b6e26a5c-7709-40e2-ae06-7c94e830ae2c%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b6e26a5c-7709-40e2-ae06-7c94e830ae2c%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:27am UTC](https://discuss.elastic.co/t/unassigned-shards-problem/17680/6 "2017-07-06T01:27:26Z")

</div>


