# ES 2 Courier Fetch: N of N shards failed

**URL:** <https://discuss.elastic.co/t/es-2-courier-fetch-n-of-n-shards-failed/108888>\
**Category:** Elasticsearch\
**Created:** [November 23, 2017, 12:47pm UTC](https://discuss.elastic.co/t/es-2-courier-fetch-n-of-n-shards-failed/108888 "2017-11-23T12:47:45Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![marcmga](https://avatars.discourse-cdn.com/v4/letter/m/3bc359/32.png) [@marcmga](https://discuss.elastic.co/u/marcmga)\
**Post date:** [November 23, 2017, 12:47pm UTC](https://discuss.elastic.co/t/es-2-courier-fetch-n-of-n-shards-failed/108888/1 "2017-11-23T12:47:45Z")

</div>

Hi,

I get that message when i search in dashboard.  
Mi config for threadpool is:

threadpool.search.queue\_size: 11000

In kibana with google developer tools i get this response:

{  
"responses": [  
{  
"\_shards": {  
"failed": 69,  
"failures": [  
{  
"index": "logstash-2017.11.10",  
"node": "X-BMD4EGTqi7KRKFaaCPGw",  
"reason": {  
"reason": null,  
"type": "class\_cast\_exception"  
},  
"shard": 0  
},  
{  
"index": "logstash-2017.11.11",  
"node": "2jRReScrTq2i3gRcql28gg",  
"reason": {  
"reason": null,  
"type": "class\_cast\_exception"  
},  
"shard": 0  
}  
],  
"successful": 55,  
"total": 124  
},  
"aggregations": {  
"2": {  
"buckets": []  
}  
},  
"hits": {  
"hits": [],  
"max\_score": 0.0,  
"total": 0  
},  
"timed\_out": false,  
"took": 436  
}  
]  
}

I don't actually know why this is happening. Also, in one of the views of the dashboard i get no data.

Please, could you help?

Thanks

---

<div class="post-metadata">

**Author:** ![colings86](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/colings86/32/44960_2.png) [@colings86](https://discuss.elastic.co/u/colings86)\
**Post date:** [November 23, 2017, 12:54pm UTC](https://discuss.elastic.co/t/es-2-courier-fetch-n-of-n-shards-failed/108888/2 "2017-11-23T12:54:29Z")

</div>

Which version of Elasticsearch are you using? Also could you paste the request JSON that Kibana is sending too?

---

<div class="post-metadata">

**Author:** ![marcmga](https://avatars.discourse-cdn.com/v4/letter/m/3bc359/32.png) [@marcmga](https://discuss.elastic.co/u/marcmga)\
**Post date:** [November 24, 2017, 12:56pm UTC](https://discuss.elastic.co/t/es-2-courier-fetch-n-of-n-shards-failed/108888/3 "2017-11-24T12:56:25Z")

</div>

Version 2

IS this what you mean?

{"index":"logstash-\*","search\_type":"count","ignore\_unavailable":true}  
{"query":{"filtered":{"query":{"query\_string":{"analyze\_wildcard":true,"query":"host:mgaviewer AND (service:cassandra\_read\_latency OR service:cassandra\_write\_latency)"}},"filter":{"bool":{"must":[{"range":{"@timestamp":{"gte":1511524401065,"lte":1511528001065,"format":"epoch\_millis"}}}],"must\_not":[]}}}},"size":0,"aggs":{"2":{"date\_histogram":{"field":"@timestamp","interval":"1m","time\_zone":"Europe/Berlin","min\_doc\_count":1,"extended\_bounds":{"min":1511524401063,"max":1511528001063}},"aggs":{"3":{"terms":{"field":"service","size":10,"order":{"1":"desc"}},"aggs":{"1":{"max":{"field":"ms"}}}}}}}}

---

<div class="post-metadata">

**Author:** ![colings86](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/colings86/32/44960_2.png) [@colings86](https://discuss.elastic.co/u/colings86)\
**Post date:** [November 24, 2017, 1:12pm UTC](https://discuss.elastic.co/t/es-2-courier-fetch-n-of-n-shards-failed/108888/4 "2017-11-24T13:12:29Z")

</div>

Yes that is what I mean thanks. Unfortunately the request doesn't show any hint of where the problem lies. Could you reproduce the error and then look in the Elasticsearch server log file to find the corresponding stack trace that will be in thee (it will contain `ClassCastException` and paste the whole stack trace (i.e. all the lines of the stack trace) here please? This should give us a better idea of where the problem is.

Also when you say you are running version 2 do you mean 2.0.0 or some other version within the 2.x.y series?

---

<div class="post-metadata">

**Author:** ![marcmga](https://avatars.discourse-cdn.com/v4/letter/m/3bc359/32.png) [@marcmga](https://discuss.elastic.co/u/marcmga)\
**Post date:** [November 28, 2017, 2:32pm UTC](https://discuss.elastic.co/t/es-2-courier-fetch-n-of-n-shards-failed/108888/5 "2017-11-28T14:32:27Z")

</div>

Hi colings86,

Yes i ment elasticsearch 2.0.0  
This is the trace in elasticsearch log:

[2017-11-28 15:28:36,215][DEBUG][action.search.type] [myservername] [logstash-2017.11.21][2], node[Jm8U1mBoTVGWPb8BI4XPNQ], [P], v[27], s[STARTED], a[id=TFDBmfAfTZig0-KG3TAB6g]: Failed to  
execute [org.elasticsearch.action.search.SearchRequest@513694ec] lastShard [true]  
RemoteTransportException[[myservername][192.168.23.148:9300][indices:data/read/search[phase/query]]]; nested: ClassCastException;  
Caused by: java.lang.ClassCastException

Hope that helps

---

<div class="post-metadata">

**Author:** ![colings86](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/colings86/32/44960_2.png) [@colings86](https://discuss.elastic.co/u/colings86)\
**Post date:** [November 28, 2017, 2:49pm UTC](https://discuss.elastic.co/t/es-2-courier-fetch-n-of-n-shards-failed/108888/6 "2017-11-28T14:49:20Z")

</div>

@marcmga there should be more lines of the stack trace in the log file below the line you pasted which will indicate where in the code this exception was thrown. These line will start with `at ...` or `caused by: ...`. Could you pasted all the lines below this log line up to the next line which starts `[2017-11-28....`.

---

<div class="post-metadata">

**Author:** ![marcmga](https://avatars.discourse-cdn.com/v4/letter/m/3bc359/32.png) [@marcmga](https://discuss.elastic.co/u/marcmga)\
**Post date:** [November 30, 2017, 11:36am UTC](https://discuss.elastic.co/t/es-2-courier-fetch-n-of-n-shards-failed/108888/7 "2017-11-30T11:36:39Z")

</div>

Hi colings86,

no there's only this trace, repeated several times.  
example:  
[2017-11-30 12:28:57,507][DEBUG][action.search.type] [srvjira] [logstash-2017.11.22][4], node[Jm8U1mBoTVGWPb8BI4XPNQ], [P], v[24], s[STARTED], a[id=Sl9a-3VETSeuuZPJel6jsw]: Failed to  
execute [org.elasticsearch.action.search.SearchRequest@1aafcd99] lastShard [true]  
RemoteTransportException[[srvjira][192.168.23.148:9300][indices:data/read/search[phase/query]]]; nested: ClassCastException;  
Caused by: java.lang.ClassCastException  
[2017-11-30 12:28:57,500][DEBUG][action.search.type] [srvjira] [logstash-2017.11.12][3], node[Jm8U1mBoTVGWPb8BI4XPNQ], [P], v[33], s[STARTED], a[id=ZHs42Q5AQqeFwtRfFqu6Rw]: Failed to  
execute [org.elasticsearch.action.search.SearchRequest@1aafcd99] lastShard [true]  
RemoteTransportException[[srvjira][192.168.23.148:9300][indices:data/read/search[phase/query]]]; nested: ClassCastException;  
Caused by: java.lang.ClassCastException  
[2017-11-30 12:28:57,496][DEBUG][action.search.type] [srvjira] [logstash-2017.11.26][2], node[Jm8U1mBoTVGWPb8BI4XPNQ], [P], v[2], s[STARTED], a[id=zcQE5sHdTw-\_aDErwJG\_eQ]: Failed to  
execute [org.elasticsearch.action.search.SearchRequest@1aafcd99] lastShard [true]  
RemoteTransportException[[srvjira][192.168.23.148:9300][indices:data/read/search[phase/query]]]; nested: ClassCastException;  
Caused by: java.lang.ClassCastException  
[2017-11-30 12:28:57,496][DEBUG][action.search.type] [srvjira] [logstash-2017.11.22][2], node[Jm8U1mBoTVGWPb8BI4XPNQ], [P], v[24], s[STARTED], a[id=1j2XmJzVQ0mftvWyFG3UYw]: Failed to  
execute [org.elasticsearch.action.search.SearchRequest@1aafcd99] lastShard [true]  
RemoteTransportException[[srvjira][192.168.23.148:9300][indices:data/read/search[phase/query]]]; nested: ClassCastException;  
Caused by: java.lang.ClassCastException  
[2017-11-30 12:28:57,508][DEBUG][action.search.type] [srvjira] [logstash-2017.11.13][3], node[Jm8U1mBoTVGWPb8BI4XPNQ], [P], v[33], s[STARTED], a[id=jkX2TStoSRy56-SQOQaKmA]: Failed to  
execute [org.elasticsearch.action.search.SearchRequest@1aafcd99]  
RemoteTransportException[[srvjira][192.168.23.148:9300][indices:data/read/search[phase/query]]]; nested: ClassCastException;  
Caused by: java.lang.ClassCastException  
[2017-11-30 12:28:57,501][DEBUG][action.search.type] [srvjira] [logstash-2017.11.21][3], node[Jm8U1mBoTVGWPb8BI4XPNQ], [P], v[24], s[STARTED], a[id=IUtBi6NgTCiQxUhvgrkiKA]: Failed to  
execute [org.elasticsearch.action.search.SearchRequest@1aafcd99] lastShard [true]  
RemoteTransportException[[srvjira][192.168.23.148:9300][indices:data/read/search[phase/query]]]; nested: ClassCastException;  
Caused by: java.lang.ClassCastException  
[2017-11-30 12:31:26,920][DEBUG][action.search.type] [srvjira] [logstash-2017.11.10][0], node[Jm8U1mBoTVGWPb8BI4XPNQ], [P], v[38], s[STARTED], a[id=RR4\_wVoTR0qVw20P\_jUCng]: Failed to  
execute [org.elasticsearch.action.search.SearchRequest@4cdb78de] lastShard [true]  
RemoteTransportException[[srvjira][192.168.23.148:9300][indices:data/read/search[phase/query]]]; nested: ClassCastException;  
Caused by: java.lang.ClassCastException  
[2017-11-30 12:31:26,920][DEBUG][action.search.type] [srvjira] [logstash-2017.11.13][0], node[Jm8U1mBoTVGWPb8BI4XPNQ], [P], v[33], s[STARTED], a[id=gNaQdh7BTxSJztLKcE7dAw]: Failed to  
execute [org.elasticsearch.action.search.SearchRequest@4cdb78de] lastShard [true]  
RemoteTransportException[[srvjira][192.168.23.148:9300][indices:data/read/search[phase/query]]]; nested: ClassCastException;  
Caused by: java.lang.ClassCastException

Where may i search for additional information?

---

<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:** [December 28, 2017, 11:36am UTC](https://discuss.elastic.co/t/es-2-courier-fetch-n-of-n-shards-failed/108888/8 "2017-12-28T11:36:56Z")

</div>

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