Cant write my license key

Hey, I downloaded the vault enterprise trial binary, copied it to my server and restarted vault completely.
vault --version returns:
Vault v1.5.0+ent

I login with my root token and try to execute the command:
vault write sys/license text=XXXXXXX
using the key I got from Hashicorp.

The answer I get is:

Error writing data to sys/license: Error making API request

URL: PUT https://my.ip.address.com:8200/v1/sys/license
Code: 404. Errors:

* 1 error occurred:
             * unsupported path

Note: The rest api works great (Everything I tried to get and write to the http API worked great).
Any Ideas why this path is unsupported?

The cli seems to translate it to /v1/sys/license. Can you test the vault write with a leading / in the path?

vault write /sys/license text=XXXXXXX

Otherwise you could test the curl way:

What does vault status show?

I think you’re seeing the version from the vault binary in your path, not the server.
The /sys/license path is only available in the Enterprise binary (https://www.vaultproject.io/api/system/license.html)

1 Like