Elasticsearch 错误列表

code:illegal_argument_exception
message:Rejecting mapping update to [test] as the final mapping would have more than 1 type: [_doc, book]
触发前提:已存在数据 http://127.0.0.1:9200/test/_doc/1
触发地址:http://127.0.0.1:9200/test/book/1
触发数据:{"counter" : 2,"tags" : ["red"]}
原因:Elasticsearch 7 全面移除映射类型,不允许出现超过1个的映射类型
code:./elasticsearch-setup-passwords interactive
message:Unexpected response code [500] from calling GET http://192.168.31.219:9200/_security/_authenticate?pretty
 It doesn't look like the X-Pack security feature is enabled on this Elasticsearch node.
 Please check if you have enabled X-Pack security in your elasticsearch.yml configuration file.
 ERROR: X-Pack Security is disabled by configuration.
打开 http://192.168.31.219:9200/_security/_authenticate?pretty
{
   "error" : {
     "root_cause" : [
       {
         "type" : "exception",
         "reason" : "Security must be explicitly enabled when using a [basic] license. Enable security by setting [xpack.security.enabled] to [true] in the elasticsearch.yml file and restart the node."
       }
     ],
     "type" : "exception",
     "reason" : "Security must be explicitly enabled when using a [basic] license. Enable security by setting [xpack.security.enabled] to [true] in the elasticsearch.yml file and restart the node."
   },
   "status" : 500
 }
编辑elasticsearch.yml,加入[xpack.security.enabled:true],然后重启节点
重启时遇到错误:
ERROR: [1] bootstrap checks failed
 [1]: Transport SSL must be enabled if security is enabled on a [basic] license. Please set [xpack.security.transport.ssl.enabled] to [true] or disable security by setting [xpack.security.enabled] to [false]
编辑elasticsearch.yml,加入[xpack.security.transport.ssl.enabled:true],然后重启节点

Leave Comment

电子邮件地址不会被公开。 必填项已用*标注