Elasticsearch更新license

前言

之前安装Elasticsearch时,没注意有试用期限,导致早上服务突然停止,查看日志提示如下错误:

[ERROR][o.e.x.s.a.f.SecurityActionFilter] [l-pgvpc] blocking [cluster:monitor/health] operation due to expired license. Cluster health, cluster stats and indices stats
operations are blocked on license expiration. All data operations (read and write) continue to work.
If you have a new license, please update it. Otherwise, please reach out to your support contact.

到官网查看后,发现第一个license只有30天试用期+7天保存数据时长,超过试用期后程序就无法正常运行了,只能再次申请license

免费的license一年只能申请一次,有效期1年

更新license

登录官方license申请地址 https://register.elastic.co/marvel_register

看到如下页面,依次填写姓名,姓氏,邮箱,公司,国家,填完后点击Send

进入邮箱查收邮件,看到如下内容

点击链接下载license,选择对应版本的license;根据自己的版本查看更新方法

上传license到Elasticsearch服务器

curl -XPUT -u elastic 'http://10.10.10.1:9200/_xpack/license' -H "Content-Type: application/json" -d @license.json

如果新的license不支持以前license中提供的所有功能,则返回如下信息。要完成license安装,必须重新提交license更新请求并将acknowledge参数设置为true以表示已了解更改。

{"acknowledged":false,"license_status":"valid","acknowledge":{"message":"This license update requires acknowledgement. To acknowledge the license, please read the following messages and update the license again, this time with the \"acknowledge=true\" parameter:","watcher":["Watcher will be disabled"],"security":["The following X-Pack security functionality will be disabled: authentication, authorization, ip filtering, and auditing. Please restart your node after applying the license.","Field and document level access control will be disabled.","Custom realms will be ignored."],"monitoring":["Multi-cluster support is disabled for clusters with [BASIC] license. If you are\nrunning multiple clusters, users won't be able to access the clusters with\n[BASIC] licenses from within a single X-Pack Kibana instance. You will have to deploy a\nseparate and dedicated X-pack Kibana instance for each [BASIC] cluster you wish to monitor.","Automatic index cleanup is locked to 7 days for clusters with [BASIC] license."],"graph":["Graph will be disabled"],"ml":["Machine learning will be disabled"]}}
curl -XPUT -u elastic 'http://10.10.10.1:9200/_xpack/license?acknowledge=true' -H "Content-Type: application/json" -d @license.json

返回如下信息说明安装成功

{"acknowledged":true,"license_status":"valid"}

在bash下输入,查看license状态

curl -XGET -u user:password 'http://10.10.10.1:9200/_license'

出现如下所示,说明更新成功

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值