# Reindex from Remote ParsingExcpetion

**URL:** <https://discuss.elastic.co/t/reindex-from-remote-parsingexcpetion/81084>\
**Category:** Elasticsearch\
**Created:** [April 4, 2017, 6:29am UTC](https://discuss.elastic.co/t/reindex-from-remote-parsingexcpetion/81084 "2017-04-04T06:29:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![baltendo](https://avatars.discourse-cdn.com/v4/letter/b/9de053/32.png) [@baltendo](https://discuss.elastic.co/u/baltendo)\
**Post date:** [April 4, 2017, 6:29am UTC](https://discuss.elastic.co/t/reindex-from-remote-parsingexcpetion/81084/1 "2017-04-04T06:29:52Z")

</div>

Hi!

We are currently migrating from our Elasticsearch 2.4 to 5.2.2 (or even 5.3.0).  
We decided to reindex the data instead of using snapshot/restore.

For reindexing I use the Reindex API which works quite well what I have seen so far.  
But for one index (so far) the reindex aborts with the following error:

```auto
{
	"error": {
		"root_cause": [{
			"type": "parsing_exception",
			"reason": "[_shards] failed to parse field [failures]",
			"line": 1,
			"col": 347
		}],
		"type": "parsing_exception",
		"reason": "[search_response] failed to parse field [_shards]",
		"line": 1,
		"col": 347,
		"caused_by": {
			"type": "parsing_exception",
			"reason": "[_shards] failed to parse field [failures]",
			"line": 1,
			"col": 347,
			"caused_by": {
				"type": "illegal_argument_exception",
				"reason": "[failure] index doesn't support values of type: VALUE_NULL"
			}
		}
	},
	"status": 400
}

```

Cluster log:

> <https://gist.github.com/baltendo/f6899bc43f3ba94742c5d0e9da9eb470>

The process doesn't return this error immediately.  
It reindexes around 40G out of 80G and then it stops with this error.

On the one hand it seems that the response from the remote server is not valid JSON.  
I saw a change in the code related to that improving the error message in 5.3.0 ([https://github.com/elastic/elasticsearch/pull/22536](https://github.com/elastic/elasticsearch/pull/22536)).

But I am not sure if it just the API or if there is something wrong with a document.  
There was already the case that reindex aborted because a document was not valid JSON in the 2.4 cluster.  
I changed the log level to debug, but I don't know if I can see at which document it is failing.

Thanks in advance for checking the issue!

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 4, 2017, 7:03am UTC](https://discuss.elastic.co/t/reindex-from-remote-parsingexcpetion/81084/2 "2017-04-04T07:03:23Z")

</div>

Please don't post pictures of text, they are difficult to read and some people may not be even able to see them 🙂

What does the reindex request look like?

---

<div class="post-metadata">

**Author:** ![baltendo](https://avatars.discourse-cdn.com/v4/letter/b/9de053/32.png) [@baltendo](https://discuss.elastic.co/u/baltendo)\
**Post date:** [April 4, 2017, 7:13am UTC](https://discuss.elastic.co/t/reindex-from-remote-parsingexcpetion/81084/3 "2017-04-04T07:13:07Z")

</div>

Sorry for the image but it was the easiest way to post the stacktrace (character limit in the post, file type limit to images).

Here is the request:

```auto
curl -XPOST 'localhost:9200/_reindex?wait_for_completion=true' -d '
{
    "conflicts": "proceed",
    "source": {
        "remote": {
            "host": "http://remote.host.com:9200"
        },
        "index": "index-2017-1"
    },
    "dest": {
        "index": "index-2017-1"
    }
}'

```

As you can see it is a time-based index per day.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 4, 2017, 8:02am UTC](https://discuss.elastic.co/t/reindex-from-remote-parsingexcpetion/81084/4 "2017-04-04T08:02:56Z")

</div>

> [@baltendo](#):
>
> Sorry for the image but it was the easiest way to post the stacktrace (character limit in the post

NP!  
You can use gist/pastebin/etc for that sort of thing too 🙂

---

<div class="post-metadata">

**Author:** ![baltendo](https://avatars.discourse-cdn.com/v4/letter/b/9de053/32.png) [@baltendo](https://discuss.elastic.co/u/baltendo)\
**Post date:** [April 4, 2017, 8:23am UTC](https://discuss.elastic.co/t/reindex-from-remote-parsingexcpetion/81084/5 "2017-04-04T08:23:01Z")

</div>

Thank you for the idea!

Elasticsearch logs:

> <https://gist.github.com/baltendo/f6899bc43f3ba94742c5d0e9da9eb470>

---

<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:** [May 2, 2017, 8:23am UTC](https://discuss.elastic.co/t/reindex-from-remote-parsingexcpetion/81084/6 "2017-05-02T08:23:07Z")

</div>

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