# Failed to run "elasticsearch-setup-passwords auto" on ES 7.16.2

**URL:** <https://discuss.elastic.co/t/failed-to-run-elasticsearch-setup-passwords-auto-on-es-7-16-2/295316>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [January 25, 2022, 8:21am UTC](https://discuss.elastic.co/t/failed-to-run-elasticsearch-setup-passwords-auto-on-es-7-16-2/295316 "2022-01-25T08:21:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![asagiv](https://avatars.discourse-cdn.com/v4/letter/a/c57346/32.png) [@asagiv](https://discuss.elastic.co/u/asagiv)\
**Post date:** [January 25, 2022, 8:21am UTC](https://discuss.elastic.co/t/failed-to-run-elasticsearch-setup-passwords-auto-on-es-7-16-2/295316/1 "2022-01-25T08:21:08Z")

</div>

Hi  
I am trying to generate the users/password for the built-in users , and fail with the below errors. can someone help to understand the issue ?  
Regards  
Avi

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

Unexpected response code [503] from calling GET [http://172.25.232.51:9200/\_cluster/health?pretty](http://172.25.232.51: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,kibana\_system,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.25.232.51:9200/\_security/user/apm\_system/\_password?pretty](http://172.25.232.51:9200/_security/user/apm_system/_password?pretty)

Cause: Cluster state has not been recovered yet, cannot write to the [null] 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:** ![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 27, 2022, 2:45am UTC](https://discuss.elastic.co/t/failed-to-run-elasticsearch-setup-passwords-auto-on-es-7-16-2/295316/2 "2022-01-27T02:45:40Z")

</div>

How many nodes in your cluster?  
What does your Elasticsearch config and logs look like?

Please format your code/logs/config using the `</>` button, or markdown style back ticks. It helps to make things easy to read which helps us help 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:** [February 24, 2022, 2:46am UTC](https://discuss.elastic.co/t/failed-to-run-elasticsearch-setup-passwords-auto-on-es-7-16-2/295316/3 "2022-02-24T02:46:23Z")

</div>

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