简体   繁体   English

无法更新奇迹许可证

[英]Failed to update marvel license

I have an elasticsearch cluster in our close environment (no internet connection). 我在封闭的环境中(没有互联网连接)有一个Elasticsearch集群。 Few days ago, marvel's license in my elasticsearch cluster has expired, so I downloaded the free basic license which elastic provides in their site. 几天前,我的elasticsearch集群中的marvel许可证已过期,因此我下载了Elastic在其站点中提供的免费基本许可证。

I tried to update the license with the following command : 我尝试使用以下命令更新许可证:

curl -XPUT -u admin ' http://host:port/_license ' -d @/path/to/bla.json curl -XPUT -u管理员' http:// host:port / _license' -d @ / path / to / bla.json

and the output I received was : 我收到的输出是:

{"error":{"root_cause":[{"type":"parse_exception","reason":"Failed to derive xcontent"}],"type":"parse_exception","reason":"Failed to derive xcontent"},"status":400} {“错误”:{“ root_cause”:[{“类型”:“ parse_exception”,“原因”:“无法导出xcontent”}],“类型”:“ parse_exception”,“原因”:“无法导出xcontent “},”状态“:400}

Can you help me update my license ? 您能帮我更新我的许可证吗? Thanks :) 谢谢 :)

This might be happening because the license you are trying to install doesn't support the features as supported by older version. 这可能是由于您要安装的许可证不支持旧版本所支持的功能而发生的。 hence you can try this 所以你可以试试这个

 curl -XPUT -u admin 'http://<host>:<port>/_license?acknowledge=true' -d @license.json 

This sets acknowledge parameter to be true so that you are aware of changes. 这会将acknowledge参数设置为true以便您知道更改。

Not tried though ! 没有尝试过! Hope this helps... 希望这可以帮助...

EDIT 编辑

You can try to install the updated version as follows: 您可以尝试按照以下方式安装更新的版本:

1) Download the licence '.zip' file 1)下载许可证“ .zip”文件

 wget https://download.elastic.co/elasticsearch/release/org/elasticsearch/plugin/license/2.2.0/license-2.2.0.zip

2) Install the plugins using the zip files 2)使用zip文件安装插件

 bin/plugin install file:///path-of-zip-file

You can try to copy the content of license.json manually to the place where "@license.json" lies in.Like this: 您可以尝试将license.json的内容手动复制到“ @ license.json”所在的位置。就像这样:

curl -XPUT -u admin 'http://:/_license?acknowledge=true' -d '{"license":.......}' curl -XPUT -u admin'http://:/ _license?acknowledge = true'-d'{“ license”:.......}'

In the end the problem was actually the json itself. 最后,问题实际上是json本身。 Thanks anyway for your help guys :) 无论如何,谢谢您的帮助:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM