Automated license install not working on first install

Hello

I am trying to install a license via curl after installing elastic, kibana and x-pack via rpm.
Currently this does not work and I have to log into kibana first then execute the curl command after that.

It doesn't seem to work if I install the license directly after the installs.

My curl commands work 100% but just doesn't apply it unless I log into kibana

Example commands:
curl -XPUT -u elastic:changeme 'http://localhost:9200/_xpack/license' -H "Content-Type: application/json" -d @mylicense.json

curl -XPUT -u elastic:changeme 'http://localhost:9200/_xpack/license?acknowledge=true' -H "Content-Type: application/json" -d @mylicense.json

To summarize this is the process I'm using:

  1. install elastic, kibana, x-pack
  2. start elastic and kibana
  3. run curl commands for license
  4. restart elastic and kibana
  5. Go to kibana -> Greeted with x-pack login page
  6. Have to re-run the license at this point and then it works.

Am I missing any caveats here?

Doesn't work, meaning what exactly happens?

What version are you using?

Thanks for the reply.

After I run the license commands I would expect when I launch Kibana for the first time that it goes straight to the index page. Instead it goes to the login page meaning the basic license hasn't been applied.
It's version 5.3.

It works after I Iog into Kibana and then run the curl commands again separately.

Thanks for clarifying.
Let me move this so the X-Pack team can see the thread :slight_smile:

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