# Why all replicas are unassigned?

**URL:** <https://discuss.elastic.co/t/why-all-replicas-are-unassigned/19727>\
**Category:** Elasticsearch\
**Created:** [September 11, 2014, 1:31am UTC](https://discuss.elastic.co/t/why-all-replicas-are-unassigned/19727 "2014-09-11T01:31:23Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sephen\_Xu](https://avatars.discourse-cdn.com/v4/letter/s/ed8c4c/32.png) [@Sephen\_Xu](https://discuss.elastic.co/u/Sephen_Xu)\
**Post date:** [September 11, 2014, 1:31am UTC](https://discuss.elastic.co/t/why-all-replicas-are-unassigned/19727/1 "2014-09-11T01:31:23Z")

</div>

Hello,

I startup 4 nodes on 2 machines, and when create index, all replicas are  
unassigned.

{  
"cluster\_name" : "elasticsearch\_log",  
"status" : "yellow",  
"timed\_out" : false,  
"number\_of\_nodes" : 4,  
"number\_of\_data\_nodes" : 4,  
"active\_primary\_shards" : 22,  
"active\_shards" : 22,  
"relocating\_shards" : 0,  
"initializing\_shards" : 0,  
"unassigned\_shards" : 22  
}

How can I do?

--  
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/bfae28b3-1ef3-4151-bf9e-17fad6d5f16f%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/bfae28b3-1ef3-4151-bf9e-17fad6d5f16f%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Pablo\_Musa](https://avatars.discourse-cdn.com/v4/letter/p/34f0e0/32.png) [@Pablo\_Musa](https://discuss.elastic.co/u/Pablo_Musa)\
**Post date:** [September 11, 2014, 2:48am UTC](https://discuss.elastic.co/t/why-all-replicas-are-unassigned/19727/2 "2014-09-11T02:48:44Z")

</div>

I would check for the Java version on each machine.  
I had the same problem on a running cluster when adding a node, and  
unfortunately the last node had Java 1.7.0\_65 instead of 1.7.0\_55  
(recommended version and the version of my other machines).

I did not have the time to create a post explaining the whole problem. But,  
in summary, I ran a default install script using apt-get and, by default,  
they use the "latest" Java version.

One big problem for me is that they do not support versioned jdk  
installation and I could not find a deb package for 1.7.0\_55. Maybe someone  
here can help with this.

The "problematic" command:  
apt-get install openjdk-7-jre-headless -y

Regards,  
Pablo Musa

On Wednesday, September 10, 2014 10:31:24 PM UTC-3, Sephen Xu wrote:

> Hello,
> 
> I startup 4 nodes on 2 machines, and when create index, all replicas are  
> unassigned.
> 
> {  
> "cluster\_name" : "elasticsearch\_log",  
> "status" : "yellow",  
> "timed\_out" : false,  
> "number\_of\_nodes" : 4,  
> "number\_of\_data\_nodes" : 4,  
> "active\_primary\_shards" : 22,  
> "active\_shards" : 22,  
> "relocating\_shards" : 0,  
> "initializing\_shards" : 0,  
> "unassigned\_shards" : 22  
> }
> 
> How can I do?

--  
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/67b8560d-1d41-4005-8f23-32f604b218c8%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/67b8560d-1d41-4005-8f23-32f604b218c8%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Sephen\_Xu](https://avatars.discourse-cdn.com/v4/letter/s/ed8c4c/32.png) [@Sephen\_Xu](https://discuss.elastic.co/u/Sephen_Xu)\
**Post date:** [September 11, 2014, 3:03am UTC](https://discuss.elastic.co/t/why-all-replicas-are-unassigned/19727/3 "2014-09-11T03:03:34Z")

</div>

Thank you for your reply, the java version on each machine are same --  
1.6.0\_45, and the elasticsearch version is 1.1.2.

在 2014年9月11日星期四UTC+8上午10时48分44秒，pabli...@gmail.com写道：

> I would check for the Java version on each machine.  
> I had the same problem on a running cluster when adding a node, and  
> unfortunately the last node had Java 1.7.0\_65 instead of 1.7.0\_55  
> (recommended version and the version of my other machines).
> 
> I did not have the time to create a post explaining the whole problem.  
> But, in summary, I ran a default install script using apt-get and, by  
> default, they use the "latest" Java version.
> 
> One big problem for me is that they do not support versioned jdk  
> installation and I could not find a deb package for 1.7.0\_55. Maybe someone  
> here can help with this.
> 
> The "problematic" command:  
> apt-get install openjdk-7-jre-headless -y
> 
> Regards,  
> Pablo Musa
> 
> On Wednesday, September 10, 2014 10:31:24 PM UTC-3, Sephen Xu wrote:
> 
> > Hello,
> > 
> > I startup 4 nodes on 2 machines, and when create index, all replicas are  
> > unassigned.
> > 
> > {  
> > "cluster\_name" : "elasticsearch\_log",  
> > "status" : "yellow",  
> > "timed\_out" : false,  
> > "number\_of\_nodes" : 4,  
> > "number\_of\_data\_nodes" : 4,  
> > "active\_primary\_shards" : 22,  
> > "active\_shards" : 22,  
> > "relocating\_shards" : 0,  
> > "initializing\_shards" : 0,  
> > "unassigned\_shards" : 22  
> > }
> > 
> > How can I do?

--  
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/8a7a7fcc-9a93-4ae8-9b26-8cdd9715eb7b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8a7a7fcc-9a93-4ae8-9b26-8cdd9715eb7b%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Pablo\_Musa](https://avatars.discourse-cdn.com/v4/letter/p/34f0e0/32.png) [@Pablo\_Musa](https://discuss.elastic.co/u/Pablo_Musa)\
**Post date:** [September 11, 2014, 3:11am UTC](https://discuss.elastic.co/t/why-all-replicas-are-unassigned/19727/4 "2014-09-11T03:11:40Z")

</div>

googled: elasticsearch java 1.6.0\_45 shard unassigned

[Replication fails with indeterminate error in basic configuration · Issue #3145 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/3145) (search for 1.6)  
[Redirecting to Google Groups](https://groups.google.com/forum/#!msg/elasticsearch/MSrKvfgKwy0/Tfk6nhlqYxYJ)

For all that I have researched it points to Java version problem.  
You could try some things as settings replicas to 0 and putting it back to  
1 or forcing allocation (do not remember the exact command, but google for  
unassigned chards and you will find it), but I do not think that they will  
work.

I really would try installing a new version of Java and running  
Elasticsearch using it.

Regards,  
Pablo

2014-09-11 0:03 GMT-03:00 Sephen Xu [imxuus@gmail.com](mailto:imxuus@gmail.com):

> Thank you for your reply, the java version on each machine are same --  
> 1.6.0\_45, and the elasticsearch version is 1.1.2.
> 
> 在 2014年9月11日星期四UTC+8上午10时48分44秒，pabli...@gmail.com写道：
> 
> > I would check for the Java version on each machine.  
> > I had the same problem on a running cluster when adding a node, and  
> > unfortunately the last node had Java 1.7.0\_65 instead of 1.7.0\_55  
> > (recommended version and the version of my other machines).
> > 
> > I did not have the time to create a post explaining the whole problem.  
> > But, in summary, I ran a default install script using apt-get and, by  
> > default, they use the "latest" Java version.
> > 
> > One big problem for me is that they do not support versioned jdk  
> > installation and I could not find a deb package for 1.7.0\_55. Maybe someone  
> > here can help with this.
> > 
> > The "problematic" command:  
> > apt-get install openjdk-7-jre-headless -y
> > 
> > Regards,  
> > Pablo Musa
> > 
> > On Wednesday, September 10, 2014 10:31:24 PM UTC-3, Sephen Xu wrote:
> > 
> > > Hello,
> > > 
> > > I startup 4 nodes on 2 machines, and when create index, all replicas are  
> > > unassigned.
> > > 
> > > {  
> > > "cluster\_name" : "elasticsearch\_log",  
> > > "status" : "yellow",  
> > > "timed\_out" : false,  
> > > "number\_of\_nodes" : 4,  
> > > "number\_of\_data\_nodes" : 4,  
> > > "active\_primary\_shards" : 22,  
> > > "active\_shards" : 22,  
> > > "relocating\_shards" : 0,  
> > > "initializing\_shards" : 0,  
> > > "unassigned\_shards" : 22  
> > > }
> > > 
> > > How can I do?
> > 
> > --  
> > You received this message because you are subscribed to a topic in the  
> > Google Groups "elasticsearch" group.  
> > To unsubscribe from this topic, visit  
> > [https://groups.google.com/d/topic/elasticsearch/kn3UHQgQKJk/unsubscribe](https://groups.google.com/d/topic/elasticsearch/kn3UHQgQKJk/unsubscribe).  
> > To unsubscribe from this group and all its topics, 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/8a7a7fcc-9a93-4ae8-9b26-8cdd9715eb7b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8a7a7fcc-9a93-4ae8-9b26-8cdd9715eb7b%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/8a7a7fcc-9a93-4ae8-9b26-8cdd9715eb7b%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/8a7a7fcc-9a93-4ae8-9b26-8cdd9715eb7b%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/CAF6PhFJXPbYbXMXPwKSXxdfETpXZO1n4PyBNbsstERgQoSa-XQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAF6PhFJXPbYbXMXPwKSXxdfETpXZO1n4PyBNbsstERgQoSa-XQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Sephen\_Xu](https://avatars.discourse-cdn.com/v4/letter/s/ed8c4c/32.png) [@Sephen\_Xu](https://discuss.elastic.co/u/Sephen_Xu)\
**Post date:** [September 11, 2014, 5:00am UTC](https://discuss.elastic.co/t/why-all-replicas-are-unassigned/19727/5 "2014-09-11T05:00:23Z")

</div>

Hi,Pablo,  
I have tried settings replicas to zero and putting it back to 1, it does  
not work as you say.

And finally, I found, when I turn  
cluster.routing.allocation.same\_shard.host: true to false, the replicas was  
work well. But on other cluster, this setting does not affect use. And the  
official document is to describe this set:  
cluster.routing.allocation.same\_shard.hostAllows to perform a check to  
prevent allocation of multiple instances of the same shard on a single  
host, based on host name and host address. Defaults to false, meaning that  
no check is performed by default. This setting only applies if multiple  
nodes are started on the same machine.  
Why is this so?

(Sorry for my bad English : )

在 2014年9月11日星期四UTC+8上午11时12分09秒，Pablo Musa写道：

> googled: elasticsearch java 1.6.0\_45 shard unassigned
> 
> [Replication fails with indeterminate error in basic configuration · Issue #3145 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/3145) (search for  
> 1.6)
> 
> [Redirecting to Google Groups](https://groups.google.com/forum/#!msg/elasticsearch/MSrKvfgKwy0/Tfk6nhlqYxYJ)
> 
> For all that I have researched it points to Java version problem.  
> You could try some things as settings replicas to 0 and putting it back to  
> 1 or forcing allocation (do not remember the exact command, but google for  
> unassigned chards and you will find it), but I do not think that they will  
> work.
> 
> I really would try installing a new version of Java and running  
> Elasticsearch using it.
> 
> Regards,  
> Pablo
> 
> 2014-09-11 0:03 GMT-03:00 Sephen Xu \<[imx...@gmail.com](mailto:imx...@gmail.com) \<javascript:\>\>:
> 
> > Thank you for your reply, the java version on each machine are same --  
> > 1.6.0\_45, and the elasticsearch version is 1.1.2.
> > 
> > 在 2014年9月11日星期四UTC+8上午10时48分44秒，pabli...@gmail.com写道：
> > 
> > > I would check for the Java version on each machine.  
> > > I had the same problem on a running cluster when adding a node, and  
> > > unfortunately the last node had Java 1.7.0\_65 instead of 1.7.0\_55  
> > > (recommended version and the version of my other machines).
> > > 
> > > I did not have the time to create a post explaining the whole problem.  
> > > But, in summary, I ran a default install script using apt-get and, by  
> > > default, they use the "latest" Java version.
> > > 
> > > One big problem for me is that they do not support versioned jdk  
> > > installation and I could not find a deb package for 1.7.0\_55. Maybe someone  
> > > here can help with this.
> > > 
> > > The "problematic" command:  
> > > apt-get install openjdk-7-jre-headless -y
> > > 
> > > Regards,  
> > > Pablo Musa
> > > 
> > > On Wednesday, September 10, 2014 10:31:24 PM UTC-3, Sephen Xu wrote:
> > > 
> > > > Hello,
> > > > 
> > > > I startup 4 nodes on 2 machines, and when create index, all replicas  
> > > > are unassigned.
> > > > 
> > > > {  
> > > > "cluster\_name" : "elasticsearch\_log",  
> > > > "status" : "yellow",  
> > > > "timed\_out" : false,  
> > > > "number\_of\_nodes" : 4,  
> > > > "number\_of\_data\_nodes" : 4,  
> > > > "active\_primary\_shards" : 22,  
> > > > "active\_shards" : 22,  
> > > > "relocating\_shards" : 0,  
> > > > "initializing\_shards" : 0,  
> > > > "unassigned\_shards" : 22  
> > > > }
> > > > 
> > > > How can I do?
> > > 
> > > --  
> > > You received this message because you are subscribed to a topic in the  
> > > Google Groups "elasticsearch" group.  
> > > To unsubscribe from this topic, visit  
> > > [https://groups.google.com/d/topic/elasticsearch/kn3UHQgQKJk/unsubscribe](https://groups.google.com/d/topic/elasticsearch/kn3UHQgQKJk/unsubscribe).  
> > > To unsubscribe from this group and all its topics, 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/8a7a7fcc-9a93-4ae8-9b26-8cdd9715eb7b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8a7a7fcc-9a93-4ae8-9b26-8cdd9715eb7b%40googlegroups.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/8a7a7fcc-9a93-4ae8-9b26-8cdd9715eb7b%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/8a7a7fcc-9a93-4ae8-9b26-8cdd9715eb7b%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/f20b0c5a-00c9-42cb-94b7-5ecb59f83904%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f20b0c5a-00c9-42cb-94b7-5ecb59f83904%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Pablo\_Musa](https://avatars.discourse-cdn.com/v4/letter/p/34f0e0/32.png) [@Pablo\_Musa](https://discuss.elastic.co/u/Pablo_Musa)\
**Post date:** [September 11, 2014, 5:25am UTC](https://discuss.elastic.co/t/why-all-replicas-are-unassigned/19727/6 "2014-09-11T05:25:35Z")

</div>

> But on other cluster,

Here you mean cluster or node?

I could not understand, Is everything working as you wanted?

> This setting only applies if multiple nodes are started on the same  
> machine.

Just by curiosity, are you running nodes on the same machine?

Regards,  
Pablo

2014-09-11 2:00 GMT-03:00 Sephen Xu [imxuus@gmail.com](mailto:imxuus@gmail.com):

> Hi,Pablo,  
> I have tried settings replicas to zero and putting it back to 1, it does  
> not work as you say.
> 
> And finally, I found, when I turn  
> cluster.routing.allocation.same\_shard.host: true to false, the replicas was  
> work well. But on other cluster, this setting does not affect use. And the  
> official document is to describe this set:  
> cluster.routing.allocation.same\_shard.hostAllows to perform a check to  
> prevent allocation of multiple instances of the same shard on a single  
> host, based on host name and host address. Defaults to false, meaning  
> that no check is performed by default. This setting only applies if  
> multiple nodes are started on the same machine.  
> Why is this so?
> 
> (Sorry for my bad English : )
> 
> 在 2014年9月11日星期四UTC+8上午11时12分09秒，Pablo Musa写道：
> 
> > googled: elasticsearch java 1.6.0\_45 shard unassigned
> > 
> > [Replication fails with indeterminate error in basic configuration · Issue #3145 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/3145) (search for  
> > 1.6)  
> > [Redirecting to Google Groups](https://groups.google.com/forum/#!msg/elasticsearch/)  
> > MSrKvfgKwy0/Tfk6nhlqYxYJ
> > 
> > For all that I have researched it points to Java version problem.  
> > You could try some things as settings replicas to 0 and putting it back  
> > to 1 or forcing allocation (do not remember the exact command, but google  
> > for unassigned chards and you will find it), but I do not think that they  
> > will work.
> > 
> > I really would try installing a new version of Java and running  
> > Elasticsearch using it.
> > 
> > Regards,  
> > Pablo
> > 
> > 2014-09-11 0:03 GMT-03:00 Sephen Xu [imx...@gmail.com](mailto:imx...@gmail.com):
> > 
> > > Thank you for your reply, the java version on each machine are same --  
> > > 1.6.0\_45, and the elasticsearch version is 1.1.2.
> > > 
> > > 在 2014年9月11日星期四UTC+8上午10时48分44秒，pabli...@gmail.com写道：
> > > 
> > > > I would check for the Java version on each machine.  
> > > > I had the same problem on a running cluster when adding a node, and  
> > > > unfortunately the last node had Java 1.7.0\_65 instead of 1.7.0\_55  
> > > > (recommended version and the version of my other machines).
> > > > 
> > > > I did not have the time to create a post explaining the whole problem.  
> > > > But, in summary, I ran a default install script using apt-get and, by  
> > > > default, they use the "latest" Java version.
> > > > 
> > > > One big problem for me is that they do not support versioned jdk  
> > > > installation and I could not find a deb package for 1.7.0\_55. Maybe someone  
> > > > here can help with this.
> > > > 
> > > > The "problematic" command:  
> > > > apt-get install openjdk-7-jre-headless -y
> > > > 
> > > > Regards,  
> > > > Pablo Musa
> > > > 
> > > > On Wednesday, September 10, 2014 10:31:24 PM UTC-3, Sephen Xu wrote:
> > > > 
> > > > > Hello,
> > > > > 
> > > > > I startup 4 nodes on 2 machines, and when create index, all replicas  
> > > > > are unassigned.
> > > > > 
> > > > > {  
> > > > > "cluster\_name" : "elasticsearch\_log",  
> > > > > "status" : "yellow",  
> > > > > "timed\_out" : false,  
> > > > > "number\_of\_nodes" : 4,  
> > > > > "number\_of\_data\_nodes" : 4,  
> > > > > "active\_primary\_shards" : 22,  
> > > > > "active\_shards" : 22,  
> > > > > "relocating\_shards" : 0,  
> > > > > "initializing\_shards" : 0,  
> > > > > "unassigned\_shards" : 22  
> > > > > }
> > > > > 
> > > > > How can I do?
> > > > 
> > > > --  
> > > > You received this message because you are subscribed to a topic in the  
> > > > Google Groups "elasticsearch" group.  
> > > > To unsubscribe from this topic, visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > > topic/elasticsearch/kn3UHQgQKJk/unsubscribe.  
> > > > To unsubscribe from this group and all its topics, send an email to  
> > > > [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > > msgid/elasticsearch/8a7a7fcc-9a93-4ae8-9b26-8cdd9715eb7b%  
> > > > [40googlegroups.com](http://40googlegroups.com)  
> > > > [https://groups.google.com/d/msgid/elasticsearch/8a7a7fcc-9a93-4ae8-9b26-8cdd9715eb7b%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/8a7a7fcc-9a93-4ae8-9b26-8cdd9715eb7b%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 a topic in the  
> > Google Groups "elasticsearch" group.  
> > To unsubscribe from this topic, visit  
> > [https://groups.google.com/d/topic/elasticsearch/kn3UHQgQKJk/unsubscribe](https://groups.google.com/d/topic/elasticsearch/kn3UHQgQKJk/unsubscribe).  
> > To unsubscribe from this group and all its topics, 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/f20b0c5a-00c9-42cb-94b7-5ecb59f83904%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f20b0c5a-00c9-42cb-94b7-5ecb59f83904%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/f20b0c5a-00c9-42cb-94b7-5ecb59f83904%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/f20b0c5a-00c9-42cb-94b7-5ecb59f83904%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/CAF6PhFKef4%2BScgcPdiM0Z3SaQQRvvn-m-gTjycG8gJ%2BTuvB%3Dww%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAF6PhFKef4%2BScgcPdiM0Z3SaQQRvvn-m-gTjycG8gJ%2BTuvB%3Dww%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Sephen\_Xu](https://avatars.discourse-cdn.com/v4/letter/s/ed8c4c/32.png) [@Sephen\_Xu](https://discuss.elastic.co/u/Sephen_Xu)\
**Post date:** [September 11, 2014, 5:48am UTC](https://discuss.elastic.co/t/why-all-replicas-are-unassigned/19727/7 "2014-09-11T05:48:32Z")

</div>

uh...'other cluster' is means that another 2 machine build a four node  
cluster, and it work fine with cluster.routing.allocation.same\_shard.host:  
true.

And the problem clusters can work fine  
with cluster.routing.allocation.same\_shard.host: false.

Now I got the results I wanted, but I fear shards and its replicas will be  
assigned to the same machine if I don't  
set cluster.routing.allocation.same\_shard.host to true.

在 2014年9月11日星期四UTC+8下午1时26分10秒，Pablo Musa写道：

> > But on other cluster,
> 
> Here you mean cluster or node?
> 
> I could not understand, Is everything working as you wanted?
> 
> > This setting only applies if multiple nodes are started on the same  
> > machine.
> 
> Just by curiosity, are you running nodes on the same machine?
> 
> Regards,  
> Pablo
> 
> 2014-09-11 2:00 GMT-03:00 Sephen Xu \<[imx...@gmail.com](mailto:imx...@gmail.com) \<javascript:\>\>:
> 
> > Hi,Pablo,  
> > I have tried settings replicas to zero and putting it back to 1, it does  
> > not work as you say.
> > 
> > And finally, I found, when I turn  
> > cluster.routing.allocation.same\_shard.host: true to false, the replicas was  
> > work well. But on other cluster, this setting does not affect use. And the  
> > official document is to describe this set:  
> > cluster.routing.allocation.same\_shard.hostAllows to perform a check to  
> > prevent allocation of multiple instances of the same shard on a single  
> > host, based on host name and host address. Defaults to false, meaning  
> > that no check is performed by default. This setting only applies if  
> > multiple nodes are started on the same machine.  
> > Why is this so?
> > 
> > (Sorry for my bad English : )
> > 
> > 在 2014年9月11日星期四UTC+8上午11时12分09秒，Pablo Musa写道：
> > 
> > > googled: elasticsearch java 1.6.0\_45 shard unassigned
> > > 
> > > [Replication fails with indeterminate error in basic configuration · Issue #3145 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/3145) (search for  
> > > 1.6)  
> > > [Redirecting to Google Groups](https://groups.google.com/forum/#!msg/elasticsearch/)  
> > > MSrKvfgKwy0/Tfk6nhlqYxYJ
> > > 
> > > For all that I have researched it points to Java version problem.  
> > > You could try some things as settings replicas to 0 and putting it back  
> > > to 1 or forcing allocation (do not remember the exact command, but google  
> > > for unassigned chards and you will find it), but I do not think that they  
> > > will work.
> > > 
> > > I really would try installing a new version of Java and running  
> > > Elasticsearch using it.
> > > 
> > > Regards,  
> > > Pablo
> > > 
> > > 2014-09-11 0:03 GMT-03:00 Sephen Xu [imx...@gmail.com](mailto:imx...@gmail.com):
> > > 
> > > > Thank you for your reply, the java version on each machine are same --  
> > > > 1.6.0\_45, and the elasticsearch version is 1.1.2.
> > > > 
> > > > 在 2014年9月11日星期四UTC+8上午10时48分44秒，pabli...@gmail.com写道：
> > > > 
> > > > > I would check for the Java version on each machine.  
> > > > > I had the same problem on a running cluster when adding a node, and  
> > > > > unfortunately the last node had Java 1.7.0\_65 instead of 1.7.0\_55  
> > > > > (recommended version and the version of my other machines).
> > > > > 
> > > > > I did not have the time to create a post explaining the whole problem.  
> > > > > But, in summary, I ran a default install script using apt-get and, by  
> > > > > default, they use the "latest" Java version.
> > > > > 
> > > > > One big problem for me is that they do not support versioned jdk  
> > > > > installation and I could not find a deb package for 1.7.0\_55. Maybe someone  
> > > > > here can help with this.
> > > > > 
> > > > > The "problematic" command:  
> > > > > apt-get install openjdk-7-jre-headless -y
> > > > > 
> > > > > Regards,  
> > > > > Pablo Musa
> > > > > 
> > > > > On Wednesday, September 10, 2014 10:31:24 PM UTC-3, Sephen Xu wrote:
> > > > > 
> > > > > > Hello,
> > > > > > 
> > > > > > I startup 4 nodes on 2 machines, and when create index, all replicas  
> > > > > > are unassigned.
> > > > > > 
> > > > > > {  
> > > > > > "cluster\_name" : "elasticsearch\_log",  
> > > > > > "status" : "yellow",  
> > > > > > "timed\_out" : false,  
> > > > > > "number\_of\_nodes" : 4,  
> > > > > > "number\_of\_data\_nodes" : 4,  
> > > > > > "active\_primary\_shards" : 22,  
> > > > > > "active\_shards" : 22,  
> > > > > > "relocating\_shards" : 0,  
> > > > > > "initializing\_shards" : 0,  
> > > > > > "unassigned\_shards" : 22  
> > > > > > }
> > > > > > 
> > > > > > How can I do?
> > > > > 
> > > > > --  
> > > > > You received this message because you are subscribed to a topic in the  
> > > > > Google Groups "elasticsearch" group.  
> > > > > To unsubscribe from this topic, visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > > > topic/elasticsearch/kn3UHQgQKJk/unsubscribe.  
> > > > > To unsubscribe from this group and all its topics, send an email to  
> > > > > [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > > > msgid/elasticsearch/8a7a7fcc-9a93-4ae8-9b26-8cdd9715eb7b%  
> > > > > [40googlegroups.com](http://40googlegroups.com)  
> > > > > [https://groups.google.com/d/msgid/elasticsearch/8a7a7fcc-9a93-4ae8-9b26-8cdd9715eb7b%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/8a7a7fcc-9a93-4ae8-9b26-8cdd9715eb7b%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 a topic in the  
> > > Google Groups "elasticsearch" group.  
> > > To unsubscribe from this topic, visit  
> > > [https://groups.google.com/d/topic/elasticsearch/kn3UHQgQKJk/unsubscribe](https://groups.google.com/d/topic/elasticsearch/kn3UHQgQKJk/unsubscribe).  
> > > To unsubscribe from this group and all its topics, 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/f20b0c5a-00c9-42cb-94b7-5ecb59f83904%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f20b0c5a-00c9-42cb-94b7-5ecb59f83904%40googlegroups.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/f20b0c5a-00c9-42cb-94b7-5ecb59f83904%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/f20b0c5a-00c9-42cb-94b7-5ecb59f83904%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/daa31c18-a809-40be-a202-53561bdd9ea0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/daa31c18-a809-40be-a202-53561bdd9ea0%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![johtani](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/johtani/32/44956_2.png) [@johtani](https://discuss.elastic.co/u/johtani)\
**Post date:** [September 11, 2014, 6:19am UTC](https://discuss.elastic.co/t/why-all-replicas-are-unassigned/19727/8 "2014-09-11T06:19:01Z")

</div>

Hi

Did you use some properties of prefix  
"cluster.routing.allocation.awareness"?

2014-09-11 14:48 GMT+09:00 Sephen Xu [imxuus@gmail.com](mailto:imxuus@gmail.com):

> uh...'other cluster' is means that another 2 machine build a four node  
> cluster, and it work fine with cluster.routing.allocation.same\_shard.host:  
> true.
> 
> And the problem clusters can work fine with cluster.routing.allocation.same\_shard.host:  
> false.
> 
> Now I got the results I wanted, but I fear shards and its replicas will be  
> assigned to the same machine if I don't set cluster.routing.allocation.same\_shard.host  
> to true.
> 
> 在 2014年9月11日星期四UTC+8下午1时26分10秒，Pablo Musa写道：
> 
> > > But on other cluster,
> > 
> > Here you mean cluster or node?
> > 
> > I could not understand, Is everything working as you wanted?
> > 
> > > This setting only applies if multiple nodes are started on the same  
> > > machine.
> > 
> > Just by curiosity, are you running nodes on the same machine?
> > 
> > Regards,  
> > Pablo
> > 
> > 2014-09-11 2:00 GMT-03:00 Sephen Xu [imx...@gmail.com](mailto:imx...@gmail.com):
> > 
> > > Hi,Pablo,  
> > > I have tried settings replicas to zero and putting it back to 1, it does  
> > > not work as you say.
> > > 
> > > And finally, I found, when I turn cluster.routing.allocation.same\_shard.host:  
> > > true to false, the replicas was work well. But on other cluster, this  
> > > setting does not affect use. And the official document is to describe this  
> > > set:  
> > > cluster.routing.allocation.same\_shard.hostAllows to perform a check to  
> > > prevent allocation of multiple instances of the same shard on a single  
> > > host, based on host name and host address. Defaults to false, meaning  
> > > that no check is performed by default. This setting only applies if  
> > > multiple nodes are started on the same machine.  
> > > Why is this so?
> > > 
> > > (Sorry for my bad English : )
> > > 
> > > 在 2014年9月11日星期四UTC+8上午11时12分09秒，Pablo Musa写道：
> > > 
> > > > googled: elasticsearch java 1.6.0\_45 shard unassigned
> > > > 
> > > > [Replication fails with indeterminate error in basic configuration · Issue #3145 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/3145) (search for  
> > > > 1.6)  
> > > > [Redirecting to Google Groups](https://groups.google.com/forum/#!msg/elasticsearch/MSrKvfgK)  
> > > > wy0/Tfk6nhlqYxYJ
> > > > 
> > > > For all that I have researched it points to Java version problem.  
> > > > You could try some things as settings replicas to 0 and putting it back  
> > > > to 1 or forcing allocation (do not remember the exact command, but google  
> > > > for unassigned chards and you will find it), but I do not think that they  
> > > > will work.
> > > > 
> > > > I really would try installing a new version of Java and running  
> > > > Elasticsearch using it.
> > > > 
> > > > Regards,  
> > > > Pablo
> > > > 
> > > > 2014-09-11 0:03 GMT-03:00 Sephen Xu [imx...@gmail.com](mailto:imx...@gmail.com):
> > > > 
> > > > > Thank you for your reply, the java version on each machine are same --  
> > > > > 1.6.0\_45, and the elasticsearch version is 1.1.2.
> > > > > 
> > > > > 在 2014年9月11日星期四UTC+8上午10时48分44秒，pabli...@gmail.com写道：
> > > > > 
> > > > > > I would check for the Java version on each machine.  
> > > > > > I had the same problem on a running cluster when adding a node, and  
> > > > > > unfortunately the last node had Java 1.7.0\_65 instead of 1.7.0\_55  
> > > > > > (recommended version and the version of my other machines).
> > > > > > 
> > > > > > I did not have the time to create a post explaining the whole  
> > > > > > problem. But, in summary, I ran a default install script using apt-get and,  
> > > > > > by default, they use the "latest" Java version.
> > > > > > 
> > > > > > One big problem for me is that they do not support versioned jdk  
> > > > > > installation and I could not find a deb package for 1.7.0\_55. Maybe someone  
> > > > > > here can help with this.
> > > > > > 
> > > > > > The "problematic" command:  
> > > > > > apt-get install openjdk-7-jre-headless -y
> > > > > > 
> > > > > > Regards,  
> > > > > > Pablo Musa
> > > > > > 
> > > > > > On Wednesday, September 10, 2014 10:31:24 PM UTC-3, Sephen Xu wrote:
> > > > > > 
> > > > > > > Hello,
> > > > > > > 
> > > > > > > I startup 4 nodes on 2 machines, and when create index, all replicas  
> > > > > > > are unassigned.
> > > > > > > 
> > > > > > > {  
> > > > > > > "cluster\_name" : "elasticsearch\_log",  
> > > > > > > "status" : "yellow",  
> > > > > > > "timed\_out" : false,  
> > > > > > > "number\_of\_nodes" : 4,  
> > > > > > > "number\_of\_data\_nodes" : 4,  
> > > > > > > "active\_primary\_shards" : 22,  
> > > > > > > "active\_shards" : 22,  
> > > > > > > "relocating\_shards" : 0,  
> > > > > > > "initializing\_shards" : 0,  
> > > > > > > "unassigned\_shards" : 22  
> > > > > > > }
> > > > > > > 
> > > > > > > How can I do?
> > > > > > 
> > > > > > --  
> > > > > > You received this message because you are subscribed to a topic in the  
> > > > > > Google Groups "elasticsearch" group.  
> > > > > > To unsubscribe from this topic, visit [https://groups.google.com/d/to](https://groups.google.com/d/to)  
> > > > > > pic/elasticsearch/kn3UHQgQKJk/unsubscribe.  
> > > > > > To unsubscribe from this group and all its topics, send an email to  
> > > > > > [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > > > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > > > > msgid/elasticsearch/8a7a7fcc-9a93-4ae8-9b26-8cdd9715eb7b%40goo  
> > > > > > [glegroups.com](http://glegroups.com)  
> > > > > > [https://groups.google.com/d/msgid/elasticsearch/8a7a7fcc-9a93-4ae8-9b26-8cdd9715eb7b%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/8a7a7fcc-9a93-4ae8-9b26-8cdd9715eb7b%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 a topic in the  
> > > > Google Groups "elasticsearch" group.  
> > > > To unsubscribe from this topic, visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > > topic/elasticsearch/kn3UHQgQKJk/unsubscribe.  
> > > > To unsubscribe from this group and all its topics, send an email to  
> > > > [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > > msgid/elasticsearch/f20b0c5a-00c9-42cb-94b7-5ecb59f83904%  
> > > > [40googlegroups.com](http://40googlegroups.com)  
> > > > [https://groups.google.com/d/msgid/elasticsearch/f20b0c5a-00c9-42cb-94b7-5ecb59f83904%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/f20b0c5a-00c9-42cb-94b7-5ecb59f83904%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/daa31c18-a809-40be-a202-53561bdd9ea0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/daa31c18-a809-40be-a202-53561bdd9ea0%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/daa31c18-a809-40be-a202-53561bdd9ea0%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/daa31c18-a809-40be-a202-53561bdd9ea0%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

## --

Jun Ohtani  
blog : [http://blog.johtani.info](http://blog.johtani.info)

--  
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/CAPW8A5waC%3D3kG2GXW7RTPAJ-x-TFBwvMs9iiXxSV2JuxMYJnnA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAPW8A5waC%3D3kG2GXW7RTPAJ-x-TFBwvMs9iiXxSV2JuxMYJnnA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Sephen\_Xu](https://avatars.discourse-cdn.com/v4/letter/s/ed8c4c/32.png) [@Sephen\_Xu](https://discuss.elastic.co/u/Sephen_Xu)\
**Post date:** [September 12, 2014, 1:43am UTC](https://discuss.elastic.co/t/why-all-replicas-are-unassigned/19727/9 "2014-09-12T01:43:17Z")

</div>

Hi,  
Not set .  
🙂

2014-09-11 14:19 GMT+08:00 Jun Ohtani [johtani@gmail.com](mailto:johtani@gmail.com):

> Hi
> 
> Did you use some properties of prefix  
> "cluster.routing.allocation.awareness"?
> 
> 2014-09-11 14:48 GMT+09:00 Sephen Xu [imxuus@gmail.com](mailto:imxuus@gmail.com):
> 
> > uh...'other cluster' is means that another 2 machine build a four node  
> > cluster, and it work fine with cluster.routing.allocation.same\_shard.host:  
> > true.
> > 
> > And the problem clusters can work fine with cluster.routing.allocation.same\_shard.host:  
> > false.
> > 
> > Now I got the results I wanted, but I fear shards and its replicas will  
> > be assigned to the same machine if I don't set cluster.routing.allocation.same\_shard.host  
> > to true.
> > 
> > 在 2014年9月11日星期四UTC+8下午1时26分10秒，Pablo Musa写道：
> > 
> > > > But on other cluster,
> > > 
> > > Here you mean cluster or node?
> > > 
> > > I could not understand, Is everything working as you wanted?
> > > 
> > > > This setting only applies if multiple nodes are started on the same  
> > > > machine.
> > > 
> > > Just by curiosity, are you running nodes on the same machine?
> > > 
> > > Regards,  
> > > Pablo
> > > 
> > > 2014-09-11 2:00 GMT-03:00 Sephen Xu [imx...@gmail.com](mailto:imx...@gmail.com):
> > > 
> > > > Hi,Pablo,  
> > > > I have tried settings replicas to zero and putting it back to 1, it  
> > > > does not work as you say.
> > > > 
> > > > And finally, I found, when I turn cluster.routing.allocation.same\_shard.host:  
> > > > true to false, the replicas was work well. But on other cluster, this  
> > > > setting does not affect use. And the official document is to describe this  
> > > > set:  
> > > > cluster.routing.allocation.same\_shard.hostAllows to perform a check to  
> > > > prevent allocation of multiple instances of the same shard on a single  
> > > > host, based on host name and host address. Defaults to false, meaning  
> > > > that no check is performed by default. This setting only applies if  
> > > > multiple nodes are started on the same machine.  
> > > > Why is this so?
> > > > 
> > > > (Sorry for my bad English : )
> > > > 
> > > > 在 2014年9月11日星期四UTC+8上午11时12分09秒，Pablo Musa写道：
> > > > 
> > > > > googled: elasticsearch java 1.6.0\_45 shard unassigned
> > > > > 
> > > > > [Replication fails with indeterminate error in basic configuration · Issue #3145 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/3145) (search  
> > > > > for 1.6)  
> > > > > [Redirecting to Google Groups](https://groups.google.com/forum/#!msg/elasticsearch/MSrKvfgK)  
> > > > > wy0/Tfk6nhlqYxYJ
> > > > > 
> > > > > For all that I have researched it points to Java version problem.  
> > > > > You could try some things as settings replicas to 0 and putting it  
> > > > > back to 1 or forcing allocation (do not remember the exact command, but  
> > > > > google for unassigned chards and you will find it), but I do not think that  
> > > > > they will work.
> > > > > 
> > > > > I really would try installing a new version of Java and running  
> > > > > Elasticsearch using it.
> > > > > 
> > > > > Regards,  
> > > > > Pablo
> > > > > 
> > > > > 2014-09-11 0:03 GMT-03:00 Sephen Xu [imx...@gmail.com](mailto:imx...@gmail.com):
> > > > > 
> > > > > > Thank you for your reply, the java version on each machine are same  
> > > > > > -- 1.6.0\_45, and the elasticsearch version is 1.1.2.
> > > > > > 
> > > > > > 在 2014年9月11日星期四UTC+8上午10时48分44秒，pabli...@gmail.com写道：
> > > > > > 
> > > > > > > I would check for the Java version on each machine.  
> > > > > > > I had the same problem on a running cluster when adding a node, and  
> > > > > > > unfortunately the last node had Java 1.7.0\_65 instead of 1.7.0\_55  
> > > > > > > (recommended version and the version of my other machines).
> > > > > > > 
> > > > > > > I did not have the time to create a post explaining the whole  
> > > > > > > problem. But, in summary, I ran a default install script using apt-get and,  
> > > > > > > by default, they use the "latest" Java version.
> > > > > > > 
> > > > > > > One big problem for me is that they do not support versioned jdk  
> > > > > > > installation and I could not find a deb package for 1.7.0\_55. Maybe someone  
> > > > > > > here can help with this.
> > > > > > > 
> > > > > > > The "problematic" command:  
> > > > > > > apt-get install openjdk-7-jre-headless -y
> > > > > > > 
> > > > > > > Regards,  
> > > > > > > Pablo Musa
> > > > > > > 
> > > > > > > On Wednesday, September 10, 2014 10:31:24 PM UTC-3, Sephen Xu wrote:
> > > > > > > 
> > > > > > > > Hello,
> > > > > > > > 
> > > > > > > > I startup 4 nodes on 2 machines, and when create index, all  
> > > > > > > > replicas are unassigned.
> > > > > > > > 
> > > > > > > > {  
> > > > > > > > "cluster\_name" : "elasticsearch\_log",  
> > > > > > > > "status" : "yellow",  
> > > > > > > > "timed\_out" : false,  
> > > > > > > > "number\_of\_nodes" : 4,  
> > > > > > > > "number\_of\_data\_nodes" : 4,  
> > > > > > > > "active\_primary\_shards" : 22,  
> > > > > > > > "active\_shards" : 22,  
> > > > > > > > "relocating\_shards" : 0,  
> > > > > > > > "initializing\_shards" : 0,  
> > > > > > > > "unassigned\_shards" : 22  
> > > > > > > > }
> > > > > > > > 
> > > > > > > > How can I do?
> > > > > > > 
> > > > > > > --  
> > > > > > > You received this message because you are subscribed to a topic in  
> > > > > > > the Google Groups "elasticsearch" group.  
> > > > > > > To unsubscribe from this topic, visit [https://groups.google.com/d/to](https://groups.google.com/d/to)  
> > > > > > > pic/elasticsearch/kn3UHQgQKJk/unsubscribe.  
> > > > > > > To unsubscribe from this group and all its topics, send an email to  
> > > > > > > [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > > > > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > > > > > msgid/elasticsearch/8a7a7fcc-9a93-4ae8-9b26-8cdd9715eb7b%40goo  
> > > > > > > [glegroups.com](http://glegroups.com)  
> > > > > > > [https://groups.google.com/d/msgid/elasticsearch/8a7a7fcc-9a93-4ae8-9b26-8cdd9715eb7b%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/8a7a7fcc-9a93-4ae8-9b26-8cdd9715eb7b%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 a topic in the  
> > > > > Google Groups "elasticsearch" group.  
> > > > > To unsubscribe from this topic, visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > > > topic/elasticsearch/kn3UHQgQKJk/unsubscribe.  
> > > > > To unsubscribe from this group and all its topics, send an email to  
> > > > > [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > > > msgid/elasticsearch/f20b0c5a-00c9-42cb-94b7-5ecb59f83904%  
> > > > > [40googlegroups.com](http://40googlegroups.com)  
> > > > > [https://groups.google.com/d/msgid/elasticsearch/f20b0c5a-00c9-42cb-94b7-5ecb59f83904%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/f20b0c5a-00c9-42cb-94b7-5ecb59f83904%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/daa31c18-a809-40be-a202-53561bdd9ea0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/daa31c18-a809-40be-a202-53561bdd9ea0%40googlegroups.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/daa31c18-a809-40be-a202-53561bdd9ea0%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/daa31c18-a809-40be-a202-53561bdd9ea0%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > .
> > 
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> ## --
> 
> Jun Ohtani  
> blog : [http://blog.johtani.info](http://blog.johtani.info)
> 
> --  
> You received this message because you are subscribed to a topic in the  
> Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit  
> [https://groups.google.com/d/topic/elasticsearch/kn3UHQgQKJk/unsubscribe](https://groups.google.com/d/topic/elasticsearch/kn3UHQgQKJk/unsubscribe).  
> To unsubscribe from this group and all its topics, 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/CAPW8A5waC%3D3kG2GXW7RTPAJ-x-TFBwvMs9iiXxSV2JuxMYJnnA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAPW8A5waC%3D3kG2GXW7RTPAJ-x-TFBwvMs9iiXxSV2JuxMYJnnA%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/elasticsearch/CAPW8A5waC%3D3kG2GXW7RTPAJ-x-TFBwvMs9iiXxSV2JuxMYJnnA%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAPW8A5waC%3D3kG2GXW7RTPAJ-x-TFBwvMs9iiXxSV2JuxMYJnnA%40mail.gmail.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/CACte%3DQGZNXSAx3tASR-3YjY1gtROkO35Om6acd55J5idVmgeVw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CACte%3DQGZNXSAx3tASR-3YjY1gtROkO35Om6acd55J5idVmgeVw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Raja\_Akhtar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raja_akhtar/32/772_2.png) [@Raja\_Akhtar](https://discuss.elastic.co/u/Raja_Akhtar)\
**Post date:** [April 15, 2015, 8:31am UTC](https://discuss.elastic.co/t/why-all-replicas-are-unassigned/19727/10 "2015-04-15T08:31:36Z")

</div>

Hi,

Did you find the solution to this. I have the EXACT same issue. 2 Servers  
with 4 nodes (2 nodes on each), and only when  
"cluster.routing.allocation.same\_shard.host: true", all replicas stay  
unassigned and no new replica shards get created.

On Friday, 12 September 2014 02:43:29 UTC+1, Sephen Xu wrote:

> Hi,  
> Not set .  
> 🙂
> 
> 2014-09-11 14:19 GMT+08:00 Jun Ohtani \<[joh...@gmail.com](mailto:joh...@gmail.com) \<javascript:\>\>:
> 
> > Hi
> > 
> > Did you use some properties of prefix  
> > "cluster.routing.allocation.awareness"?
> > 
> > 2014-09-11 14:48 GMT+09:00 Sephen Xu \<[imx...@gmail.com](mailto:imx...@gmail.com) \<javascript:\>\>:
> > 
> > > uh...'other cluster' is means that another 2 machine build a four node  
> > > cluster, and it work fine with cluster.routing.allocation.same\_shard.host:  
> > > true.
> > > 
> > > And the problem clusters can work fine with cluster.routing.allocation.same\_shard.host:  
> > > false.
> > > 
> > > Now I got the results I wanted, but I fear shards and its replicas will  
> > > be assigned to the same machine if I don't set cluster.routing.allocation.same\_shard.host  
> > > to true.
> > > 
> > > 在 2014年9月11日星期四UTC+8下午1时26分10秒，Pablo Musa写道：
> > > 
> > > > > But on other cluster,
> > > > 
> > > > Here you mean cluster or node?
> > > > 
> > > > I could not understand, Is everything working as you wanted?
> > > > 
> > > > > This setting only applies if multiple nodes are started on the same  
> > > > > machine.
> > > > 
> > > > Just by curiosity, are you running nodes on the same machine?
> > > > 
> > > > Regards,  
> > > > Pablo
> > > > 
> > > > 2014-09-11 2:00 GMT-03:00 Sephen Xu [imx...@gmail.com](mailto:imx...@gmail.com):
> > > > 
> > > > > Hi,Pablo,  
> > > > > I have tried settings replicas to zero and putting it back to 1, it  
> > > > > does not work as you say.
> > > > > 
> > > > > And finally, I found, when I turn cluster.routing.allocation.same\_shard.host:  
> > > > > true to false, the replicas was work well. But on other cluster, this  
> > > > > setting does not affect use. And the official document is to describe this  
> > > > > set:  
> > > > > cluster.routing.allocation.same\_shard.hostAllows to perform a check  
> > > > > to prevent allocation of multiple instances of the same shard on a single  
> > > > > host, based on host name and host address. Defaults to false, meaning  
> > > > > that no check is performed by default. This setting only applies if  
> > > > > multiple nodes are started on the same machine.  
> > > > > Why is this so?
> > > > > 
> > > > > (Sorry for my bad English : )
> > > > > 
> > > > > 在 2014年9月11日星期四UTC+8上午11时12分09秒，Pablo Musa写道：
> > > > > 
> > > > > > googled: elasticsearch java 1.6.0\_45 shard unassigned
> > > > > > 
> > > > > > [Replication fails with indeterminate error in basic configuration · Issue #3145 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/3145) (search  
> > > > > > for 1.6)  
> > > > > > [Redirecting to Google Groups](https://groups.google.com/forum/#!msg/elasticsearch/MSrKvfgK)  
> > > > > > wy0/Tfk6nhlqYxYJ
> > > > > > 
> > > > > > For all that I have researched it points to Java version problem.  
> > > > > > You could try some things as settings replicas to 0 and putting it  
> > > > > > back to 1 or forcing allocation (do not remember the exact command, but  
> > > > > > google for unassigned chards and you will find it), but I do not think that  
> > > > > > they will work.
> > > > > > 
> > > > > > I really would try installing a new version of Java and running  
> > > > > > Elasticsearch using it.
> > > > > > 
> > > > > > Regards,  
> > > > > > Pablo
> > > > > > 
> > > > > > 2014-09-11 0:03 GMT-03:00 Sephen Xu [imx...@gmail.com](mailto:imx...@gmail.com):
> > > > > > 
> > > > > > > Thank you for your reply, the java version on each machine are same  
> > > > > > > -- 1.6.0\_45, and the elasticsearch version is 1.1.2.
> > > > > > > 
> > > > > > > 在 2014年9月11日星期四UTC+8上午10时48分44秒，pabli...@gmail.com写道：
> > > > > > > 
> > > > > > > > I would check for the Java version on each machine.  
> > > > > > > > I had the same problem on a running cluster when adding a node, and  
> > > > > > > > unfortunately the last node had Java 1.7.0\_65 instead of 1.7.0\_55  
> > > > > > > > (recommended version and the version of my other machines).
> > > > > > > > 
> > > > > > > > I did not have the time to create a post explaining the whole  
> > > > > > > > problem. But, in summary, I ran a default install script using apt-get and,  
> > > > > > > > by default, they use the "latest" Java version.
> > > > > > > > 
> > > > > > > > One big problem for me is that they do not support versioned jdk  
> > > > > > > > installation and I could not find a deb package for 1.7.0\_55. Maybe someone  
> > > > > > > > here can help with this.
> > > > > > > > 
> > > > > > > > The "problematic" command:  
> > > > > > > > apt-get install openjdk-7-jre-headless -y
> > > > > > > > 
> > > > > > > > Regards,  
> > > > > > > > Pablo Musa
> > > > > > > > 
> > > > > > > > On Wednesday, September 10, 2014 10:31:24 PM UTC-3, Sephen Xu wrote:
> > > > > > > > 
> > > > > > > > > Hello,
> > > > > > > > > 
> > > > > > > > > I startup 4 nodes on 2 machines, and when create index, all  
> > > > > > > > > replicas are unassigned.
> > > > > > > > > 
> > > > > > > > > {  
> > > > > > > > > "cluster\_name" : "elasticsearch\_log",  
> > > > > > > > > "status" : "yellow",  
> > > > > > > > > "timed\_out" : false,  
> > > > > > > > > "number\_of\_nodes" : 4,  
> > > > > > > > > "number\_of\_data\_nodes" : 4,  
> > > > > > > > > "active\_primary\_shards" : 22,  
> > > > > > > > > "active\_shards" : 22,  
> > > > > > > > > "relocating\_shards" : 0,  
> > > > > > > > > "initializing\_shards" : 0,  
> > > > > > > > > "unassigned\_shards" : 22  
> > > > > > > > > }
> > > > > > > > > 
> > > > > > > > > How can I do?
> > > > > > > > 
> > > > > > > > --  
> > > > > > > > You received this message because you are subscribed to a topic in  
> > > > > > > > the Google Groups "elasticsearch" group.  
> > > > > > > > To unsubscribe from this topic, visit [https://groups.google.com/d/to](https://groups.google.com/d/to)  
> > > > > > > > pic/elasticsearch/kn3UHQgQKJk/unsubscribe.  
> > > > > > > > To unsubscribe from this group and all its topics, send an email to  
> > > > > > > > [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > > > > > > To view this discussion on the web visit  
> > > > > > > > [https://groups.google.com/d/msgid/elasticsearch/8a7a7fcc-9a9](https://groups.google.com/d/msgid/elasticsearch/8a7a7fcc-9a9)  
> > > > > > > > 3-4ae8-9b26-8cdd9715eb7b%[40googlegroups.com](http://40googlegroups.com)  
> > > > > > > > [https://groups.google.com/d/msgid/elasticsearch/8a7a7fcc-9a93-4ae8-9b26-8cdd9715eb7b%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/8a7a7fcc-9a93-4ae8-9b26-8cdd9715eb7b%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 a topic in the  
> > > > > > Google Groups "elasticsearch" group.  
> > > > > > To unsubscribe from this topic, visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > > > > topic/elasticsearch/kn3UHQgQKJk/unsubscribe.  
> > > > > > To unsubscribe from this group and all its topics, send an email to  
> > > > > > [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > > > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > > > > msgid/elasticsearch/f20b0c5a-00c9-42cb-94b7-5ecb59f83904%  
> > > > > > [40googlegroups.com](http://40googlegroups.com)  
> > > > > > [https://groups.google.com/d/msgid/elasticsearch/f20b0c5a-00c9-42cb-94b7-5ecb59f83904%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/f20b0c5a-00c9-42cb-94b7-5ecb59f83904%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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > > > To view this discussion on the web visit  
> > > > [https://groups.google.com/d/msgid/elasticsearch/daa31c18-a809-40be-a202-53561bdd9ea0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/daa31c18-a809-40be-a202-53561bdd9ea0%40googlegroups.com)  
> > > > [https://groups.google.com/d/msgid/elasticsearch/daa31c18-a809-40be-a202-53561bdd9ea0%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/daa31c18-a809-40be-a202-53561bdd9ea0%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > > .
> > > 
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > ## --
> > 
> > Jun Ohtani  
> > blog : [http://blog.johtani.info](http://blog.johtani.info)
> > 
> > --  
> > You received this message because you are subscribed to a topic in the  
> > Google Groups "elasticsearch" group.  
> > To unsubscribe from this topic, visit  
> > [https://groups.google.com/d/topic/elasticsearch/kn3UHQgQKJk/unsubscribe](https://groups.google.com/d/topic/elasticsearch/kn3UHQgQKJk/unsubscribe).  
> > To unsubscribe from this group and all its topics, 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/CAPW8A5waC%3D3kG2GXW7RTPAJ-x-TFBwvMs9iiXxSV2JuxMYJnnA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAPW8A5waC%3D3kG2GXW7RTPAJ-x-TFBwvMs9iiXxSV2JuxMYJnnA%40mail.gmail.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/CAPW8A5waC%3D3kG2GXW7RTPAJ-x-TFBwvMs9iiXxSV2JuxMYJnnA%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAPW8A5waC%3D3kG2GXW7RTPAJ-x-TFBwvMs9iiXxSV2JuxMYJnnA%40mail.gmail.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/dee8eaed-4877-49e4-9ca6-32e0d85cae4a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/dee8eaed-4877-49e4-9ca6-32e0d85cae4a%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, 12:19am UTC](https://discuss.elastic.co/t/why-all-replicas-are-unassigned/19727/11 "2017-07-06T00:19:40Z")

</div>


