# Automated license install not working on first install

**URL:** https://discuss.elastic.co/t/automated-license-install-not-working-on-first-install/81682
**Category:** Elasticsearch
**Created:** [April 8, 2017, 3:57pm UTC](https://discuss.elastic.co/t/automated-license-install-not-working-on-first-install/81682 "2017-04-08T15:57:32Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![mmoxam](https://avatars.discourse-cdn.com/v4/letter/m/59ef9b/32.png) [@mmoxam](https://discuss.elastic.co/u/mmoxam)
#### Post date: [April 8, 2017, 3:57pm UTC](https://discuss.elastic.co/t/automated-license-install-not-working-on-first-install/81682/1 "2017-04-08T15:57:32Z")

</div>

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](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](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?

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [April 8, 2017, 8:41pm UTC](https://discuss.elastic.co/t/automated-license-install-not-working-on-first-install/81682/2 "2017-04-08T20:41:51Z")

</div>

Doesn't work, meaning what exactly happens?

What version are you using?

---

<div class="post-metadata">

### Author: ![mmoxam](https://avatars.discourse-cdn.com/v4/letter/m/59ef9b/32.png) [@mmoxam](https://discuss.elastic.co/u/mmoxam)
#### Post date: [April 8, 2017, 8:56pm UTC](https://discuss.elastic.co/t/automated-license-install-not-working-on-first-install/81682/3 "2017-04-08T20:56:09Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [April 8, 2017, 10:06pm UTC](https://discuss.elastic.co/t/automated-license-install-not-working-on-first-install/81682/4 "2017-04-08T22:06:59Z")

</div>

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

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [May 6, 2017, 10:19pm UTC](https://discuss.elastic.co/t/automated-license-install-not-working-on-first-install/81682/5 "2017-05-06T22:19:33Z")

</div>

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