# "Password authentication failed for elastic"

**URL:** https://discuss.elastic.co/t/password-authentication-failed-for-elastic/244099
**Category:** Elastic Cloud on Kubernetes (ECK)
**Created:** [August 6, 2020, 10:08pm UTC](https://discuss.elastic.co/t/password-authentication-failed-for-elastic/244099 "2020-08-06T22:08:34Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![danielP1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danielp1/32/73483_2.png) [@danielP1](https://discuss.elastic.co/u/danielP1)
#### Post date: [August 6, 2020, 10:08pm UTC](https://discuss.elastic.co/t/password-authentication-failed-for-elastic/244099/1 "2020-08-06T22:08:34Z")

</div>

Greetings,  
I'm trying to get a 'near' vanilla deployment of elasticsearch up and running on ECK which I've based off the quick start instructions [here](https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-quickstart.html)

I initially tried a 3 member cluster and saw a lot of connection failed errors, so to narrow the problem scope I dropped it to a 1 member cluster and now I'm seeing this a lot in the logs:

```
...message": "security index is unavailable. short circuiting retrieval of user [elastic]...
...message": "Authentication to realm file1 failed - Password authentication failed for elastic...

```

authentication setup seems to have failed in some manner but I don't know much about elasticsearch authentication mechanisms or how ECK is setting it up. Any help is appreciated.

I'm deploying ECK onto kubernetes 1.18.6 (rancher) and here is my yaml:

```
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
  name: es1
  namespace: logging
spec:
  version: 7.8.1
  nodeSets:
  - name: cluster1
    count: 1
    config:
      node.master: true
      node.data: true
      node.ingest: true
    podTemplate:
      spec:
        nodeSelector:
          hostpath: ssd
        containers:
        - name: elasticsearch
          env:
          - name: ES_JAVA_OPTS
            value: -Xms8g -Xmx8g
          resources:
            requests:
              memory: 16Gi
              cpu: 1
            limits:
              memory: 16Gi
              cpu: 3
    volumeClaimTemplates:
    - metadata:
        name: elasticsearch-data
      spec:
        accessModes:
        - ReadWriteOnce
        resources:
          requests:
            storage: 100Gi
        storageClassName: openebs-hostpath
```

---

<div class="post-metadata">

### Author: ![Anya\_Sabo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anya_sabo/32/49903_2.png) [@Anya\_Sabo](https://discuss.elastic.co/u/Anya_Sabo)
#### Post date: [August 10, 2020, 1:57pm UTC](https://discuss.elastic.co/t/password-authentication-failed-for-elastic/244099/2 "2020-08-10T13:57:00Z")

</div>

ECK uses the file realm internally to authenticate. Is this happening on a fresh 1 node cluster? If so, the [ECK logs](https://www.elastic.co/guide/en/cloud-on-k8s/1.2/k8s-troubleshooting-methods.html#k8s-get-eck-logs) might also prove useful to troubleshoot

---

<div class="post-metadata">

### Author: ![data\_smith](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/data_smith/32/124122_2.png) [@data\_smith](https://discuss.elastic.co/u/data_smith)
#### Post date: [September 9, 2020, 9:49pm UTC](https://discuss.elastic.co/t/password-authentication-failed-for-elastic/244099/3 "2020-09-09T21:49:39Z")

</div>

I'm running into this issue as well. Vanilla Kubernetes and when I install an Elastic instance it's successful - green status - but it doesn't create any indices - like the .security index. So I get the above error:

```auto
security index is unavailable. short circuiting retrieval of user [elastic]

```

ECK 1.1 is the version

---

<div class="post-metadata">

### Author: ![sebgl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sebgl/32/48702_2.png) [@sebgl](https://discuss.elastic.co/u/sebgl)
#### Post date: [September 10, 2020, 8:06am UTC](https://discuss.elastic.co/t/password-authentication-failed-for-elastic/244099/4 "2020-09-10T08:06:06Z")

</div>

@data_smith can you share your Elasticsearch resource manifest?  
Are you maybe using a different Docker image for Elasticsearch than the official one?

---

<div class="post-metadata">

### Author: ![data\_smith](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/data_smith/32/124122_2.png) [@data\_smith](https://discuss.elastic.co/u/data_smith)
#### Post date: [September 10, 2020, 1:46pm UTC](https://discuss.elastic.co/t/password-authentication-failed-for-elastic/244099/5 "2020-09-10T13:46:13Z")

</div>

I'm on a closed network that doesn't allow me to move things to the open internet. But I found that if I just rename my cluster things work. So my suspicion is that some artifact is left when you delete an Elastic yaml and this artifact (configmap, secret - not sure which) causes problems. So one quick and dirty solution if you reinstall an new Elastic yaml is to rename it.

I'm using the official, latest version of Elastic. 7.7.1

---

<div class="post-metadata">

### Author: ![Anya\_Sabo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anya_sabo/32/49903_2.png) [@Anya\_Sabo](https://discuss.elastic.co/u/Anya_Sabo)
#### Post date: [September 10, 2020, 2:14pm UTC](https://discuss.elastic.co/t/password-authentication-failed-for-elastic/244099/6 "2020-09-10T14:14:23Z")

</div>

> [@data\_smith](#):
>
> I'm on a closed network that doesn't allow me to move things to the open internet. But I found that if I just rename my cluster things work. So my suspicion is that some artifact is left when you delete an Elastic yaml and this artifact (configmap, secret - not sure which) causes problems. So one quick and dirty solution if you reinstall an new Elastic yaml is to rename it.

The garbage collector should delete all of the resources (and does in my tests). One thing that has caused issues with Kibana is having additional services point to it that are named the same thing as config keys (e.g. server), which populates env vars in the pod with values that Kibana can't make sense of. It's possible something similar was happening if changing the name made a difference.

---

<div class="post-metadata">

### Author: ![data\_smith](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/data_smith/32/124122_2.png) [@data\_smith](https://discuss.elastic.co/u/data_smith)
#### Post date: [September 10, 2020, 2:32pm UTC](https://discuss.elastic.co/t/password-authentication-failed-for-elastic/244099/7 "2020-09-10T14:32:44Z")

</div>

I'm not using Kibana so that's not my issue. I know something is left over and it's not obvious because I checked the secrets and configmaps and didn't see anything obvious there. Not sure. Anyhow there's a workaround - just rename it.

---

<div class="post-metadata">

### Author: ![Anya\_Sabo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anya_sabo/32/49903_2.png) [@Anya\_Sabo](https://discuss.elastic.co/u/Anya_Sabo)
#### Post date: [September 10, 2020, 3:55pm UTC](https://discuss.elastic.co/t/password-authentication-failed-for-elastic/244099/8 "2020-09-10T15:55:52Z")

</div>

Kibana was just an example of where we had seen it previously, the same thing could theoretically happen for Elasticsearch. If there is something left over after deleting a resource (assuming garbage collection has not been disabled) it would be a previously unidentified bug, so if you do discover something please let us know.

---

<div class="post-metadata">

### Author: ![data\_smith](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/data_smith/32/124122_2.png) [@data\_smith](https://discuss.elastic.co/u/data_smith)
#### Post date: [September 10, 2020, 7:42pm UTC](https://discuss.elastic.co/t/password-authentication-failed-for-elastic/244099/9 "2020-09-10T19:42:27Z")

</div>

Will do

---

<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: [November 4, 2022, 8:09am UTC](https://discuss.elastic.co/t/password-authentication-failed-for-elastic/244099/10 "2022-11-04T08:09:10Z")

</div>


