# Elasticsearch reroute move command: remote\_transport\_exception Error

**URL:** <https://discuss.elastic.co/t/elasticsearch-reroute-move-command-remote-transport-exception-error/182610>\
**Category:** Elasticsearch\
**Created:** [May 24, 2019, 10:05am UTC](https://discuss.elastic.co/t/elasticsearch-reroute-move-command-remote-transport-exception-error/182610 "2019-05-24T10:05:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![stefano1](https://avatars.discourse-cdn.com/v4/letter/s/ecd19e/32.png) [@stefano1](https://discuss.elastic.co/u/stefano1)\
**Post date:** [May 24, 2019, 10:05am UTC](https://discuss.elastic.co/t/elasticsearch-reroute-move-command-remote-transport-exception-error/182610/1 "2019-05-24T10:05:18Z")

</div>

Good Morning All,

I have to balance the cluster occupation of the ES cluster, our cluster is composed by 11 servers and i am a beginner in Elasticsearch software. I would to move an index with primary shard to another machine with more disk space. The only way I found is to execute reroute and move command but, unfortunately, does not work giving me error.

This is the syntax of my Curl reroute command:

```auto
curl -XPOST 'ip_address:port/_cluster/reroute' 
  -d '{"commands" : [{"move" :{"index" : "index", "shard" : 2,"from_node" : "node1", "to_node" : "node2"}}]}'

```

I was expecting a success move of the index and the shard but, unfortunately, this is the error message found in the log:

```auto
[2019-05-24T09:53:55,189][DEBUG][o.e.a.a.c.r.TransportClusterRerouteAction] [ithprodXX-elk] failed to perform [cluster_reroute (api)]
java.lang.NullPointerException: null

```

In the output of the command I was expecting like "moved to node X" but, unfortunately, I have the below output:

```auto
{"error":{"root_cause":[{"type":"remote_transport_exception","reason":"[ithprod05-elk][10.79.207.69:9300][cluster:admin/reroute]"}]
,"type":"null_pointer_exception","reason":null},"status":500}

```

Does somebody know what it should be the root cause of the issue and how to fix it?  
In the case I've not been clear and you need more details do not hesitate to contact me with more comments for more clarifications

Many thanks in advance

Stefano

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [May 31, 2019, 9:07am UTC](https://discuss.elastic.co/t/elasticsearch-reroute-move-command-remote-transport-exception-error/182610/2 "2019-05-31T09:07:57Z")

</div>

> [@stefano1](#):
>
> this is the error message found in the log:

This one-line message should have been followed by a whole stack trace, without which there's not a lot we can do here. Can you share the whole message?

Also, it'd be very helpful to know which version you are on. We fixed a `NullPointerException` in this area in [#28886](https://github.com/elastic/elasticsearch/pull/28886) (v6.3.0) so maybe it's that?

---

<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:** [June 28, 2019, 9:08am UTC](https://discuss.elastic.co/t/elasticsearch-reroute-move-command-remote-transport-exception-error/182610/3 "2019-06-28T09:08:07Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
