I'm getting this error while I'm trying to push a _watcher configuration to elasticsearch:
{"error":{"root_cause":[{"type":"script_exception","reason":"failed to compile script [ScriptException[scripts of type [inlin], operation [elasticsearch-watcher_watch] and lang [groovy] are disabled]] with lang [return [ body: groovy.json.JsonOutput.toJson(ctx.payload.hits.hits)]] of type [groovy]"}],"type":"script_exception","reason":"failed to compile script [ScriptException[scripts of type [inline], operation [elasticsearch-watcher_watch] and lang [groovy] are disabled]] with lang [return [ body: groovy.json.JsonOutput.toJson(ctx.payload.hits.hits)]] of type [groovy]"},"status":500}[
I'm using elasticsearch docker image and I've edit the elasticsearch.yml file and I've write the following,
echo "script.engine.groovy.inline.aggs: on" >> /etc/elasticsearch/elasticsearch.yml
echo "script.engine.groovy.inline.mapping: on" >> /etc/elasticsearch/elasticsearch.yml
echo "script.engine.groovy.inline.search: on" >> /etc/elasticsearch/elasticsearch.yml
echo "script.engine.groovy.inline.update: on" >> /etc/elasticsearch/elasticsearch.yml
echo "script.engine.groovy.inline.plugin: on" >> /etc/elasticsearch/elasticsearch.yml
I restart the container but nothing happens, the error still occurs. Am I missing something? Thanks