X-pack licence upgrade

Hello,

I want to upgrade the x-pack licence free but every time I use this command I get error:

curl -XPUT -u elastic 'http://localhost:9200/_xpack/license' -H "Content-Type: application/json" -d @adrien-lechantre-81bcbbbe-87b1-4875-b508-d8e05fbfbcb6-v5.json

{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"failed to parse license source"}],"type":"illegal_argument_exception","reason":"failed to parse license source","caused_by":{"type":"json_parse_exception","reason":"Unrecognized token 'license': was expecting ('true', 'false' or 'null')\n at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@82fd816; line: 1, column: 9]"}},"status":400}curl: (6) Couldn't resolve host 'license:type'
curl: (3) Port number out of range
curl: (3) Port number out of range
curl: (6) Couldn't resolve host 'license:max_nodes'
curl: (6) Couldn't resolve host 'license:issued_to'
curl: (6) Couldn't resolve host 'license:issuer'
curl: (6) Couldn't resolve host 'license:signature'
curl: (3) Port number out of range

Is the command I wrote false?

That error doesn't seem to match with the command you provided.

It looks like the content of that file was pased to the curl commandline rather than being sent to the Elasticsearch server.

If that really is the command that you passed, then something weirld is going on.
What Operating System and Shell are you running?

Windows 10, and I use a Cmder for the command prompt, as curl command isn't in Windows normally, maybe that'ts why?

Correction : I can use the curl command in Cmder, but the cmd in Windows doens't support this command, maybe that's why. Any alternatives?

I cleared it out, it works now, thanks.

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