0
votes

I have an elasticsearch cluster in our close environment (no internet connection). 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.

I tried to update the license with the following command :

curl -XPUT -u admin '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}

Can you help me update my license ? Thanks :)

3
Have you incorporated <host> and <port> in your http:// request URL ?Tanu
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 thisTanu
can you try --data-binary instead of -d?alpert

3 Answers

0
votes

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.

Not tried though ! Hope this helps...

EDIT

You can try to install the updated version as follows:

1) Download the licence '.zip' file

 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

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

You can try to copy the content of license.json manually to the place where "@license.json" lies in.Like this:

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

0
votes

In the end the problem was actually the json itself. Thanks anyway for your help guys :)