Script exception-scripts of type [inline], operation [update] and lang [groovy] are disabled

Hi,
I am very much new to elastic search and trying to build a small search application--
when I am trying to update document getting exception-
API - curl -XPOST '127.0.0.1:9200/ugc/questions/1/_update' -d'{"script":"ctx._source.views+=1","params":{"views":0}}'

Resp -
"error":{"root_cause":[{"type":"remote_transport_exception","reason":"[satty_n][127.0.0.1:9300][indices:data/write/update[s]]"}],"type":"illegal_argument_exception","reason":"failed to execute script","caused_by":{"type":"script_exception","reason":"scripts of type [inline], operation [update] and lang [groovy] are disabled"}},"status":400}

My elastice search is running on 9200 , dont know why its giving error on 9300 port and I did two below config changes -
script.engine.groovy.inline.aggs: on
script.engine.groovy.inline.search: on
and tried after that and again getting same error.

I think you'll need:

script.engine.groovy.inline.update: on
2 Likes

Thanks nik, Its working now...:slight_smile:

Hi Nik,
Thanks for help, just have one query-- why 9300 port was coming in error, while nothing was running on 9300 port.