# Unexpected response code \[503\] from calling PUT http://172.16.6.63:9200/\_xpack/security/user/apm\_system/\_password?pretty Cause: Cluster state has not been recovered yet, cannot write to the security index

**URL:** <https://discuss.elastic.co/t/unexpected-response-code-503-from-calling-put-http-172-16-6-63-9200-xpack-security-user-apm-system-password-pretty-cause-cluster-state-has-not-been-recovered-yet-cannot-write-to-the-security-index/205226>\
**Category:** Elasticsearch\
**Created:** [October 25, 2019, 9:49am UTC](https://discuss.elastic.co/t/unexpected-response-code-503-from-calling-put-http-172-16-6-63-9200-xpack-security-user-apm-system-password-pretty-cause-cluster-state-has-not-been-recovered-yet-cannot-write-to-the-security-index/205226 "2019-10-25T09:49:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kiran\_kumar1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kiran_kumar1/32/55777_2.png) [@kiran\_kumar1](https://discuss.elastic.co/u/kiran_kumar1)\
**Post date:** [October 25, 2019, 9:49am UTC](https://discuss.elastic.co/t/unexpected-response-code-503-from-calling-put-http-172-16-6-63-9200-xpack-security-user-apm-system-password-pretty-cause-cluster-state-has-not-been-recovered-yet-cannot-write-to-the-security-index/205226/1 "2019-10-25T09:49:46Z")

</div>

Hi team,

could you help on this issue, when am trying get cluster password. getting issue like below.

exec -it es-coordinating-0 bash -n 2304670352

Defaulting container name to es-coordinating.

Use 'kubectl describe pod/es-coordinating-0 -n 2304670352' to see all of the containers in this pod.

bash-4.2# ls

LICENSE.txt NOTICE.txt README.textile bin config data lib logs modules plugins

bash-4.2# **bin/elasticsearch-setup-passwords auto**

Failed to determine the health of the cluster running at [http://172.16.6.63:9200](http://172.16.6.63:9200)

Unexpected response code [503] from calling GET [http://172.16.6.63:9200/\_cluster/health?pretty](http://172.16.6.63:9200/_cluster/health?pretty)

Cause: master\_not\_discovered\_exception

It is recommended that you resolve the issues with your cluster before running elasticsearch-setup-passwords.

It is very likely that the password changes will fail when run against an unhealthy cluster.

Do you want to continue with the password setup process [y/N]y

Initiating the setup of passwords for reserved users elastic,apm\_system,kibana,logstash\_system,beats\_system,remote\_monitoring\_user.

The passwords will be randomly generated and printed to the console.

Please confirm that you would like to continue [y/N]y

Unexpected response code [503] from calling PUT [http://172.16.6.63:9200/\_xpack/security/user/apm\_system/\_password?pretty](http://172.16.6.63:9200/_xpack/security/user/apm_system/_password?pretty)

Cause: Cluster state has not been recovered yet, cannot write to the security index

Possible next steps:

- Try running this tool again.

- Try running with the --verbose parameter for additional messages.

- Check the elasticsearch logs for additional error details.

- Use the change password API manually.

ERROR: Failed to set password for user [apm\_system].

---

<div class="post-metadata">

**Author:** ![tashtiot](https://avatars.discourse-cdn.com/v4/letter/t/bbce88/32.png) [@tashtiot](https://discuss.elastic.co/u/tashtiot)\
**Post date:** [November 17, 2019, 7:32pm UTC](https://discuss.elastic.co/t/unexpected-response-code-503-from-calling-put-http-172-16-6-63-9200-xpack-security-user-apm-system-password-pretty-cause-cluster-state-has-not-been-recovered-yet-cannot-write-to-the-security-index/205226/2 "2019-11-17T19:32:21Z")

</div>

I have the same issue

---

<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:** [December 15, 2019, 7:32pm UTC](https://discuss.elastic.co/t/unexpected-response-code-503-from-calling-put-http-172-16-6-63-9200-xpack-security-user-apm-system-password-pretty-cause-cluster-state-has-not-been-recovered-yet-cannot-write-to-the-security-index/205226/3 "2019-12-15T19:32:24Z")

</div>

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