Elastic license

Tried to update my license with a:
curl -XPUT -u elastic 'http://localhost:9200>/_xpack/license' -d @license.json

But this results in a:
curl: (1) Protocol "'http" not supported or disabled in libcurl

When using " instead of ' I receive a:
No handler found for uri [/_xpack/license] and method [PUT]

Anyone an idea what I am doing wrong?

Is the >after the port number part of the command you are using? It shouldn't be.

1 Like

When I remove the 9200 I receive a:

curl: (1) Protocol "'http" not supported or disabled in libcurl

Sorry did not read your response correct.

I removed the > but still receive a:

curl: (1) Protocol "'http" not supported or disabled in libcurl

When I use:

curl -XPUT -u elastic 'http://localhost:9200/_xpack/license' -d @license.json

I receive a:

curl: (1) Protocol "'http" not supported or disabled in libcurl

Notice the tiny single slash ' quote as the secong character in there? For some reason it thinks the protocol is 'http. I just tried your first command on my Mac and it seems to work. What machine are you running this on?

I am running on a pc with Windows 10.

When I remove the single slashes, I get a:

No handler found for uri [/_xpack/license] and method [PUT]

[PUT][quote="Mario_van_Gemert, post:5, topic:68859"]
No handler found for uri [/_xpack/license] and method [PUT]
[/quote]

That sound a bit like x-pack isn't installed to me. Just to be sure, can you repost the command that you are running on your windows machine? Also which version of curl do you use (I'm not familiar with Windows if there are different implementations)

1 Like

Commando's used:

curl -XPUT -u elastic 'http://localhost:9200/_xpack/license' -d @license.json
Results in: curl: (1) Protocol "'http" not supported or disabled in libcurl

curl -XPUT -u elastic "http://localhost:9200/_xpack/license" -d @license.json
Results in: No handler found for uri [/_xpack/license] and method [PUT]

Curl version: curl 7.48.0

Problem solved!

The correct command is:
curl -XPUT -u elastic "http://localhost:9200/_xpack/license" -d @license.json

Problem was that I was forgotten to stop/start Elastic, this to effectuate the x-pack plugin.

To acknowledge:

curl -XPUT -u elastic "http://localhost:9200/_xpack/license?acknowledge=true" -d @license.json

Problem solved!

Thnx Christoph! You put me on the right track by mentioning the x-pack not being installed correctly.

1 Like

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