# 500 Internal Server Error while using Reporting

**URL:** <https://discuss.elastic.co/t/500-internal-server-error-while-using-reporting/117204>\
**Category:** Kibana\
**Created:** [January 26, 2018, 2:36pm UTC](https://discuss.elastic.co/t/500-internal-server-error-while-using-reporting/117204 "2018-01-26T14:36:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peter\_Boer](https://avatars.discourse-cdn.com/v4/letter/p/838e76/32.png) [@Peter\_Boer](https://discuss.elastic.co/u/Peter_Boer)\
**Post date:** [January 26, 2018, 2:36pm UTC](https://discuss.elastic.co/t/500-internal-server-error-while-using-reporting/117204/1 "2018-01-26T14:36:26Z")

</div>

I am running a 3 node cluster with 1 kibana instance on node 1. While node 2 is master. Monitoring works and my whole clusterhealth is green

When generating a report in Kibana I get this error message:  
Reporting: Error 500 : An internal server error occurred

Kibana logs shows the following error:

> ```
> {
> "type": "error",
> "@timestamp": "2018-01-26T13:57:38Z",
> "tags": [],
> "pid": 1027,
> "level": "error",
> "error": {
> "message": "[remote_transport_exception] [node-2][IPNODE2:9300][indices:admin/create]",
> "name": "Error",
> "stack": "[remote_transport_exception] [node-2][IPNODE2:9300][indices:admin/create] :: {\"path\":\"/.reporting-2018.01.21\",\"query\":{},\"body\":\"{\\\"settings\\\":{},\\\"mappings\\\":{\\\"esqueue\\\":{\\\"properties\\\":{\\\"jobtype\\\":{\\\"type\\\":\\\"keyword\\\"},\\\"payload\\\":{\\\"type\\\":\\\"object\\\",\\\"enabled\\\":false},\\\"priority\\\":{\\\"type\\\":\\\"byte\\\"},\\\"timeout\\\":{\\\"type\\\":\\\"long\\\"},\\\"process_expiration\\\":{\\\"type\\\":\\\"date\\\"},\\\"created_by\\\":{\\\"type\\\":\\\"keyword\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"date\\\"},\\\"started_at\\\":{\\\"type\\\":\\\"date\\\"},\\\"completed_at\\\":{\\\"type\\\":\\\"date\\\"},\\\"attempts\\\":{\\\"type\\\":\\\"short\\\"},\\\"max_attempts\\\":{\\\"type\\\":\\\"short\\\"},\\\"status\\\":{\\\"type\\\":\\\"keyword\\\"},\\\"output\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"content_type\\\":{\\\"type\\\":\\\"keyword\\\"},\\\"content\\\":{\\\"type\\\":\\\"object\\\",\\\"enabled\\\":false}}}}}}}\",\"statusCode\":400,\"response\":\"{\\\"error\\\":{\\\"root_cause\\\":[{\\\"type\\\":\\\"remote_transport_exception\\\",\\\"reason\\\":\\\"[node-2][IPNODE2:9300][indices:admin/create]\\\"}],\\\"type\\\":\\\"illegal_argument_exception\\\",\\\"reason\\\":\\\"Rejecting mapping update to [.reporting-2018.01.21] as the final mapping would have more than 1 type: [esqueue, doc]\\\"},\\\"status\\\":400}\"}\n at respond (/usr/share/kibana/node_modules/elasticsearch/src/lib/transport.js:295:15)\n at checkRespForFailure (/usr/share/kibana/node_modules/elasticsearch/src/lib/transport.js:254:7)\n at HttpConnector.<anonymous> (/usr/share/kibana/node_modules/elasticsearch/src/lib/connectors/http.js:159:7)\n at IncomingMessage.bound (/usr/share/kibana/node_modules/elasticsearch/node_modules/lodash/dist/lodash.js:729:21)\n at emitNone (events.js:91:20)\n at IncomingMessage.emit (events.js:185:7)\n at endReadableNT (_stream_readable.js:974:12)\n at _combinedTickCallback (internal/process/next_tick.js:80:11)\n at process._tickDomainCallback (internal/process/next_tick.js:128:9)"
> },
> "url": {
> "protocol": null,
> "slashes": null,
> "auth": null,
> "host": null,
> "port": null,
> "hostname": null,
> "hash": null,
> "search": "?jobParams=(conflictedTypesFields:!(),fields:!(ip,variable2),indexPatternId:d58f2a10-ff77-11e7-ae73-fd89243a1cfc,metaFields:!(_source,_id,_type,_index,_score),searchRequest:(body:(_source:(excludes:!(),includes:!(ip,variable2)),docvalue_fields:!(),query:(bool:(filter:!(),must:!((match_all:())),must_not:!(),should:!())),script_fields:(),sort:!((_score:(order:desc))),stored_fields:!(ip,variable2),version:!t),index:%27as-*%27),title:%27New%20Saved%20Search1%27,type:search)",
> "query": {
> "jobParams": "(conflictedTypesFields:!(),fields:!(ip,variable2),indexPatternId:d58f2a10-ff77-11e7-ae73-fd89243a1cfc,metaFields:!(_source,_id,_type,_index,_score),searchRequest:(body:(_source:(excludes:!(),includes:!(ip,variable2)),docvalue_fields:!(),query:(bool:(filter:!(),must:!((match_all:())),must_not:!(),should:!())),script_fields:(),sort:!((_score:(order:desc))),stored_fields:!(ip,variable2),version:!t),index:'as-*'),title:'New Saved Search1',type:search)"
> },
> "pathname": "/api/reporting/generate/csv",
> "path": "/api/reporting/generate/csv?jobParams=(conflictedTypesFields:!(),fields:!(ip,variable2),indexPatternId:d58f2a10-ff77-11e7-ae73-fd89243a1cfc,metaFields:!(_source,_id,_type,_index,_score),searchRequest:(body:(_source:(excludes:!(),includes:!(ip,variable2)),docvalue_fields:!(),query:(bool:(filter:!(),must:!((match_all:())),must_not:!(),should:!())),script_fields:(),sort:!((_score:(order:desc))),stored_fields:!(ip,variable2),version:!t),index:%27as-*%27),title:%27New%20Saved%20Search1%27,type:search)",
> "href": "/api/reporting/generate/csv?jobParams=(conflictedTypesFields:!(),fields:!(ip,variable2),indexPatternId:d58f2a10-ff77-11e7-ae73-fd89243a1cfc,metaFields:!(_source,_id,_type,_index,_score),searchRequest:(body:(_source:(excludes:!(),includes:!(ip,variable2)),docvalue_fields:!(),query:(bool:(filter:!(),must:!((match_all:())),must_not:!(),should:!())),script_fields:(),sort:!((_score:(order:desc))),stored_fields:!(ip,variable2),version:!t),index:%27as-*%27),title:%27New%20Saved%20Search1%27,type:search)"
> },
> "message": "[remote_transport_exception] [node-2][IPNODE2:9300][indices:admin/create]"
> }
> 
> ```

I've tried playing with the settings with no result. Any ideas?

---

<div class="post-metadata">

**Author:** ![LeeDr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leedr/32/9289_2.png) [@LeeDr](https://discuss.elastic.co/u/LeeDr)\
**Post date:** [January 26, 2018, 3:25pm UTC](https://discuss.elastic.co/t/500-internal-server-error-while-using-reporting/117204/2 "2018-01-26T15:25:01Z")

</div>

I think this is the key.

> [@Peter\_Boer](#):
>
> "illegal\_argument\_exception\",\"reason\":\"Rejecting mapping update to [.reporting-2018.01.21] as the final mapping would have more than 1 type: [esqueue, doc]

What version of Elasticsearch and Kibana are you running? Did you upgrade from some other version?

---

<div class="post-metadata">

**Author:** ![LeeDr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leedr/32/9289_2.png) [@LeeDr](https://discuss.elastic.co/u/LeeDr)\
**Post date:** [January 26, 2018, 4:17pm UTC](https://discuss.elastic.co/t/500-internal-server-error-while-using-reporting/117204/3 "2018-01-26T16:17:17Z")

</div>

According to a developer familiar with reporting, the .reporting indices should only have documents with type `esqueue` in it. Do you have any idea how a document with type `doc` could have gotten into the index?

You could check how many documents are in the index in the `Dev Tools > Console` like;

`GET .reporting-2018.01.21/_count`

Then you can get the actual documents like;

`GET .reporting-2018.01.21/_search`

In my results after I generated 2 reports I see 2 documents with `"_type": "esqueue"`

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/9/290f7b5172c20b4e4e1d0e544492e0a929284587.png)

If you don't need any reports that have been generated since 2018-01-21 you could delete that whole index and reporting would recreate it the next time you generate a report.

Or, you could delete the documents with `"_type": "doc"` but that would take a minute for me to figure out and test so let me know if you need to keep some existing reports.

Actually, now that I think about it, you can't have any actual reports in that index because they all would have gotten that error. So I expect it would be save to delete the whole index.

---

<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 23, 2018, 4:17pm UTC](https://discuss.elastic.co/t/500-internal-server-error-while-using-reporting/117204/4 "2018-02-23T16:17:20Z")

</div>

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