# Reindex returns "Content-Type" exception

**URL:** <https://discuss.elastic.co/t/reindex-returns-content-type-exception/163184>\
**Category:** Elasticsearch\
**Created:** [January 7, 2019, 10:24am UTC](https://discuss.elastic.co/t/reindex-returns-content-type-exception/163184 "2019-01-07T10:24:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zorobay](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zorobay/32/38411_2.png) [@Zorobay](https://discuss.elastic.co/u/Zorobay)\
**Post date:** [January 7, 2019, 10:24am UTC](https://discuss.elastic.co/t/reindex-returns-content-type-exception/163184/1 "2019-01-07T10:24:34Z")

</div>

Hi!

I'm trying to move my data from our old server to our new one through reindexing. This is the command I'm using in the Kibana console from the new server:

```
POST _reindex
{
  "source": {
    "remote": {
      "host": "http://xxx.xxx.xxx.xxx:5601"
    },
    "index": "kpi_execution_time",
    "query": {
      "match_all": {}
    }
  },
  "dest": {
    "index": "kpi_execution_time"
  }
}

```

However, I immediately recieve this error in response, and I have not been able to find anyone with a similar error:

```
{
  "error": {
    "root_cause": [
      {
        "type": "exception",
        "reason": "Response didn't include Content-Type: body=<script>var hashRoute = '/app/kibana';\nvar defaultRoute = '/app/kibana';\n\nvar hash = window.location.hash;\nif (hash.length) {\n window.location = hashRoute + hash;\n} else {\n window.location = defaultRoute;\n}</script>"
      }
    ],
    "type": "exception",
    "reason": "Response didn't include Content-Type: body=<script>var hashRoute = '/app/kibana';\nvar defaultRoute = '/app/kibana';\n\nvar hash = window.location.hash;\nif (hash.length) {\n window.location = hashRoute + hash;\n} else {\n window.location = defaultRoute;\n}</script>"
  },
  "status": 500
}

```

What could be the cause of this? Thank you!

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 7, 2019, 10:36am UTC](https://discuss.elastic.co/t/reindex-returns-content-type-exception/163184/2 "2019-01-07T10:36:04Z")

</div>

The port to use is 9200 not 5601

---

<div class="post-metadata">

**Author:** ![Zorobay](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zorobay/32/38411_2.png) [@Zorobay](https://discuss.elastic.co/u/Zorobay)\
**Post date:** [January 7, 2019, 11:12am UTC](https://discuss.elastic.co/t/reindex-returns-content-type-exception/163184/3 "2019-01-07T11:12:13Z")

</div>

Okay yep that was stupid of me. Thank you very much! Not very helpful error 😕

---

<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 4, 2019, 11:12am UTC](https://discuss.elastic.co/t/reindex-returns-content-type-exception/163184/4 "2019-02-04T11:12:22Z")

</div>

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