# Failed to execute phase \[query\], all shards failed\]

**URL:** https://discuss.elastic.co/t/failed-to-execute-phase-query-all-shards-failed/1938
**Category:** Elasticsearch
**Created:** [June 4, 2015, 1:56pm UTC](https://discuss.elastic.co/t/failed-to-execute-phase-query-all-shards-failed/1938 "2015-06-04T13:56:40Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![kuldeep](https://avatars.discourse-cdn.com/v4/letter/k/da6949/32.png) [@kuldeep](https://discuss.elastic.co/u/kuldeep)
#### Post date: [June 4, 2015, 1:56pm UTC](https://discuss.elastic.co/t/failed-to-execute-phase-query-all-shards-failed/1938/1 "2015-06-04T13:56:40Z")

</div>

Hi team,

I am getting above error.  
Oops! SearchPhaseExecutionException[Failed to execute phase [query], all shards failed]

and logs of elasticsearch are

org.elasticsearch.ElasticsearchIllegalStateException: Can't create an index [logstash-2015.06.04], node is closed  
at org.elasticsearch.indices.InternalIndicesService.createIndex(InternalIndicesService.java:261)  
at org.elasticsearch.indices.cluster.IndicesClusterStateService.applyNewIndices(IndicesClusterStateService.java:303)  
at org.elasticsearch.indices.cluster.IndicesClusterStateService.clusterChanged(IndicesClusterStateService.java:175)  
at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:425)  
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:134)  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)  
at java.lang.Thread.run(Thread.java:745)  
[2015-06-04 06:30:38,959][WARN][cluster.action.shard] [Fantasia] [logstash-2015.06.04][1] sending failed shard for [logstash-2015.06.04][1], node[bfBIsra5QJKYqdLGD5s95g], [P], s[INITIALIZING], indexUUID [O8VtPWsrQb-n0pmV1D47PQ], reason [Failed to start shard, message [IndexShardGatewayRecoveryException[[logstash-2015.06.04][1] failed recovery]; nested: EngineCreationFailureException[[logstash-2015.06.04][1] failed to create engine]; nested: IndexFormatTooNewException[Format version is not supported (resource: MMapIndexInput(path="/var/lib/elasticsearch/elasticsearch/nodes/0/indices/logstash-2015.06.04/1/index/segments.gen")): -3 (needs to be between -2 and -2)]; ]]  
[2015-06-04 06:30:38,962][WARN][cluster.action.shard] [Fantasia] [logstash-20

---

<div class="post-metadata">

### Author: ![Jason\_Wee](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@Jason\_Wee](https://discuss.elastic.co/u/Jason_Wee)
#### Post date: [June 6, 2015, 10:26am UTC](https://discuss.elastic.co/t/failed-to-execute-phase-query-all-shards-failed/1938/2 "2015-06-06T10:26:10Z")

</div>

> IndexFormatTooNewException[Format version is not supported

what es version that was use when the above exception thrown? what es it was used before?

are you using logstash and es together?

---

<div class="post-metadata">

### Author: ![kuldeep](https://avatars.discourse-cdn.com/v4/letter/k/da6949/32.png) [@kuldeep](https://discuss.elastic.co/u/kuldeep)
#### Post date: [June 8, 2015, 8:18am UTC](https://discuss.elastic.co/t/failed-to-execute-phase-query-all-shards-failed/1938/3 "2015-06-08T08:18:44Z")

</div>

elastcisearch 1.4  
I am using elasticsearch with td-agent.

---

<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: [July 6, 2017, 12:09am UTC](https://discuss.elastic.co/t/failed-to-execute-phase-query-all-shards-failed/1938/4 "2017-07-06T00:09:02Z")

</div>


