# Transform Exception - all shards failed

**URL:** <https://discuss.elastic.co/t/transform-exception-all-shards-failed/217879>\
**Category:** Elasticsearch\
**Created:** [February 4, 2020, 9:41pm UTC](https://discuss.elastic.co/t/transform-exception-all-shards-failed/217879 "2020-02-04T21:41:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![crpj](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@crpj](https://discuss.elastic.co/u/crpj)\
**Post date:** [February 4, 2020, 9:41pm UTC](https://discuss.elastic.co/t/transform-exception-all-shards-failed/217879/1 "2020-02-04T21:41:15Z")

</div>

Hello,

I am making tests locally with Transform to check if it is feasible to use it and the first time it runs it does its job nicely, once I add more data into the source index (logstash-roaming-dwf-202002) I see in the Preview windows that it does show the future results correctly, but nothing happens. Checking the logs we have this when transform is going to insert docs into the destination index (logstash-dwf-agregado-transform):

"Transform encountered an exception: all shards failed Will attempt again at next scheduled trigger"

Apparently no issues as seen below (I even deleted unused indexes) and ran a command using \_settings so that indexes had no replicas. Where else should I be looking at for problems?

> {  
> "cluster\_name" : "my\_cluster",  
> "status" : "yellow",  
> "timed\_out" : false,  
> "number\_of\_nodes" : 1,  
> "number\_of\_data\_nodes" : 1,  
> "active\_primary\_shards" : 7,  
> "active\_shards" : 7,  
> "relocating\_shards" : 0,  
> "initializing\_shards" : 0,  
> "unassigned\_shards" : 1,  
> "delayed\_unassigned\_shards" : 0,  
> "number\_of\_pending\_tasks" : 0,  
> "number\_of\_in\_flight\_fetch" : 0,  
> "task\_max\_waiting\_in\_queue\_millis" : 0,  
> "active\_shards\_percent\_as\_number" : 87.5,  
> "indices" : {  
> ".transform-internal-003" : {  
> "status" : "green",  
> "number\_of\_shards" : 1,  
> "number\_of\_replicas" : 0,  
> "active\_primary\_shards" : 1,  
> "active\_shards" : 1,  
> "relocating\_shards" : 0,  
> "initializing\_shards" : 0,  
> "unassigned\_shards" : 0,  
> "shards" : {  
> "0" : {  
> "status" : "green",  
> "primary\_active" : true,  
> "active\_shards" : 1,  
> "relocating\_shards" : 0,  
> "initializing\_shards" : 0,  
> "unassigned\_shards" : 0  
> }  
> }  
> },  
> "logstash-dwf-agregado-transform" : {  
> "status" : "green",  
> "number\_of\_shards" : 1,  
> "number\_of\_replicas" : 0,  
> "active\_primary\_shards" : 1,  
> "active\_shards" : 1,  
> "relocating\_shards" : 0,  
> "initializing\_shards" : 0,  
> "unassigned\_shards" : 0,  
> "shards" : {  
> "0" : {  
> "status" : "green",  
> "primary\_active" : true,  
> "active\_shards" : 1,  
> "relocating\_shards" : 0,  
> "initializing\_shards" : 0,  
> "unassigned\_shards" : 0  
> }  
> }  
> },  
> "logstash-roaming-dwf-202002" : {  
> "status" : "yellow",  
> "number\_of\_shards" : 1,  
> "number\_of\_replicas" : 1,  
> "active\_primary\_shards" : 1,  
> "active\_shards" : 1,  
> "relocating\_shards" : 0,  
> "initializing\_shards" : 0,  
> "unassigned\_shards" : 1,  
> "shards" : {  
> "0" : {  
> "status" : "yellow",  
> "primary\_active" : true,  
> "active\_shards" : 1,  
> "relocating\_shards" : 0,  
> "initializing\_shards" : 0,  
> "unassigned\_shards" : 1  
> }  
> }  
> },  
> ".kibana\_task\_manager\_1" : {  
> "status" : "green",  
> "number\_of\_shards" : 1,  
> "number\_of\_replicas" : 0,  
> "active\_primary\_shards" : 1,  
> "active\_shards" : 1,  
> "relocating\_shards" : 0,  
> "initializing\_shards" : 0,  
> "unassigned\_shards" : 0,  
> "shards" : {  
> "0" : {  
> "status" : "green",  
> "primary\_active" : true,  
> "active\_shards" : 1,  
> "relocating\_shards" : 0,  
> "initializing\_shards" : 0,  
> "unassigned\_shards" : 0  
> }  
> }  
> },  
> ".apm-agent-configuration" : {  
> "status" : "green",  
> "number\_of\_shards" : 1,  
> "number\_of\_replicas" : 0,  
> "active\_primary\_shards" : 1,  
> "active\_shards" : 1,  
> "relocating\_shards" : 0,  
> "initializing\_shards" : 0,  
> "unassigned\_shards" : 0,  
> "shards" : {  
> "0" : {  
> "status" : "green",  
> "primary\_active" : true,  
> "active\_shards" : 1,  
> "relocating\_shards" : 0,  
> "initializing\_shards" : 0,  
> "unassigned\_shards" : 0  
> }  
> }  
> },  
> ".kibana\_1" : {  
> "status" : "green",  
> "number\_of\_shards" : 1,  
> "number\_of\_replicas" : 0,  
> "active\_primary\_shards" : 1,  
> "active\_shards" : 1,  
> "relocating\_shards" : 0,  
> "initializing\_shards" : 0,  
> "unassigned\_shards" : 0,  
> "shards" : {  
> "0" : {  
> "status" : "green",  
> "primary\_active" : true,  
> "active\_shards" : 1,  
> "relocating\_shards" : 0,  
> "initializing\_shards" : 0,  
> "unassigned\_shards" : 0  
> }  
> }  
> },  
> ".transform-notifications-000002" : {  
> "status" : "green",  
> "number\_of\_shards" : 1,  
> "number\_of\_replicas" : 0,  
> "active\_primary\_shards" : 1,  
> "active\_shards" : 1,  
> "relocating\_shards" : 0,  
> "initializing\_shards" : 0,  
> "unassigned\_shards" : 0,  
> "shards" : {  
> "0" : {  
> "status" : "green",  
> "primary\_active" : true,  
> "active\_shards" : 1,  
> "relocating\_shards" : 0,  
> "initializing\_shards" : 0,  
> "unassigned\_shards" : 0  
> }  
> }  
> }  
> }  
> }

Thank you.

---

<div class="post-metadata">

**Author:** ![Hendrik\_Muhs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hendrik_muhs/32/25802_2.png) [@Hendrik\_Muhs](https://discuss.elastic.co/u/Hendrik_Muhs)\
**Post date:** [February 5, 2020, 9:38am UTC](https://discuss.elastic.co/t/transform-exception-all-shards-failed/217879/2 "2020-02-05T09:38:39Z")

</div>

The error message:

"Transform encountered an exception: all shards failed Will attempt again at next scheduled trigger"

indicates a problem when searching the data. The logs should contain more information, e.g. a stack trace.

If the problem persists the transform will eventually go into failed state, because it considers a search failure like this as intermittent error. After 10 retries the transform fails.

It would also be helpful to see the configuration of your transform and maybe some example data.

Do you have a subscription? If so it seems better to continue via support.

---

<div class="post-metadata">

**Author:** ![crpj](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@crpj](https://discuss.elastic.co/u/crpj)\
**Post date:** [February 5, 2020, 4:04pm UTC](https://discuss.elastic.co/t/transform-exception-all-shards-failed/217879/3 "2020-02-05T16:04:45Z")

</div>

Thanks Hendrik, you are right about the logs, found the issue:

> [2020-02-04T18:25:26,564][WARN][o.e.x.t.t.ClientTransformIndexer] [node1] [primeiro\_transform] transform encountered an exception:  
> org.elasticsearch.action.search.SearchPhaseExecutionException: all shards failed  
> at org.elasticsearch.action.search.AbstractSearchAsyncAction.onPhaseFailure(AbstractSearchAsyncAction.java:534) [elasticsearch-7.5.1.jar:7.5.1]  
> at org.elasticsearch.action.search.AbstractSearchAsyncAction.executeNextPhase(AbstractSearchAsyncAction.java:305) [elasticsearch-7.5.1.jar:7.5.1]  
> at org.elasticsearch.action.search.AbstractSearchAsyncAction.onPhaseDone(AbstractSearchAsyncAction.java:563) [elasticsearch-7.5.1.jar:7.5.1]  
> at org.elasticsearch.action.search.AbstractSearchAsyncAction.onShardFailure(AbstractSearchAsyncAction.java:384) [elasticsearch-7.5.1.jar:7.5.1]  
> at org.elasticsearch.action.search.AbstractSearchAsyncAction.access$200(AbstractSearchAsyncAction.java:65) [elasticsearch-7.5.1.jar:7.5.1]  
> at org.elasticsearch.action.search.AbstractSearchAsyncAction$1.onFailure(AbstractSearchAsyncAction.java:241) [elasticsearch-7.5.1.jar:7.5.1]  
> at org.elasticsearch.action.search.SearchExecutionStatsCollector.onFailure(SearchExecutionStatsCollector.java:73) [elasticsearch-7.5.1.jar:7.5.1]  
> at org.elasticsearch.action.ActionListenerResponseHandler.handleException(ActionListenerResponseHandler.java:59) [elasticsearch-7.5.1.jar:7.5.1]  
> at org.elasticsearch.action.search.SearchTransportService$ConnectionCountingHandler.handleException(SearchTransportService.java:423) [elasticsearch-7.5.1.jar:7.5.1]  
> at org.elasticsearch.transport.TransportService$ContextRestoreResponseHandler.handleException(TransportService.java:1120) [elasticsearch-7.5.1.jar:7.5.1]  
> at org.elasticsearch.transport.TransportService$ContextRestoreResponseHandler.handleException(TransportService.java:1120) [elasticsearch-7.5.1.jar:7.5.1]  
> at org.elasticsearch.transport.TransportService$DirectResponseChannel.processException(TransportService.java:1229) [elasticsearch-7.5.1.jar:7.5.1]  
> at org.elasticsearch.transport.TransportService$DirectResponseChannel.sendResponse(TransportService.java:1203) [elasticsearch-7.5.1.jar:7.5.1]  
> at org.elasticsearch.transport.TaskTransportChannel.sendResponse(TaskTransportChannel.java:60) [elasticsearch-7.5.1.jar:7.5.1]  
> at org.elasticsearch.action.support.ChannelActionListener.onFailure(ChannelActionListener.java:56) [elasticsearch-7.5.1.jar:7.5.1]  
> at org.elasticsearch.action.ActionListener$1.onFailure(ActionListener.java:71) [elasticsearch-7.5.1.jar:7.5.1]  
> at org.elasticsearch.action.ActionListener$1.onResponse(ActionListener.java:65) [elasticsearch-7.5.1.jar:7.5.1]  
> at org.elasticsearch.action.ActionRunnable.lambda$supply$0(ActionRunnable.java:58) [elasticsearch-7.5.1.jar:7.5.1]  
> at org.elasticsearch.action.ActionRunnable$2.doRun(ActionRunnable.java:73) [elasticsearch-7.5.1.jar:7.5.1]  
> at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-7.5.1.jar:7.5.1]  
> at org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:44) [elasticsearch-7.5.1.jar:7.5.1]  
> at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:773) [elasticsearch-7.5.1.jar:7.5.1]  
> at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-7.5.1.jar:7.5.1]  
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]  
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]  
> at java.lang.Thread.run(Thread.java:830) [?:?]  
> Caused by: org.elasticsearch.ElasticsearchParseException: failed to parse date field [1571356800000] with format [yyyyMMddHHmmss]: [failed to parse date field [1571356800000] with format [yyyyMMddHHmmss]]

I chose a different field and it is working, now I have to address this conversion issue, I am not sure why the Preview shows future data correctly though and date format has been a pain to understand.

---

<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:** [March 4, 2020, 4:04pm UTC](https://discuss.elastic.co/t/transform-exception-all-shards-failed/217879/4 "2020-03-04T16:04:55Z")

</div>

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