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