Reindex error content type plain text

I run remote reindex in elastic version 5.2 to target remote elastic server with version 6.5.4.

This is the command i run in kibana console:
POST _reindex
{
"source": {
"remote": {
"host": "http://172.16.xx.xx:9200"
},
"index": "test_source"
},
"dest": {
"index": "test_reindex"
}
}

This error is returned:
{
"error": {
"root_cause": [
{
"type": "status_exception",
"reason": "body={"error":"Content-Type header [text/plain; charset=ISO-8859-1] is not supported","status":406}"
}
],
"type": "status_exception",
"reason": "body={"error":"Content-Type header [text/plain; charset=ISO-8859-1] is not supported","status":406}",
"caused_by": {
"type": "response_exception",
"reason": "POST http://172.16.xx.xx:9200/_search/scroll?scroll=5m: HTTP/1.1 406 Not Acceptable\n{"error":"Content-Type header [text/plain; charset=ISO-8859-1] is not supported","status":406}"
}
},
"status": 406
}

Is this elastic version 5.2 problem? Your help is greatly appreciated! Thanks!

1 Like

That's the other way. You should run the query on the 6.x cluster and set the source to be the 5.x cluster.

BTW I'd recommend using the latest 6.x release.

1 Like

Thanks! :grinning:

Sorry I did not tell the my goal clearly. I needed to reindex the data to the elastic server version 5.2.
I found out one solution is just upgrade 5.2 to 5.4.1 and the remote reindex will work.

While you are at it, upgrade to the latest 5.x version. That's safer IMO.

We did not upgrade our elastic server we keep it at version 5.2 as the reindex is working even it's raising this error. It's strange raising error 406 but the reindex tasks is completed.

Up to you but I'd upgrade at least to latest 5.x.

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