# In docker elasticsearch 5.2.1 x-pack can not login

**URL:** <https://discuss.elastic.co/t/in-docker-elasticsearch-5-2-1-x-pack-can-not-login/72590>\
**Category:** Elasticsearch\
**Created:** [January 24, 2017, 8:33am UTC](https://discuss.elastic.co/t/in-docker-elasticsearch-5-2-1-x-pack-can-not-login/72590 "2017-01-24T08:33:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dbaxyx](https://avatars.discourse-cdn.com/v4/letter/d/5f9b8f/32.png) [@dbaxyx](https://discuss.elastic.co/u/dbaxyx)\
**Post date:** [January 24, 2017, 8:33am UTC](https://discuss.elastic.co/t/in-docker-elasticsearch-5-2-1-x-pack-can-not-login/72590/1 "2017-01-24T08:33:35Z")

</div>

**Hi my dear,**  
**At first,Let me describe my installation environment**  
**1)Three Nodes in Three docker container**

**2)after installed es node,the cluster are worked**

**3)I installed one x-pack in one node,and restart this docker container**

**4)I try login to elasticsearch by the port 9200,the url seems like:**  
However, it has been prompted to log in, wireless repeat, click Cancel to return the result is  
[http://192.168.21.21:9200/\_cat/health?v](http://192.168.21.21:9200/_cat/health?v)  
there request result:  
{"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 [elastic]","header":{"WWW-Authenticate":"Basic realm="security" charset="UTF-8""}},"status":401}

**5)so, I try to use the url to change the password,are return the result like step 4:**  
curl -XPUT -u elastic '192.168.21.21:9200/\_xpack/security/user/elastic/\_password' -d '{  
"password" : "elasticpassword"  
}'  
\*\*

```
{"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 [elastic]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}},"status":401}

```

**Finally I was helpless, and then I according to the URL and do it again, or the same**  
**[https://www.elastic.co/guide/en/x-pack/current/security-getting-started.html](https://www.elastic.co/guide/en/x-pack/current/security-getting-started.html)**

**please help me , Thks alot.**

---

<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:** [January 24, 2017, 8:37am UTC](https://discuss.elastic.co/t/in-docker-elasticsearch-5-2-1-x-pack-can-not-login/72590/2 "2017-01-24T08:37:23Z")

</div>

You need to install X-Pack on all nodes at the same time, you cannot do a rolling install.

---

<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:** [February 21, 2017, 8:37am UTC](https://discuss.elastic.co/t/in-docker-elasticsearch-5-2-1-x-pack-can-not-login/72590/3 "2017-02-21T08:37:32Z")

</div>

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