# Reindex API: An unexpected authentication error occurred

**URL:** <https://discuss.elastic.co/t/reindex-api-an-unexpected-authentication-error-occurred/323538>\
**Category:** Kibana\
**Created:** [January 19, 2023, 6:39pm UTC](https://discuss.elastic.co/t/reindex-api-an-unexpected-authentication-error-occurred/323538 "2023-01-19T18:39:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Verdugo\_Gonzalo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/verdugo_gonzalo/32/37680_2.png) [@Verdugo\_Gonzalo](https://discuss.elastic.co/u/Verdugo_Gonzalo)\
**Post date:** [January 19, 2023, 6:39pm UTC](https://discuss.elastic.co/t/reindex-api-an-unexpected-authentication-error-occurred/323538/1 "2023-01-19T18:39:59Z")

</div>

Hello everyone,  
I'm trying to migrate an index from Cluster A to Cluster B using the [Reindex from remote](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html#reindex-from-remote)

Add each ip segment in my whitelist in both cluster:

```auto
reindex.remote.whitelist: ["123.176.49.*:9200","123.188.49.*:9200","123.176.61.*:9200","*.ardp.local"]
reindex.ssl.verification_mode: none

```

This is how my connection looks in Dev Tool:

```auto
POST _reindex
{
  "source": {
    "remote": {
      "host": "https://123.176.61.87:9200"
    },
    "index": "pages",
    "query": {
      "match": {
        "test": "data"
      }
    }
  },
  "dest": {
    "index": "my-pages"
  }
}

```

When executing the reindex action I get the following error

```auto
An unexpected authentication error occurred. Please log in again.

```

```auto
https://123.176.49.21:5601/logout?msg=AUTHENTICATION_ERROR&next=%2Fapp%2Fdev_tools%23%2Fconsole

```

Several days ago I have been looking for information on how to perform an index migration from one cluster to another but I was unsuccessful.  
Any suggestions on how I should migrate?

Regards.

Gonzalo.

---

<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:** [February 16, 2023, 6:40pm UTC](https://discuss.elastic.co/t/reindex-api-an-unexpected-authentication-error-occurred/323538/2 "2023-02-16T18:40:54Z")

</div>

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