Answer the question
In order to leave comments, you need to log in
Elasticsearch java client - random or works every other time?
Hey!
What needs to be done to make the ElasticSearch java client work always and not once out of five?
Specifically, they kill exceptions that crash 4 times out of 5 launches of the program.
I create client and node
node = nodeBuilder().node();
client = node.client();
script.groovy.sandbox.enabled: false
script.inline: on
script.indexed: on
java.util.concurrent.ExecutionException: org.elasticsearch.ElasticsearchIllegalArgumentException: failed to execute script
at org.elasticsearch.common.util.concurrent.BaseFuture$Sync.getValue(BaseFuture.java:292)
at org.elasticsearch.common.util.concurrent.BaseFuture$Sync.get(BaseFuture.java:279)
at org.elasticsearch.common.util.concurrent.BaseFuture.get(BaseFuture.java:117)
at statistic.Elastic.upsert(Elastic.java:80)
at statistic.VideoIndex.getHashesIndex(VideoIndex.java:451)
at statistic.VideoIndex.index(VideoIndex.java:137)
at statistic.Main.main(Main.java:57)
Caused by: org.elasticsearch.ElasticsearchIllegalArgumentException: failed to execute script
at org.elasticsearch.action.update.UpdateHelper.prepare(UpdateHelper.java:202)
at org.elasticsearch.action.update.TransportUpdateAction.shardOperation(TransportUpdateAction.java:176)
at org.elasticsearch.action.update.TransportUpdateAction.shardOperation(TransportUpdateAction.java:170)
at org.elasticsearch.action.support.single.instance.TransportInstanceSingleOperationAction$AsyncSingleAction$1.run(TransportInstanceSingleOperationAction.java:187)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.elasticsearch.ElasticsearchIllegalArgumentException: script_lang not supported [groovy]
at org.elasticsearch.script.ScriptService.getScriptEngineServiceForLang(ScriptService.java:231)
at org.elasticsearch.script.ScriptService.compile(ScriptService.java:270)
at org.elasticsearch.script.ScriptService.executable(ScriptService.java:457)
at org.elasticsearch.action.update.UpdateHelper.prepare(UpdateHelper.java:196)
... 6 more
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question