Unable to create an update script

We are running 2 instances of ElasticCloud version 5.6 - One for production and another for dev/test.
I have run the following simple script successfully in in Kibana for the non-production instance

POST _scripts/update_name
"script" : {
"lang" : "painless",
"source" : "ctx._source.NAME=params.p_NAME;"

However, when I run this same script on the production instance I get the following error

"error": {
"root_cause": [
"type": "illegal_argument_exception",
"reason": "failed to parse/compile stored script [update_name]"
"type": "illegal_argument_exception",
"reason": "failed to parse/compile stored script [update_name]",
"caused_by": {
"type": "illegal_argument_exception",
"reason": "cannot put stored script [update_name], stored scripts cannot be run under any context"
"status": 400

Not sure if it is related but I have read about security settings in the following document (https://www.elastic.co/guide/en/elasticsearch/reference/5.2/modules-scripting-security.html#enable-dynamic-scripting)
However, I can't see how these values are accessible on ElasticCloud if this is the issue.

Which version of Elasticsearch are you using?

Hi Ryan,
Many thanks for reading my query.

Running GET / on kibana on PROD which will not allow me to create the script to run I get

"number": "5.6.9",
"lucene_version": "6.6.1"

I notice that NON-PROD where I could create the script successfully is at version "5.6.10".


Our ElasticSearch administrator was able to find the settings and there was a radio button to enable the running of scripts. This was set and 27 minutes later I was able to run the script.

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