# Not getting reroute API to work

**URL:** <https://discuss.elastic.co/t/not-getting-reroute-api-to-work/11260>\
**Category:** Elasticsearch\
**Created:** [March 22, 2013, 9:01am UTC](https://discuss.elastic.co/t/not-getting-reroute-api-to-work/11260 "2013-03-22T09:01:00Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![vineeth\_mohan](https://avatars.discourse-cdn.com/v4/letter/v/bc79bd/32.png) [@vineeth\_mohan](https://discuss.elastic.co/u/vineeth_mohan)\
**Post date:** [March 22, 2013, 9:01am UTC](https://discuss.elastic.co/t/not-getting-reroute-api-to-work/11260/1 "2013-03-22T09:01:00Z")

</div>

Hi ,

We have 4 machines and 4 shard. We want one shard to run in a machine at a  
time.  
But then head is telling me that Shard 1 and Shard 3 are present in a node  
and another node is sitting idle with just a replica of shard 1.

So i was trying to rebalance this using the reroute API. But i couldnt get  
it to work.  
Kindly see what i went wrong.  
Also please find the head UI snapshot attached.

curl -XPOST 'localhost:9200/\_cluster/reroute' -d '{  
"commands" : [ {  
"move" :  
{  
"index" : "algotree", "shard" : 3,  
"to\_node" : "WKM8HDp-Rt23nc9LUVn1SQ", "from\_node" :  
"owihkXRiQsao94suzna1WQ"  
}  
}  
]  
}'  
{"error":"  
RemoteTransportException[[Bedlam  
II][inet[/192.168.1.246:9300]][cluster/reroute]];  
nested: ElasticSearchIllegalArgumentException[[move\_allocation] can't move  
[algotree][3], from  
[Jubilee][WKM8HDp-Rt23nc9LUVn1SQ][inet[/192.168.1.243:9300]],  
to [Mantis][owihkXRiQsao94suzna1WQ][inet[/192.168.1.247:9300]], since its  
not allowed, reason: [YES()][YES()][YES()][YES()][YES()][YES()][NO()]];  
","status":400}

Thanks  
Vineeth

--  
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:** ![q42jaap](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/q42jaap/32/2241_2.png) [@q42jaap](https://discuss.elastic.co/u/q42jaap)\
**Post date:** [March 22, 2013, 9:27am UTC](https://discuss.elastic.co/t/not-getting-reroute-api-to-work/11260/2 "2013-03-22T09:27:41Z")

</div>

Are you using Elasticsearch 0.20.x?

Elasticsearch 0.90.x is better at balancing shards across nodes.  
Jaap Taal

[Q42 BV | tel 070 44523 42 | direct 070 44523 65 | [http://q42.nl](http://q42.nl) |  
Waldorpstraat 17F, Den Haag | Vijzelstraat 72 unit 4.23, Amsterdam |  
KvK 30164662 ]

On Fri, Mar 22, 2013 at 10:01 AM, Vineeth Mohan  
[vineethmohan@algotree.com](mailto:vineethmohan@algotree.com) wrote:

> Hi ,
> 
> We have 4 machines and 4 shard. We want one shard to run in a machine at a  
> time.  
> But then head is telling me that Shard 1 and Shard 3 are present in a node  
> and another node is sitting idle with just a replica of shard 1.
> 
> So i was trying to rebalance this using the reroute API. But i couldnt get  
> it to work.  
> Kindly see what i went wrong.  
> Also please find the head UI snapshot attached.
> 
> curl -XPOST 'localhost:9200/\_cluster/reroute' -d '{  
> "commands" : [ {  
> "move" :  
> {  
> "index" : "algotree", "shard" : 3,  
> "to\_node" : "WKM8HDp-Rt23nc9LUVn1SQ", "from\_node" :  
> "owihkXRiQsao94suzna1WQ"  
> }  
> }  
> ]  
> }'  
> {"error":"  
> RemoteTransportException[[Bedlam  
> II][inet[/192.168.1.246:9300]][cluster/reroute]]; nested:  
> ElasticSearchIllegalArgumentException[[move\_allocation] can't move  
> [algotree][3], from  
> [Jubilee][WKM8HDp-Rt23nc9LUVn1SQ][inet[/192.168.1.243:9300]], to  
> [Mantis][owihkXRiQsao94suzna1WQ][inet[/192.168.1.247:9300]], since its not  
> allowed, reason: [YES()][YES()][YES()][YES()][YES()][YES()][NO()]];  
> ","status":400}
> 
> Thanks  
> Vineeth
> 
> --  
> 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).

---

<div class="post-metadata">

**Author:** ![vineeth\_mohan](https://avatars.discourse-cdn.com/v4/letter/v/bc79bd/32.png) [@vineeth\_mohan](https://discuss.elastic.co/u/vineeth_mohan)\
**Post date:** [March 22, 2013, 9:55am UTC](https://discuss.elastic.co/t/not-getting-reroute-api-to-work/11260/3 "2013-03-22T09:55:43Z")

</div>

I am using .20.x  
I dont plan to go back on .19.x  
Can i know why the reroute API told so.

Thanks  
Vineeth

On Fri, Mar 22, 2013 at 2:57 PM, Jaap Taal [jaap@q42.nl](mailto:jaap@q42.nl) wrote:

> Are you using Elasticsearch 0.20.x?
> 
> Elasticsearch 0.90.x is better at balancing shards across nodes.  
> Jaap Taal
> 
> [Q42 BV | tel 070 44523 42 | direct 070 44523 65 | [http://q42.nl](http://q42.nl) |  
> Waldorpstraat 17F, Den Haag | Vijzelstraat 72 unit 4.23, Amsterdam |  
> KvK 30164662 ]
> 
> On Fri, Mar 22, 2013 at 10:01 AM, Vineeth Mohan  
> [vineethmohan@algotree.com](mailto:vineethmohan@algotree.com) wrote:
> 
> > Hi ,
> > 
> > We have 4 machines and 4 shard. We want one shard to run in a machine at  
> > a  
> > time.  
> > But then head is telling me that Shard 1 and Shard 3 are present in a  
> > node  
> > and another node is sitting idle with just a replica of shard 1.
> > 
> > So i was trying to rebalance this using the reroute API. But i couldnt  
> > get  
> > it to work.  
> > Kindly see what i went wrong.  
> > Also please find the head UI snapshot attached.
> > 
> > curl -XPOST 'localhost:9200/\_cluster/reroute' -d '{  
> > "commands" : [ {  
> > "move" :  
> > {  
> > "index" : "algotree", "shard" : 3,  
> > "to\_node" : "WKM8HDp-Rt23nc9LUVn1SQ", "from\_node" :  
> > "owihkXRiQsao94suzna1WQ"  
> > }  
> > }  
> > ]  
> > }'  
> > {"error":"  
> > RemoteTransportException[[Bedlam  
> > II][inet[/192.168.1.246:9300]][cluster/reroute]]; nested:  
> > ElasticSearchIllegalArgumentException[[move\_allocation] can't move  
> > [algotree][3], from  
> > [Jubilee][WKM8HDp-Rt23nc9LUVn1SQ][inet[/192.168.1.243:9300]], to  
> > [Mantis][owihkXRiQsao94suzna1WQ][inet[/192.168.1.247:9300]], since its  
> > not  
> > allowed, reason: [YES()][YES()][YES()][YES()][YES()][YES()][NO()]];  
> > ","status":400}
> > 
> > Thanks  
> > Vineeth
> > 
> > --  
> > 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).

--  
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:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 22, 2013, 1:19pm UTC](https://discuss.elastic.co/t/not-getting-reroute-api-to-work/11260/4 "2013-03-22T13:19:50Z")

</div>

Can you try:  
curl -XPOST 'localhost:9200/\_cluster/reroute' -d '{  
"commands" : [ {  
"move" :  
{  
"index" : "algotree", "shard" : 3,  
"to\_node" : "owihkXRiQsao94suzna1WQ", "from\_node" : "WKM8HDp-Rt23nc9LUVn1SQ"  
}  
}  
]  
}'

Just wondering if log message is correct...

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 22 mars 2013 à 10:55, Vineeth Mohan [vineethmohan@algotree.com](mailto:vineethmohan@algotree.com) a écrit :

> I am using .20.x  
> I dont plan to go back on .19.x  
> Can i know why the reroute API told so.
> 
> Thanks  
> Vineeth
> 
> On Fri, Mar 22, 2013 at 2:57 PM, Jaap Taal [jaap@q42.nl](mailto:jaap@q42.nl) wrote:  
> Are you using Elasticsearch 0.20.x?
> 
> Elasticsearch 0.90.x is better at balancing shards across nodes.  
> Jaap Taal
> 
> [Q42 BV | tel 070 44523 42 | direct 070 44523 65 | [http://q42.nl](http://q42.nl) |  
> Waldorpstraat 17F, Den Haag | Vijzelstraat 72 unit 4.23, Amsterdam |  
> KvK 30164662 ]
> 
> On Fri, Mar 22, 2013 at 10:01 AM, Vineeth Mohan  
> [vineethmohan@algotree.com](mailto:vineethmohan@algotree.com) wrote:
> 
> > Hi ,
> > 
> > We have 4 machines and 4 shard. We want one shard to run in a machine at a  
> > time.  
> > But then head is telling me that Shard 1 and Shard 3 are present in a node  
> > and another node is sitting idle with just a replica of shard 1.
> > 
> > So i was trying to rebalance this using the reroute API. But i couldnt get  
> > it to work.  
> > Kindly see what i went wrong.  
> > Also please find the head UI snapshot attached.
> > 
> > curl -XPOST 'localhost:9200/\_cluster/reroute' -d '{  
> > "commands" : [ {  
> > "move" :  
> > {  
> > "index" : "algotree", "shard" : 3,  
> > "to\_node" : "WKM8HDp-Rt23nc9LUVn1SQ", "from\_node" :  
> > "owihkXRiQsao94suzna1WQ"  
> > }  
> > }  
> > ]  
> > }'  
> > {"error":"  
> > RemoteTransportException[[Bedlam  
> > II][inet[/192.168.1.246:9300]][cluster/reroute]]; nested:  
> > ElasticSearchIllegalArgumentException[[move\_allocation] can't move  
> > [algotree][3], from  
> > [Jubilee][WKM8HDp-Rt23nc9LUVn1SQ][inet[/192.168.1.243:9300]], to  
> > [Mantis][owihkXRiQsao94suzna1WQ][inet[/192.168.1.247:9300]], since its not  
> > allowed, reason: [YES()][YES()][YES()][YES()][YES()][YES()][NO()]];  
> > ","status":400}
> > 
> > Thanks  
> > Vineeth
> > 
> > --  
> > 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).
> 
> --  
> 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).

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [March 22, 2013, 3:15pm UTC](https://discuss.elastic.co/t/not-getting-reroute-api-to-work/11260/5 "2013-03-22T15:15:14Z")

</div>

Vineeth,

If you have 4 nodes and 4 shards and you want each node to run 1 shard, you  
should simply turn off replicas and  
set index.routing.allocation.total\_shards\_per\_node to 1 like this:

curl -XPUT localhost:9200/algotree/\_settings -d  
'{"index.routing.allocation.total\_shards\_per\_node": 1,  
"index.number\_of\_replicas": 0}'

No need to mess with reroute API.

If you want to have 1 replica with 4 shards and 4 nodes you need to allow 2  
shards to run per node like this:

curl -XPUT localhost:9200/algotree/\_settings -d  
'{"index.routing.allocation.total\_shards\_per\_node": 2,  
"index.number\_of\_replicas": 1}'

By the way, I think in your example of reroute API request to\_node and  
from\_node are switched.

Igor

On Friday, March 22, 2013 5:55:43 AM UTC-4, Vineeth Mohan wrote:

> I am using .20.x  
> I dont plan to go back on .19.x  
> Can i know why the reroute API told so.
> 
> Thanks  
> Vineeth
> 
> On Fri, Mar 22, 2013 at 2:57 PM, Jaap Taal \<ja...@q42.nl \<javascript:\>\>wrote:
> 
> > Are you using Elasticsearch 0.20.x?
> > 
> > Elasticsearch 0.90.x is better at balancing shards across nodes.  
> > Jaap Taal
> > 
> > [Q42 BV | tel 070 44523 42 | direct 070 44523 65 | [http://q42.nl](http://q42.nl) |  
> > Waldorpstraat 17F, Den Haag | Vijzelstraat 72 unit 4.23, Amsterdam |  
> > KvK 30164662 ]
> > 
> > On Fri, Mar 22, 2013 at 10:01 AM, Vineeth Mohan  
> > \<[vineet...@algotree.com](mailto:vineet...@algotree.com) \<javascript:\>\> wrote:
> > 
> > > Hi ,
> > > 
> > > We have 4 machines and 4 shard. We want one shard to run in a machine  
> > > at a  
> > > time.  
> > > But then head is telling me that Shard 1 and Shard 3 are present in a  
> > > node  
> > > and another node is sitting idle with just a replica of shard 1.
> > > 
> > > So i was trying to rebalance this using the reroute API. But i couldnt  
> > > get  
> > > it to work.  
> > > Kindly see what i went wrong.  
> > > Also please find the head UI snapshot attached.
> > > 
> > > curl -XPOST 'localhost:9200/\_cluster/reroute' -d '{  
> > > "commands" : [ {  
> > > "move" :  
> > > {  
> > > "index" : "algotree", "shard" : 3,  
> > > "to\_node" : "WKM8HDp-Rt23nc9LUVn1SQ", "from\_node" :  
> > > "owihkXRiQsao94suzna1WQ"  
> > > }  
> > > }  
> > > ]  
> > > }'  
> > > {"error":"  
> > > RemoteTransportException[[Bedlam  
> > > II][inet[/192.168.1.246:9300]][cluster/reroute]]; nested:  
> > > ElasticSearchIllegalArgumentException[[move\_allocation] can't move  
> > > [algotree][3], from  
> > > [Jubilee][WKM8HDp-Rt23nc9LUVn1SQ][inet[/192.168.1.243:9300]], to  
> > > [Mantis][owihkXRiQsao94suzna1WQ][inet[/192.168.1.247:9300]], since its  
> > > not  
> > > allowed, reason: [YES()][YES()][YES()][YES()][YES()][YES()][NO()]];  
> > > ","status":400}
> > > 
> > > Thanks  
> > > Vineeth
> > > 
> > > --  
> > > 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:\>.  
> > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > 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).

---

<div class="post-metadata">

**Author:** ![q42jaap](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/q42jaap/32/2241_2.png) [@q42jaap](https://discuss.elastic.co/u/q42jaap)\
**Post date:** [March 22, 2013, 11:37pm UTC](https://discuss.elastic.co/t/not-getting-reroute-api-to-work/11260/6 "2013-03-22T23:37:37Z")

</div>

0.90.x is an upgrade from 0.20.x, RC1 just came out the last couple of days.

> **[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.

Jaap Taal

[Q42 BV | tel 070 44523 42 | direct 070 44523 65 | [http://q42.nl](http://q42.nl) |  
Waldorpstraat 17F, Den Haag | Vijzelstraat 72 unit 4.23, Amsterdam |  
KvK 30164662 ]

On Fri, Mar 22, 2013 at 10:55 AM, Vineeth Mohan  
[vineethmohan@algotree.com](mailto:vineethmohan@algotree.com) wrote:

> I am using .20.x  
> I dont plan to go back on .19.x  
> Can i know why the reroute API told so.
> 
> Thanks  
> Vineeth
> 
> On Fri, Mar 22, 2013 at 2:57 PM, Jaap Taal [jaap@q42.nl](mailto:jaap@q42.nl) wrote:
> 
> > Are you using Elasticsearch 0.20.x?
> > 
> > Elasticsearch 0.90.x is better at balancing shards across nodes.  
> > Jaap Taal
> > 
> > [Q42 BV | tel 070 44523 42 | direct 070 44523 65 | [http://q42.nl](http://q42.nl) |  
> > Waldorpstraat 17F, Den Haag | Vijzelstraat 72 unit 4.23, Amsterdam |  
> > KvK 30164662 ]
> > 
> > On Fri, Mar 22, 2013 at 10:01 AM, Vineeth Mohan  
> > [vineethmohan@algotree.com](mailto:vineethmohan@algotree.com) wrote:
> > 
> > > Hi ,
> > > 
> > > We have 4 machines and 4 shard. We want one shard to run in a machine at  
> > > a  
> > > time.  
> > > But then head is telling me that Shard 1 and Shard 3 are present in a  
> > > node  
> > > and another node is sitting idle with just a replica of shard 1.
> > > 
> > > So i was trying to rebalance this using the reroute API. But i couldnt  
> > > get  
> > > it to work.  
> > > Kindly see what i went wrong.  
> > > Also please find the head UI snapshot attached.
> > > 
> > > curl -XPOST 'localhost:9200/\_cluster/reroute' -d '{  
> > > "commands" : [ {  
> > > "move" :  
> > > {  
> > > "index" : "algotree", "shard" : 3,  
> > > "to\_node" : "WKM8HDp-Rt23nc9LUVn1SQ", "from\_node" :  
> > > "owihkXRiQsao94suzna1WQ"  
> > > }  
> > > }  
> > > ]  
> > > }'  
> > > {"error":"  
> > > RemoteTransportException[[Bedlam  
> > > II][inet[/192.168.1.246:9300]][cluster/reroute]]; nested:  
> > > ElasticSearchIllegalArgumentException[[move\_allocation] can't move  
> > > [algotree][3], from  
> > > [Jubilee][WKM8HDp-Rt23nc9LUVn1SQ][inet[/192.168.1.243:9300]], to  
> > > [Mantis][owihkXRiQsao94suzna1WQ][inet[/192.168.1.247:9300]], since its  
> > > not  
> > > allowed, reason: [YES()][YES()][YES()][YES()][YES()][YES()][NO()]];  
> > > ","status":400}
> > > 
> > > Thanks  
> > > Vineeth
> > > 
> > > --  
> > > 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).
> 
> --  
> 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).

---

<div class="post-metadata">

**Author:** ![q42jaap](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/q42jaap/32/2241_2.png) [@q42jaap](https://discuss.elastic.co/u/q42jaap)\
**Post date:** [March 22, 2013, 11:38pm UTC](https://discuss.elastic.co/t/not-getting-reroute-api-to-work/11260/7 "2013-03-22T23:38:49Z")

</div>

Also see [Add new ShardsAllocator that takes indices into account when allocating and balancing shards · Issue #2555 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/2555)  
and [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/blog/2013/02/26/0.90.0.Beta1-released.html)  
Jaap Taal

[Q42 BV | tel 070 44523 42 | direct 070 44523 65 | [http://q42.nl](http://q42.nl) |  
Waldorpstraat 17F, Den Haag | Vijzelstraat 72 unit 4.23, Amsterdam |  
KvK 30164662 ]

On Fri, Mar 22, 2013 at 10:55 AM, Vineeth Mohan  
[vineethmohan@algotree.com](mailto:vineethmohan@algotree.com) wrote:

> I am using .20.x  
> I dont plan to go back on .19.x  
> Can i know why the reroute API told so.
> 
> Thanks  
> Vineeth
> 
> On Fri, Mar 22, 2013 at 2:57 PM, Jaap Taal [jaap@q42.nl](mailto:jaap@q42.nl) wrote:
> 
> > Are you using Elasticsearch 0.20.x?
> > 
> > Elasticsearch 0.90.x is better at balancing shards across nodes.  
> > Jaap Taal
> > 
> > [Q42 BV | tel 070 44523 42 | direct 070 44523 65 | [http://q42.nl](http://q42.nl) |  
> > Waldorpstraat 17F, Den Haag | Vijzelstraat 72 unit 4.23, Amsterdam |  
> > KvK 30164662 ]
> > 
> > On Fri, Mar 22, 2013 at 10:01 AM, Vineeth Mohan  
> > [vineethmohan@algotree.com](mailto:vineethmohan@algotree.com) wrote:
> > 
> > > Hi ,
> > > 
> > > We have 4 machines and 4 shard. We want one shard to run in a machine at  
> > > a  
> > > time.  
> > > But then head is telling me that Shard 1 and Shard 3 are present in a  
> > > node  
> > > and another node is sitting idle with just a replica of shard 1.
> > > 
> > > So i was trying to rebalance this using the reroute API. But i couldnt  
> > > get  
> > > it to work.  
> > > Kindly see what i went wrong.  
> > > Also please find the head UI snapshot attached.
> > > 
> > > curl -XPOST 'localhost:9200/\_cluster/reroute' -d '{  
> > > "commands" : [ {  
> > > "move" :  
> > > {  
> > > "index" : "algotree", "shard" : 3,  
> > > "to\_node" : "WKM8HDp-Rt23nc9LUVn1SQ", "from\_node" :  
> > > "owihkXRiQsao94suzna1WQ"  
> > > }  
> > > }  
> > > ]  
> > > }'  
> > > {"error":"  
> > > RemoteTransportException[[Bedlam  
> > > II][inet[/192.168.1.246:9300]][cluster/reroute]]; nested:  
> > > ElasticSearchIllegalArgumentException[[move\_allocation] can't move  
> > > [algotree][3], from  
> > > [Jubilee][WKM8HDp-Rt23nc9LUVn1SQ][inet[/192.168.1.243:9300]], to  
> > > [Mantis][owihkXRiQsao94suzna1WQ][inet[/192.168.1.247:9300]], since its  
> > > not  
> > > allowed, reason: [YES()][YES()][YES()][YES()][YES()][YES()][NO()]];  
> > > ","status":400}
> > > 
> > > Thanks  
> > > Vineeth
> > > 
> > > --  
> > > 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).
> 
> --  
> 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).

---

<div class="post-metadata">

**Author:** ![vineeth\_mohan](https://avatars.discourse-cdn.com/v4/letter/v/bc79bd/32.png) [@vineeth\_mohan](https://discuss.elastic.co/u/vineeth_mohan)\
**Post date:** [March 23, 2013, 12:32pm UTC](https://discuss.elastic.co/t/not-getting-reroute-api-to-work/11260/8 "2013-03-23T12:32:54Z")

</div>

Sorry about copying the wrong command.  
I actually tried both the combination of from and to and unfortunately i  
swaped their output up while pasting in the group.

@igor - Yes i finally did that. Made it 0 replica and hence it got balances  
all over.

Let me try your other suggestions.

Thanks  
Vineeth

On Fri, Mar 22, 2013 at 6:49 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

> Can you try:  
> curl -XPOST 'localhost:9200/\_cluster/reroute' -d '{  
> "commands" : [ {  
> "move" :  
> {  
> "index" : "algotree", "shard" : 3,  
> "to\_node" : "owihkXRiQsao94suzna1WQ", "from\_node" :  
> "WKM8HDp-Rt23nc9LUVn1SQ"  
> }  
> }  
> ]  
> }'
> 
> Just wondering if log message is correct...
> 
> --  
> _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)  
> | @scrutmydocs [https://twitter.com/scrutmydocs](https://twitter.com/scrutmydocs)
> 
> Le 22 mars 2013 à 10:55, Vineeth Mohan [vineethmohan@algotree.com](mailto:vineethmohan@algotree.com) a  
> écrit :
> 
> I am using .20.x  
> I dont plan to go back on .19.x  
> Can i know why the reroute API told so.
> 
> Thanks  
> Vineeth
> 
> On Fri, Mar 22, 2013 at 2:57 PM, Jaap Taal [jaap@q42.nl](mailto:jaap@q42.nl) wrote:
> 
> > Are you using Elasticsearch 0.20.x?
> > 
> > Elasticsearch 0.90.x is better at balancing shards across nodes.  
> > Jaap Taal
> > 
> > [Q42 BV | tel 070 44523 42 | direct 070 44523 65 | [http://q42.nl](http://q42.nl) |  
> > Waldorpstraat 17F, Den Haag | Vijzelstraat 72 unit 4.23, Amsterdam |  
> > KvK 30164662 ]
> > 
> > On Fri, Mar 22, 2013 at 10:01 AM, Vineeth Mohan  
> > [vineethmohan@algotree.com](mailto:vineethmohan@algotree.com) wrote:
> > 
> > > Hi ,
> > > 
> > > We have 4 machines and 4 shard. We want one shard to run in a machine  
> > > at a  
> > > time.  
> > > But then head is telling me that Shard 1 and Shard 3 are present in a  
> > > node  
> > > and another node is sitting idle with just a replica of shard 1.
> > > 
> > > So i was trying to rebalance this using the reroute API. But i couldnt  
> > > get  
> > > it to work.  
> > > Kindly see what i went wrong.  
> > > Also please find the head UI snapshot attached.
> > > 
> > > curl -XPOST 'localhost:9200/\_cluster/reroute' -d '{  
> > > "commands" : [ {  
> > > "move" :  
> > > {  
> > > "index" : "algotree", "shard" : 3,  
> > > "to\_node" : "WKM8HDp-Rt23nc9LUVn1SQ", "from\_node" :  
> > > "owihkXRiQsao94suzna1WQ"  
> > > }  
> > > }  
> > > ]  
> > > }'  
> > > {"error":"  
> > > RemoteTransportException[[Bedlam  
> > > II][inet[/192.168.1.246:9300]][cluster/reroute]]; nested:  
> > > ElasticSearchIllegalArgumentException[[move\_allocation] can't move  
> > > [algotree][3], from  
> > > [Jubilee][WKM8HDp-Rt23nc9LUVn1SQ][inet[/192.168.1.243:9300]], to  
> > > [Mantis][owihkXRiQsao94suzna1WQ][inet[/192.168.1.247:9300]], since its  
> > > not  
> > > allowed, reason: [YES()][YES()][YES()][YES()][YES()][YES()][NO()]];  
> > > ","status":400}
> > > 
> > > Thanks  
> > > Vineeth
> > > 
> > > --  
> > > 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).
> 
> --  
> 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).

--  
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:45am UTC](https://discuss.elastic.co/t/not-getting-reroute-api-to-work/11260/9 "2017-07-06T02:45:00Z")

</div>


