License extend

I downloaded an extend trail license that I received from Elastic and I am trying to install it on my Elasticsearch cluster.

I am getting an error and unable to do it.

mpswrk1@eaasrt!MPS:mpswrk1> curl -XPUT -u elastic:<pass> 'http://localhost:9200/_license' -d @license.json
Warning: Couldn't read data from file "license.json", this makes an empty
Warning: POST.
{"error":{"root_cause":[{"type":"parse_exception","reason":"Failed to derive xcontent"}],"type":"parse_exception","reason":"Failed to derive xcontent"},"status":400}mpswrk1@eaasrt!MPS:mpswrk1>

Any idea?

Hi Sharon,

Instead of @license.json in the command, you should refer to your license file name, which you downloaded, so it may look something like this:

curl -XPUT -u elastic:<pass> 'http://localhost:9200/_license' -d @/path/to/your/license_file_name.json

Thanks,
Steve

That work.

So, I need to understand what does the _license or _xpack/license in the documents stand for?

I was thinking this is the path of the license file.

Thanks
Sharon

Great, glad that works!

In 5.0+, the API endpoint for specifying the license is /_xpack/license, while in 2.x it is /_license.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.