# Node01 failed to execute \[script\] transform for XXX

**URL:** <https://discuss.elastic.co/t/node01-failed-to-execute-script-transform-for-xxx/191764>\
**Category:** Elasticsearch\
**Created:** [July 23, 2019, 7:55am UTC](https://discuss.elastic.co/t/node01-failed-to-execute-script-transform-for-xxx/191764 "2019-07-23T07:55:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wajika](https://avatars.discourse-cdn.com/v4/letter/w/977dab/32.png) [@wajika](https://discuss.elastic.co/u/wajika)\
**Post date:** [July 23, 2019, 7:55am UTC](https://discuss.elastic.co/t/node01-failed-to-execute-script-transform-for-xxx/191764/1 "2019-07-23T07:55:16Z")

</div>

[2019-07-22T23:59:45,030][ERROR][o.e.x.w.t.s.ExecutableScriptTransform] [node-02] failed to execute [script] transform for [b0sGwRu6TeygyYW0HkOUFQ\_elasticsearch\_cluster\_status\_d2727e8b-09c6-43ca-af14-191b09cfc9e7-2019-07-23T03:59:44.997581Z]  
org.elasticsearch.script.ScriptException: runtime error  
at org.elasticsearch.painless.PainlessScript.convertToScriptException(PainlessScript.java:94) ~[?:?]  
at org.elasticsearch.painless.PainlessScript$Script.execute(ctx.vars.email\_recipient = (ctx.payload.kibana\_settings.hits.total \> 0 && ctx.payload.kibana\_settings.hits.hits[0].\_source.kibana\_settings.xpack != null) ? ctx.payload.kibana\_settings.hits.hits[0].\_source.kibana\_settings.xpack.default\_admin\_email : null;ct ...:1152) ~[?:?]  
at org.elasticsearch.xpack.watcher.transform.script.ExecutableScriptTransform.doExecute(ExecutableScriptTransform.java:49) ~[x-pack-watcher-7.2.0.jar:7.2.0]  
at org.elasticsearch.xpack.watcher.transform.script.ExecutableScriptTransform.execute(ExecutableScriptTransform.java:38) [x-pack-watcher-7.2.0.jar:7.2.0]  
at org.elasticsearch.xpack.watcher.transform.script.ExecutableScriptTransform.execute(ExecutableScriptTransform.java:23) [x-pack-watcher-7.2.0.jar:7.2.0]  
at org.elasticsearch.xpack.watcher.execution.ExecutionService.executeInner(ExecutionService.java:505) [x-pack-watcher-7.2.0.jar:7.2.0]  
at org.elasticsearch.xpack.watcher.execution.ExecutionService.execute(ExecutionService.java:309) [x-pack-watcher-7.2.0.jar:7.2.0]  
at org.elasticsearch.xpack.watcher.execution.ExecutionService.lambda$executeAsync$5(ExecutionService.java:410) [x-pack-watcher-7.2.0.jar:7.2.0]  
at org.elasticsearch.xpack.watcher.execution.ExecutionService$WatchExecutionTask.run(ExecutionService.java:605) [x-pack-watcher-7.2.0.jar:7.2.0]  
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:688) [elasticsearch-7.2.0.jar:7.2.0]  
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:835) [?:?]  
Caused by: java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0  
at jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64) ~[?:?]  
at jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70) ~[?:?]  
at jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248) ~[?:?]  
at java.util.Objects.checkIndex(Objects.java:372) ~[?:?]  
at java.util.ArrayList.get(ArrayList.java:458) ~[?:?]  
at org.elasticsearch.painless.PainlessScript$Script.execute(ctx.vars.email\_recipient = (ctx.payload.kibana\_settings.hits.total \> 0 && ctx.payload.kibana\_settings.hits.hits[0].\_source.kibana\_settings.xpack != null) ? ctx.payload.kibana\_settings.hits.hits[0].\_source.kibana\_settings.xpack.default\_admin\_email : null;ct ...:429) ~[?:?]  
... 11 more

The elasticsearch log keeps showing errors, but I haven't created any scripts yet.  
how to solve this problem?

---

<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:** [August 20, 2019, 7:55am UTC](https://discuss.elastic.co/t/node01-failed-to-execute-script-transform-for-xxx/191764/2 "2019-08-20T07:55:26Z")

</div>

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