# 5.3.0 breaks \_reindex

**URL:** <https://discuss.elastic.co/t/5-3-0-breaks--reindex/80388>\
**Category:** Elasticsearch\
**Created:** [March 28, 2017, 11:19pm UTC](https://discuss.elastic.co/t/5-3-0-breaks--reindex/80388 "2017-03-28T23:19:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sebastian\_Unger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sebastian_unger/32/16829_2.png) [@Sebastian\_Unger](https://discuss.elastic.co/u/Sebastian_Unger)\
**Post date:** [March 28, 2017, 11:19pm UTC](https://discuss.elastic.co/t/5-3-0-breaks--reindex/80388/1 "2017-03-28T23:19:45Z")

</div>

Hi There,

I am in the process of slowly migrating our systems from an ancient (and now un-maintained) ES 1.4.1 install to a new 5.x installation. Since I'm doing this in stages, I have currently got 3 ES clusters (each only consisting of a single server):

1. The old production 1.4.1 server ("old")
2. The new production 5.x server ("current")
3. The new test 5.x server ("test")

As part of this process I am using reindex from remote API together with a painless script to get the data from both the old and the current server onto the test server.

Until yesterday (or so) this was all working fairly well. Then both current and test upgraded from 5.2.2 to 5.3.0. Since then the reindex fails. It fails with the following error on reindexing from old to test:

Request:

```
{
  "dest": {
    "index": "terminalbuildserver",
    "version_type": "internal"
  },
  "source": {
    "index": "terminalbuildserver",
    "_source": true,
    "remote": {
      "host": "http://kibana.terminals.taitradio.net:9200"
    },
    "type": "build"
  },
  "script": {
    "lang": "painless",
    "inline": "\n if (ctx._source.containsKey('@timestamp'))\n {\n ctx._source['timestamp'] = ctx._source.remove('@timestamp')\n }\n\n ctx._source['BuildNumber'] = Integer.parseInt(ctx._source.remove('BuildNumber'));\n ctx._source['Status'] = ctx._source.remove('BuildResult');\n String oldurl = ctx._source['ChangeLog'];\n int idx1 = oldurl.lastIndexOf(\"rev=\") + 4;\n int idx2 = oldurl.lastIndexOf(\"file/\") + 5;\n ctx._source['ChangeLog'] = oldurl.substring((int)Math.max(idx1, idx2));\n String cmt = ctx._source['Comment'];\n if (!cmt.startsWith(\"'\")) Debug.explain(cmt);\n if (!cmt.endsWith(\"'\")) Debug.explain(cmt);\n ctx._source['Comment'] = cmt.substring(1, cmt.length() - 1);\n ctx._source['Artefacts'] = ctx._source.remove('ResultURL');\n ctx._source['UserEmail'] = ctx._source.remove('Username');\n ctx._id = ctx._source['Changeset'] + '-' + ctx._source['BuildNumber']\n"
  }
}

```

Response:

```
{
  "error": {
    "root_cause": [
      {
        "type": "status_exception",
        "reason": "body={\"error\":\"ElasticsearchIllegalArgumentException[Failed to decode scrollId]; nested: IOException[Bad Base64 input character decimal 123 in array position 0]; \",\"status\":400}"
      }
    ],
    "type": "status_exception",
    "reason": "body={\"error\":\"ElasticsearchIllegalArgumentException[Failed to decode scrollId]; nested: IOException[Bad Base64 input character decimal 123 in array position 0]; \",\"status\":400}",
    "caused_by": {
      "type": "response_exception",
      "reason": "POST http://kibana.terminals.taitradio.net:9200/_search/scroll?scroll=5m: HTTP/1.1 400 Bad Request\n{\"error\":\"ElasticsearchIllegalArgumentException[Failed to decode scrollId]; nested: IOException[Bad Base64 input character decimal 123 in array position 0]; \",\"status\":400}"
    }
  },
  "status": 400
}

```

Downgrading test back to 5.2.2 restores the previous behaviour.

Is this expected? The docs don't mention any breaking changes between 5.2.2 and 5.3. Anything I can do to get 5.3 working? I don't want to get stuck on another old version.

Cheers,  
Seb

---

<div class="post-metadata">

**Author:** ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)\
**Post date:** [March 28, 2017, 11:54pm UTC](https://discuss.elastic.co/t/5-3-0-breaks--reindex/80388/2 "2017-03-28T23:54:05Z")

</div>

Do you have a copy of the server logs for that error?  
If you can provide the full stack-trace for it that should help us track it down faster.

Also, can I clarify which servers are running which version in your reindex process.  
I take it the reindex is running on 5.3 (indexing into itself).  
Which source (remote) server versions are you pulling from? Are they all failing?

Thanks.

---

<div class="post-metadata">

**Author:** ![Sebastian\_Unger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sebastian_unger/32/16829_2.png) [@Sebastian\_Unger](https://discuss.elastic.co/u/Sebastian_Unger)\
**Post date:** [March 29, 2017, 4:58am UTC](https://discuss.elastic.co/t/5-3-0-breaks--reindex/80388/3 "2017-03-29T04:58:42Z")

</div>

There's nothing in the logs. I'll attach them tomorrow to show but they only show the normal stuff.

---

<div class="post-metadata">

**Author:** ![Sebastian\_Unger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sebastian_unger/32/16829_2.png) [@Sebastian\_Unger](https://discuss.elastic.co/u/Sebastian_Unger)\
**Post date:** [March 29, 2017, 4:59am UTC](https://discuss.elastic.co/t/5-3-0-breaks--reindex/80388/4 "2017-03-29T04:59:35Z")

</div>

The reindex is running on a 5.3.0 and is reindexing from a remote 1.4.1.

---

<div class="post-metadata">

**Author:** ![jimczi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jimczi/32/47985_2.png) [@jimczi](https://discuss.elastic.co/u/jimczi)\
**Post date:** [March 29, 2017, 8:45pm UTC](https://discuss.elastic.co/t/5-3-0-breaks--reindex/80388/5 "2017-03-29T20:45:56Z")

</div>

Thanks for the report @Sebastian_Unger.  
Reindex from remote is broken when the remote cluster is on a version before 2.0.0.  
I opened [https://github.com/elastic/elasticsearch/pull/23805](https://github.com/elastic/elasticsearch/pull/23805) to fix this in 5.4.

---

<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:** [April 26, 2017, 8:46pm UTC](https://discuss.elastic.co/t/5-3-0-breaks--reindex/80388/6 "2017-04-26T20:46:11Z")

</div>

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