Watcher and kibana

If I uses a trail license and enables watcher of X-pack, do I need to install kibana? Since from the log, I see the following error messages when I have no kibana installed:
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) ~[?:?]

no you do not. This is an error message in an internal watch, which you can safely ignore.

Do you mind sharing the exception so we can make sure it does not flood your logs?

--Alex

I found that as long as I enable watcher the error appears. Why should I ignore it? Though I see that the process is still running and I can still get the right info by sending curl -X GET messages.
The error messages are:
ERROR][o.e.x.w.t.s.ExecutableScriptTransform] [hytera.l23556] failed to execute [script] transform for [OKX6rKBiQQ2UrTMBRuayqg_elasticsearch_cluster_status_ab5632f5-feab-4fa9-b6c2-75d55333e7ff-2019-01-16T13:59:30.504Z]
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-6.5.1.jar:6.5.1]
at org.elasticsearch.xpack.watcher.transform.script.ExecutableScriptTransform.execute(ExecutableScriptTransform.java:38) ~[x-pack-watcher-6.5.1.jar:6.5.1]
at org.elasticsearch.xpack.watcher.transform.script.ExecutableScriptTransform.execute(ExecutableScriptTransform.java:23) ~[x-pack-watcher-6.5.1.jar:6.5.1]
at org.elasticsearch.xpack.watcher.execution.ExecutionService.executeInner(ExecutionService.java:444) ~[x-pack-watcher-6.5.1.jar:6.5.1]
at org.elasticsearch.xpack.watcher.execution.ExecutionService.execute(ExecutionService.java:295) ~[x-pack-watcher-6.5.1.jar:6.5.1]
at org.elasticsearch.xpack.watcher.execution.ExecutionService.lambda$executeAsync$5(ExecutionService.java:395) ~[x-pack-watcher-6.5.1.jar:6.5.1]
at org.elasticsearch.xpack.watcher.execution.ExecutionService$WatchExecutionTask.run(ExecutionService.java:544) [x-pack-watcher-6.5.1.jar:6.5.1]
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:624) [elasticsearch-6.5.1.jar:6.5.1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_191]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_191]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_191]
Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:657) ~[?:1.8.0_191]
at java.util.ArrayList.get(ArrayList.java:433) ~[?:1.8.0_191]
at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627) ~[?:1.8.0_191]
at org.elasticsearch.painless.DefBootstrap$PIC.fallback(DefBootstrap.java:216) ~[?:?]
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

just to rule out a few things. Have you done an upgrade or is this a fresh installation?

Regarding ignoring it: I meant, this will not affect anything you are doing. Still we should get to the bottom of this issue and fix. Whatever you are doing with watcher will not be a problem despite that error from a watch execution - that's what I wanted to say, sorry for the confusion :slight_smile:

This is a fresh installation and I just follow the steps of chapter - Setup Elasticsearch of online document Elasticsearch reference 6.5, till I found this error in configuring security.

can you share the output of GET _cat/indices please? I do agree that this is a bug and needs to be fixed.

This time no exception. The response is:

< HTTP/1.1 200 OK
< content-type: text/plain; charset=UTF-8
< content-length: 1767
<
green open .monitoring-es-6-2019.01.14 xj9q0ZfJTwOAc94MGdGd8g 5 0 1630 67 1.5mb 1.5mb
green open .watcher-history-9-2019.01.14 h0DlvC0rTRquT3Ss2iKfiw 1 0 1072 0 1.2mb 1.2mb
green open .watcher-history-9-2019.01.22 JKHCY9uTT-6hO_-FjFLdMA 1 0 20 0 100.4kb 100.4kb
green open .watcher-history-9-2019.01.16 7WqoOQluTG251MIttqjuww 1 0 536 0 812.2kb 812.2kb
green open .security-6 fHmukzE9QuO9BrbTQW7hMw 1 0 6 0 19.5kb 19.5kb
yellow open customer rkOXvMjlRtemUtYP3Whf_Q 5 1 0 0 1.2kb 1.2kb
green open .monitoring-es-6-2019.01.22 40W7Gt4hQcCOKC022Q9MTQ 5 0 1090 56 1.3mb 1.3mb
green open .monitoring-es-6-2019.01.16 ROwwI_Y3RiOMZItsw6kgvw 5 0 501 62 1.1mb 1.1mb
green open .monitoring-es-6-2019.01.09 hk2Ju_IsR8mBEgfZf3IBvQ 1 0 1899 70 1.1mb 1.1mb
green open .monitoring-es-6-2019.01.17 eddEp5tUQOWPomDvvPztbg 5 0 74 14 479.7kb 479.7kb
green open .watches VN6C5FEBR5C6DtneCT9i5g 1 0 6 0 58.8kb 58.8kb
green open .monitoring-alerts-6 7TikMq9fTR6sLG1NpiPZVA 5 0 12 2 63kb 63kb
green open .monitoring-es-6-2019.01.21 fLcvMt9aTjShOaLvAMxWSg 5 0 16 0 101.5kb 101.5kb
green open .monitoring-es-6-2019.01.13 7jARe3HsSO2e1DLm0FU_tQ 5 0 961 44 1.3mb 1.3mb
green open .monitoring-es-6-2019.01.19 sTbBxT0MRp25ewJ1R3QD0w 5 0 2108 48 1.5mb 1.5mb
green open .triggered_watches SNGg5srVS7qamVxuedcEJg 1 0 0 0 266b 266b
green open .monitoring-es-6-2019.01.12 z4zY4gJfQbmf5TCTNeiTYQ 5 0 225 37 927.2kb 927.2kb
green open .watcher-history-9-2019.01.13 7OYM9ZO7QHiRNG9lm6x0Gg 1 0 146 0 326.1kb 326.1kb
green open .monitoring-es-6-2019.01.18 8zbsAWeNSnmJszaGhZSEqg 5 0 194 37 878.6kb 878.6kb

This time exception happened. The response is:
< HTTP/1.1 200 OK
< content-type: text/plain; charset=UTF-8
< content-length: 1767
<
green open .monitoring-es-6-2019.01.14 xj9q0ZfJTwOAc94MGdGd8g 5 0 1630 67 1.5mb 1.5mb
green open .watcher-history-9-2019.01.14 h0DlvC0rTRquT3Ss2iKfiw 1 0 1072 0 1.2mb 1.2mb
green open .watcher-history-9-2019.01.22 JKHCY9uTT-6hO_-FjFLdMA 1 0 50 0 296.4kb 296.4kb
green open .watcher-history-9-2019.01.16 7WqoOQluTG251MIttqjuww 1 0 536 0 812.2kb 812.2kb
green open .security-6 fHmukzE9QuO9BrbTQW7hMw 1 0 6 0 19.5kb 19.5kb
yellow open customer rkOXvMjlRtemUtYP3Whf_Q 5 1 0 0 1.2kb 1.2kb
green open .monitoring-es-6-2019.01.22 40W7Gt4hQcCOKC022Q9MTQ 5 0 1102 28 1.1mb 1.1mb
green open .monitoring-es-6-2019.01.16 ROwwI_Y3RiOMZItsw6kgvw 5 0 501 62 1.1mb 1.1mb
green open .monitoring-es-6-2019.01.09 hk2Ju_IsR8mBEgfZf3IBvQ 1 0 1899 70 1.1mb 1.1mb
green open .monitoring-es-6-2019.01.17 eddEp5tUQOWPomDvvPztbg 5 0 74 14 479.7kb 479.7kb
green open .watches VN6C5FEBR5C6DtneCT9i5g 1 0 6 0 69.4kb 69.4kb
green open .monitoring-alerts-6 7TikMq9fTR6sLG1NpiPZVA 5 0 12 1 50kb 50kb
green open .monitoring-es-6-2019.01.21 fLcvMt9aTjShOaLvAMxWSg 5 0 16 0 101.5kb 101.5kb
green open .monitoring-es-6-2019.01.13 7jARe3HsSO2e1DLm0FU_tQ 5 0 961 44 1.3mb 1.3mb
green open .monitoring-es-6-2019.01.19 sTbBxT0MRp25ewJ1R3QD0w 5 0 2108 48 1.5mb 1.5mb
green open .triggered_watches SNGg5srVS7qamVxuedcEJg 1 0 0 0 235b 235b
green open .monitoring-es-6-2019.01.12 z4zY4gJfQbmf5TCTNeiTYQ 5 0 225 37 927.2kb 927.2kb
green open .watcher-history-9-2019.01.13 7OYM9ZO7QHiRNG9lm6x0Gg 1 0 146 0 326.1kb 326.1kb
green open .monitoring-es-6-2019.01.18 8zbsAWeNSnmJszaGhZSEqg 5 0 194 37 878.6kb 878.6kb

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