# If I enable xpack , Elasticsearch stops working and my license won't work

**URL:** https://discuss.elastic.co/t/if-i-enable-xpack-elasticsearch-stops-working-and-my-license-wont-work/248690
**Category:** Elasticsearch
**Tags:** elastic-stack-security
**Created:** [September 15, 2020, 2:08pm UTC](https://discuss.elastic.co/t/if-i-enable-xpack-elasticsearch-stops-working-and-my-license-wont-work/248690 "2020-09-15T14:08:35Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![cctk](https://avatars.discourse-cdn.com/v4/letter/c/73ab20/32.png) [@cctk](https://discuss.elastic.co/u/cctk)
#### Post date: [September 15, 2020, 2:08pm UTC](https://discuss.elastic.co/t/if-i-enable-xpack-elasticsearch-stops-working-and-my-license-wont-work/248690/1 "2020-09-15T14:08:36Z")

</div>

I have been having an issue viewing the Kibana login page. Since the update to 7x for Elasticsearch and Kibana, I have not been able to access the login page nor has it been prompted for me. Is there any way that this can be solved??

---

<div class="post-metadata">

### Author: ![jsanz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsanz/32/53734_2.png) [@jsanz](https://discuss.elastic.co/u/jsanz)
#### Post date: [September 15, 2020, 5:53pm UTC](https://discuss.elastic.co/t/if-i-enable-xpack-elasticsearch-stops-working-and-my-license-wont-work/248690/2 "2020-09-15T17:53:19Z")

</div>

Are you sure that Elasticsearch security is enabled?

You can try using `curl` or just your browser (from an incognito tab, for example) to access your Elasticsearch cluster and see if you get a user/password prompt or an error if you are using `curl`

You should see something like this:

```bash
$ curl http://localhost:9200
{"error":{"root_cause":[{"type":"security_exception","reason":"missing authentication credentials for REST request [/]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}}],"type":"security_exception","reason":"missing authentication credentials for REST request [/]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}},"status":401}

```

If instead you get something like this you need to enable the security plugin.

```bash
➜ curl http://localhost:9200
{
  "name" : "a",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "uOt8401ySMW5VAgrDGl8_g",
  "version" : {
    "number" : "7.9.1-SNAPSHOT",
    "build_flavor" : "default",
    "build_type" : "tar",
    "build_hash" : "83a0fbd382623d5aa2d9ac8abcfa21dc57278605",
    "build_date" : "2020-09-02T19:31:56.319403Z",
    "build_snapshot" : true,
    "lucene_version" : "8.6.2",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}

```

You can also try to use the [Security API](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api.html) and see if those endpoints are working for you like

```auto
GET /_security/privilege
GET /_security/user

```

---

<div class="post-metadata">

### Author: ![cctk](https://avatars.discourse-cdn.com/v4/letter/c/73ab20/32.png) [@cctk](https://discuss.elastic.co/u/cctk)
#### Post date: [September 16, 2020, 11:31am UTC](https://discuss.elastic.co/t/if-i-enable-xpack-elasticsearch-stops-working-and-my-license-wont-work/248690/3 "2020-09-16T11:31:32Z")

</div>

if I enable xpack , Elasticsearch stops working and my license won't work.

---

<div class="post-metadata">

### Author: ![jsanz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsanz/32/53734_2.png) [@jsanz](https://discuss.elastic.co/u/jsanz)
#### Post date: [September 16, 2020, 11:54am UTC](https://discuss.elastic.co/t/if-i-enable-xpack-elasticsearch-stops-working-and-my-license-wont-work/248690/4 "2020-09-16T11:54:33Z")

</div>

Sorry to hear that, I've moved this thread to the Elasticsearch forum, used your sentence as title, and added the `stack-security` tag, since that's the source of your isssue.

Have you checked the elasticsearch logs for any errors?

---

<div class="post-metadata">

### Author: ![cctk](https://avatars.discourse-cdn.com/v4/letter/c/73ab20/32.png) [@cctk](https://discuss.elastic.co/u/cctk)
#### Post date: [September 16, 2020, 11:59am UTC](https://discuss.elastic.co/t/if-i-enable-xpack-elasticsearch-stops-working-and-my-license-wont-work/248690/5 "2020-09-16T11:59:22Z")

</div>

yeah there is literally no errors right now , just the shards fail everyday due to `index.max_docvalue_fields_search` being less than 200. which I am also trying to fix. However , I know that it will fail as soon as I turn ` xpack to enabled`

---

<div class="post-metadata">

### Author: ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)
#### Post date: [September 18, 2020, 2:53am UTC](https://discuss.elastic.co/t/if-i-enable-xpack-elasticsearch-stops-working-and-my-license-wont-work/248690/6 "2020-09-18T02:53:41Z")

</div>

We're happy to help sort this out, but we'll need more information.

There's a lot of non-specific information like `an issue viewing the Kibana login page` and `Elasticsearch stops working` but in order to help we need details.

Something like

> If I change the `x.y.z` setting to `true` in my `something.conf` config file, then when I try to run `thingo` it fails with the error message `Please don't do that`.

The more specific you are, the easier it is for us to help and the more likely we are to solve it.

---

<div class="post-metadata">

### Author: ![cctk](https://avatars.discourse-cdn.com/v4/letter/c/73ab20/32.png) [@cctk](https://discuss.elastic.co/u/cctk)
#### Post date: [September 18, 2020, 11:48am UTC](https://discuss.elastic.co/t/if-i-enable-xpack-elasticsearch-stops-working-and-my-license-wont-work/248690/7 "2020-09-18T11:48:58Z")

</div>

okay thank you ,  
The initial problem was that if I open Kibana through url it will not prompt me with a login. your colleague then suggested enabling the security. So now , when I updated Elasticsearch to 7x I was having a problem with xpack security and the user password. my license was not being recognised or being added into Kibana too. I then realised xpack was the issue by turning it to false everything started working.

I would show more to you but I haven't turned the xpack to enabled incase of failure. could u tell me what you would prefer me to show you.

I do not get a password prompt when using `curl`

---

<div class="post-metadata">

### Author: ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)
#### Post date: [September 20, 2020, 2:04am UTC](https://discuss.elastic.co/t/if-i-enable-xpack-elasticsearch-stops-working-and-my-license-wont-work/248690/8 "2020-09-20T02:04:47Z")

</div>

> [@cctk](#):
>
> could u tell me what you would prefer me to show you.

In order to help you, I need the sort of details that I mentioned in my previous reply.  
That's not a _preference_, I simply cannot offer you any useful advice unless I have specific details about the problem you are facing.

It's entirely up to you whether you want to do that, but there's nothing I can do for you without it.

---

<div class="post-metadata">

### Author: ![cctk](https://avatars.discourse-cdn.com/v4/letter/c/73ab20/32.png) [@cctk](https://discuss.elastic.co/u/cctk)
#### Post date: [September 22, 2020, 12:58pm UTC](https://discuss.elastic.co/t/if-i-enable-xpack-elasticsearch-stops-working-and-my-license-wont-work/248690/9 "2020-09-22T12:58:03Z")

</div>

okay I see at the time I didn't do anything so I couldn't show u but I have changed the Security.

```auto
14720]: {"type":"log","@timestamp":"2020-09-22T12:42:57Z","tags":["warning","plugins","alerts","plugins","alerting"],"pid":14720,"message":"APIs are disabled due to the Encrypted Saved Objects plugin using an ephemeral encryption key. Please set xpack.encryptedSavedObjects.encryptionKey in kibana.yml."}
4720]: {"type":"log","@timestamp":"2020-09-22T12:42:58Z","tags":["info","plugins","monitoring","monitoring"],"pid":14720,"message":"config sourced from: production cluster"}
Sep 22 12:42:58 [14720]: {"type":"log","@timestamp":"2020-09-22T12:42:58Z","tags":["info","plugins","reporting","config"],"pid":14720,"message":"Chromium sandbox provides an additional layer of protection, and is supported for Linux Ubuntu S. Automatically enabling Chromium sandbox."}
Sep 22 12:42:58 [14720]: {"type":"log","@timestamp":"2020-09-22T12:42:58Z","tags":["warning","plugins","licensing"],"pid":14720,"message":"License information could not be obtained from Elasticsearch due to [security_exception] unable to authenticate user [elastic] for REST request [/_xpack], with { header={ WWW-Authenticate=\"Basic realm=\\\"security\\\" charset=\\\"UTF-8\\\"\" } } :: {\"path\":\"/_xpack\",\"statusCode\":401,\"response\":\"{\\\"error\
Sep 22 12:42:58 14720]: {"type":"log","@timestamp":"2020-09-22T12:42:58Z","tags":["warning","plugins","monitoring","monitoring"],"pid":14720,"message":"X-Pack Monitoring Cluster Alerts will not be available: [security_exception] unable to authenticate user [elastic] for REST request [/_xpack], with { header={ WWW-Authenticate=\"Basic realm=\\\"security\\\" charset=\\\"UTF-8\\\"\" } }"}
Sep 22 12:42:58 4720]: {"type":"log","@timestamp":"2020-09-22T12:42:58Z","tags":["warning","plugins","licensing"],"pid":14720,"message":"License information could not be obtained from Elasticsearch due to [security_exception] unable to authenticate user [elastic] for REST request [/_xpack], with { header={ WWW-Authenticate=\"Basic realm=\\\"security\\\" charset=\\\"UTF-8\\\"\" } } :: {\"path\":\"/_xpack\",\"statusCode\":401,\"response\":\"{\\\"error\
Sep 22 12:42:58 720]: {"type":"log","@timestamp":"2020-09-22T12:42:58Z","tags":["info","savedobjects-service"],"pid":14720,"message":"Waiting until all Elasticsearch nodes are compatible with Kibana before starting saved objects migrations..."}
Sep 22 12:42:58 4720]: {"type":"log","@timestamp":"2020-09-22T12:42:58Z","tags":["error","savedobjects-service"],"pid":14720,"message":"Unable to retrieve version information from Elasticsearch nodes."}
Sep 22 12:43:28 4720]: {"type":"log","@timestamp":"2020-09-22T12:43:28Z","tags":["warning","plugins","licensing"],"pid":14720,"message":"License information could not be obtained from Elasticsearch due to [security_exception] unable to authenticate user [elastic] for REST request [/_xpack], with { header={ WWW-Authenticate=\"Basic realm=\\\"security\\\" charset=\\\"UTF-8\\\"\" } } :: {\"path\":\"/_xpack\",\"statusCode\":401,\"response\":\"{\\\"error\

```

This is the error that comes up in Kibana logs when I enable `xpack`

---

<div class="post-metadata">

### Author: ![cctk](https://avatars.discourse-cdn.com/v4/letter/c/73ab20/32.png) [@cctk](https://discuss.elastic.co/u/cctk)
#### Post date: [September 24, 2020, 2:27pm UTC](https://discuss.elastic.co/t/if-i-enable-xpack-elasticsearch-stops-working-and-my-license-wont-work/248690/10 "2020-09-24T14:27:36Z")

</div>

I have resolved the issue. thank you

---

<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: [October 22, 2020, 2:27pm UTC](https://discuss.elastic.co/t/if-i-enable-xpack-elasticsearch-stops-working-and-my-license-wont-work/248690/11 "2020-10-22T14:27:41Z")

</div>

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