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 无法启动

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM