# Failed to authenticate user elastic

**URL:** <https://discuss.elastic.co/t/failed-to-authenticate-user-elastic/245604>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [August 19, 2020, 12:45pm UTC](https://discuss.elastic.co/t/failed-to-authenticate-user-elastic/245604 "2020-08-19T12:45:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Divyabharathi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/divyabharathi/32/74167_2.png) [@Divyabharathi](https://discuss.elastic.co/u/Divyabharathi)\
**Post date:** [August 19, 2020, 12:45pm UTC](https://discuss.elastic.co/t/failed-to-authenticate-user-elastic/245604/1 "2020-08-19T12:45:46Z")

</div>

I have 3 instances of elasticsearch 7.6 (2-master+data & 1- data). Cluster name is same in all three instances. I have enabled the security using xpack.security.enabled=true and xpack.security.transport.ssl.enabled=true in all three elasticsearch.yml. In the first instance (master+data) i have executed setup password interactive and have set the password for all the users. Curl command with credentials working fine in this instance but in other two instances getting , failed to authenticate user elastic. Can someone please guide since im very new to elasticsearch.

FYI.

* * *

ES1:

cluster.name: myapp  
node.name: master  
node.master: true  
node.data: true  
network.host: 10.10.10.10  
http.port: 9200  
discovery.seed\_hosts: ["10.10.10.10", "10.10.10.20" , "10.10.10.30"]  
xpack.security.enabled: true  
xpack.security.transport.ssl.enabled: true

* * *

ES2:

cluster.name: myapp  
node.name: master  
node.master: true  
node.data: true  
network.host: 10.10.10.20  
http.port: 9200  
discovery.seed\_hosts: ["10.10.10.10", "10.10.10.20" , "10.10.10.30"]  
xpack.security.enabled: true  
xpack.security.transport.ssl.enabled: true

* * *

ES3:  
cluster.name: myapp  
node.name: data  
node.master: false  
node.data: true  
network.host: 10.10.10.30  
http.port: 9200  
discovery.seed\_hosts: ["10.10.10.10", "10.10.10.20" , "10.10.10.30"]  
xpack.security.enabled: true  
xpack.security.transport.ssl.enabled: true

* * *

I have tested the connectivity between 3 severs using telnet on 9300 and its fine. I had also got master not discoverd exception on .20 and .30

---

<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:** [August 19, 2020, 10:01pm UTC](https://discuss.elastic.co/t/failed-to-authenticate-user-elastic/245604/2 "2020-08-19T22:01:38Z")

</div>

Welcome to our community! 😃

Can you please post the Elasticsearch logs from one of the new hosts.

---

<div class="post-metadata">

**Author:** ![Divyabharathi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/divyabharathi/32/74167_2.png) [@Divyabharathi](https://discuss.elastic.co/u/Divyabharathi)\
**Post date:** [August 20, 2020, 5:04am UTC](https://discuss.elastic.co/t/failed-to-authenticate-user-elastic/245604/3 "2020-08-20T05:04:37Z")

</div>

Hi ,

curl -u elastic:pwd '10.10.10.20:9200'

{"error":  
{"root\_cause": [{ "type": "security\_exception", "reason": " failed to authenticate user [elastic]", "header" : {"WWW-Authenticate": "Basic realm= "security" charset="UTF-8""}}],  
"type":"security-exception", "reason":"failed to authenticate user [eastic]", "header":"{WWW-Authenticate": "Basic realm= "security" charset="UTF-8""}}, "status":401}

---

<div class="post-metadata">

**Author:** ![Divyabharathi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/divyabharathi/32/74167_2.png) [@Divyabharathi](https://discuss.elastic.co/u/Divyabharathi)\
**Post date:** [August 20, 2020, 5:10am UTC](https://discuss.elastic.co/t/failed-to-authenticate-user-elastic/245604/4 "2020-08-20T05:10:11Z")

</div>

Hi Below from the elastic search cluster log file.

Exception caught on transport layer [Netty4TcpChannel [localAddress=/10.10.10.20:9300, remoteAddress=/10.10.10.30:39430}], closing connection

io.netty.handler.codec.DecodeException: javax.net.ssl.SSLHandshakeException: No available authentication scheme

---

<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:** [September 17, 2020, 5:10am UTC](https://discuss.elastic.co/t/failed-to-authenticate-user-elastic/245604/5 "2020-09-17T05:10:13Z")

</div>

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