# Not able to perform remote reindex with X-Pack Elastic Search

**URL:** <https://discuss.elastic.co/t/not-able-to-perform-remote-reindex-with-x-pack-elastic-search/101477>\
**Category:** Elasticsearch\
**Created:** [September 22, 2017, 12:10pm UTC](https://discuss.elastic.co/t/not-able-to-perform-remote-reindex-with-x-pack-elastic-search/101477 "2017-09-22T12:10:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SaurabhDhingra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/saurabhdhingra/32/45464_2.png) [@SaurabhDhingra](https://discuss.elastic.co/u/SaurabhDhingra)\
**Post date:** [September 22, 2017, 12:10pm UTC](https://discuss.elastic.co/t/not-able-to-perform-remote-reindex-with-x-pack-elastic-search/101477/1 "2017-09-22T12:10:25Z")

</div>

Facing issue when doing reindexing remotely with X-Pack enabled  
Eg:

```
POST /_reindex { "source": { "remote": { "host": "http://<whitelist-ip>" }, "index": "stage_de" }, "dest": { "index": "live_de" } }    

```

Getting error stating authentication token is missing(validated authentication token is passed in the header):

```
{ "error": { "root_cause": [{ "type": "status_exception", "reason": "body={\"error\":{\"root_cause\":[{\"type\":\"security_exception\",\"reason\":\"missing authentication token for REST request [/]\",\"header\":{\"WWW-Authenticate\":\"Basic realm=\\\"security\\\" charset=\\\"UTF-8\\\"\"}}],\"type\":\"security_exception\",\"reason\":\"missing authentication token for REST request [/]\",\"header\":{\"WWW-Authenticate\":\"Basic realm=\\\"security\\\" charset=\\\"UTF-8\\\"\"}},\"status\":401}" } ], "type": "status_exception", "reason": "body={\"error\":{\"root_cause\":[{\"type\":\"security_exception\",\"reason\":\"missing authentication token for REST request [/]\",\"header\":{\"WWW-Authenticate\":\"Basic realm=\\\"security\\\" charset=\\\"UTF-8\\\"\"}}],\"type\":\"security_exception\",\"reason\":\"missing authentication token for REST request [/]\",\"header\":{\"WWW-Authenticate\":\"Basic realm=\\\"security\\\" charset=\\\"UTF-8\\\"\"}},\"status\":401}", "caused_by": { "type": "response_exception", "reason": "GET http://10.203.102.174:9200/: HTTP/1.1 401 Unauthorized\n{\"error\":{\"root_cause\":[{\"type\":\"security_exception\",\"reason\":\"missing authentication token for REST request [/]\",\"header\":{\"WWW-Authenticate\":\"Basic realm=\\\"security\\\" charset=\\\"UTF-8\\\"\"}}],\"type\":\"security_exception\",\"reason\":\"missing authentication token for REST request [/]\",\"header\":{\"WWW-Authenticate\":\"Basic realm=\\\"security\\\" charset=\\\"UTF-8\\\"\"}},\"status\":401}" } }, "status": 401 }  

```

While below is working fine(Non remote reindex request)  
POST /\_reindex

```
{ "source": { "index": "stage_de" }, "dest": { "index": "live_de" } }

```

However, the above issue does not appear when X-Pack is disabled

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [October 2, 2017, 1:06pm UTC](https://discuss.elastic.co/t/not-able-to-perform-remote-reindex-with-x-pack-elastic-search/101477/2 "2017-10-02T13:06:13Z")

</div>

Can you share the full reindex request?

This looks as if credentials are missing.

---

<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:** [October 30, 2017, 1:06pm UTC](https://discuss.elastic.co/t/not-able-to-perform-remote-reindex-with-x-pack-elastic-search/101477/3 "2017-10-30T13:06:58Z")

</div>

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