Update Marvel license failed

I have installed a "trial" license for Marvel and the status is now "expired".
I downloaded a "Basic License" and I try to install it (ElasticSearch is in v2.1.0).

curl -XPUT -u admin 'http://192.168.0.4:9200/_license' -d @license.json

I got this error :

{"error":{"root_cause":[{"type":"parse_exception","reason":"Failed to derive xcontent"}],"type":"parse_exception","reason":"Failed to derive xcontent"},"status":400}

My host is a Windows 2012 Server ; I tried to replace ' by " but the result is the same.

I just see that there is an issue on that problem : https://github.com/elastic/elasticsearch/issues/15677

I've also raised this against our internal Marvel issue tracker, I can't provide a link though sorry.

Oliver, this error occurs when there is no body sent in the curl request to the license API. Can you confirm that you are referencing the Basic license json file you downloaded instead of license.json

For me, a successful command looks sort of like this (actual path and filename changed)

 curl -XPUT -u admin 'http://192.168.0.4:9200/_license' -d @/path/to/my/license/steve-kearns-guid.json

Hi Steve, I confirm that I have referenced the Basic license json file I downloaded.

Hm. Can you verify that the license file itself is not empty? The error message still makes me think that no content from the license file is making it to Elasticsearch.

In your original post, you mentioned that you are running Windows. How are you running curl? Are you using powershell, cygwin, or cmd.exe as your terminal?

I test the command line both with cmd.exe and conEmu (http://conemu.github.io/).
I use curl 7.44.0 (i686-pc-msys).

The JSON file is not empty and it is well formated and filled.

Did you try using the full path to the file, instead of a relative path?

Any update on this?
I am getting the same error on 2.4.1 :confused:

Any progress?
I am getting the same error too, on 5.1.1:sob:

I had the same error, but then made sure, that the json file contains the correct content, which it didn't.

I had a typo in the curl call and used a large D as flag which writes the response to the file.

Maybe that can be of use to someone :wink: