ES各种错误解决

_update API 执行报错

错误信息:

{
  "error": {
    "root_cause": [
      {
        "type": "remote_transport_exception",
        "reason": "[node-84-106][200.200.84.106: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
}

解决方法:

//sudo vim /etc/elasticsearch/elasticsearch.yml
//添加:
 script.groovy.sandbox.enabled: true         //务必注意配置不要顶格写,要空一格,否则 ES 无法启动
 script.inline: on                           //务必注意配置不要顶格写,要空一格,否则 ES 无法启动
 script.indexed: on                          //务必注意配置不要顶格写,要空一格,否则 ES 无法启动
 script.engine.groovy.inline.update: on      //务必注意配置不要顶格写,要空一格,否则 ES 无法启动
原文地址:https://www.cnblogs.com/licongyu/p/5567769.html