elasticsearch x-pack license过期


1.注册一个新的license,每一项都要填写,每次可以使用一年,一年到期后再来注册一个新的


2.更新license (官方文档:https://www.elastic.co/guide/en/x-pack/5.6/installing-license.html)
上传license文件后执行下面的命令:
curl -XPUT -u elastic 'http://10.127.0.1:9200/_xpack/license?acknowledge=true' -H "Content-Type: application/json" -d @gavin-c3c8a5f8-effc-432a-8e52-276e2a6324ad-v5.json
提示输入密码 Enter host password for user 'elastic': (默认密码是changeme)
返回:{"acknowledged":true,"license_status":"valid"}

3.查看新的license https://www.elastic.co/guide/en/x-pack/5.6/listing-licenses.html
curl -XGET -u user:password 'http://<host>:<port>/_xpack/license'
curl -XGET -u elastic:changeme 'http://10.127.0.1:9200/_license'
返回:

{
  "license" : {
    "status" : "active",
    "uid" : "c3c8a5f8-effc-432a-8e52-276e2a6324ad",
    "type" : "basic",
    "issue_date" : "2018-03-07T00:00:00.000Z",
    "issue_date_in_millis" : 1520380800000,
    "expiry_date" : "2019-03-07T23:59:59.999Z",
    "expiry_date_in_millis" : 1552003199999,
    "max_nodes" : 100,
    "issued_to" : "yang xiang (cy)",
    "issuer" : "Web Form",
    "start_date_in_millis" : 1520380800000
  }
}

参考地址:https://www.jianshu.com/p/a49d93212eca

原文地址:https://www.cnblogs.com/gavinYang/p/11200234.html