0

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 :)

RamenCoder
  • 358
  • 1
  • 2
  • 16

3 Answers3

0

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
Tanu
  • 1,503
  • 12
  • 21
  • I'm receiving the same error message with the suggested command. – RamenCoder May 15 '16 at 10:42
  • you cab try installing the new version, not sure though if it will solve the problem. Still you can give it a try, I am editing in the answer. – Tanu May 15 '16 at 13:37
0

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

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

RamenCoder
  • 358
  • 1
  • 2
  • 16