title: Cannot set password for elastic user
body: <p>I'm following <a href="https://medium.com/@jitendrashah1015/elasticsearch-es-cluster-setup-with-high-availability-and-rbac-enabled-kibana-b5f4e54c4631" rel="nofollow noreferrer">this post</a>, security session to set up a new password for elastic user. Running <code>./bin/elasticsearch-setup-passwords interactive</code> gave:</p>
  <pre><code>Failed to determine the health of the cluster running at http://es-ip-1:9200
  Unexpected response code [503] from calling GET http://es-ip-1:9200/_cluster/health?pretty
  Cause: master_not_discovered_exception
  
  Unexpected response code [503] from calling PUT http://es-ip-1:9200/_security/user/apm_system/_password?pretty
  Cause: Cluster state has not been recovered yet, cannot write to the [null] index
  
  ERROR: Failed to set password for user [apm_system].
  </code></pre>
  <p>I entered the same password for all these <code>elastic,apm_system,kibana,kibana_system,logstash_system,beats_system,remote_monitoring_user</code>. What wrong did I do here, logging in elastic with new password doesn't work. Thanks.</p>
  <p><strong>Update</strong></p>
  <p>Config is the same on both nodes, except the <code>network.host</code> which is the private IP address of each node</p>
  <p>elasticsearch.yml</p>
  <pre><code>network.host: es-ip-1
  discovery.zen.ping.unicast.hosts: [es-ip-1, es-ip-2, es-ip-3]
  discovery.zen.minimum_master_nodes: 2
  xpack.security.enabled: true
  xpack.security.transport.ssl.enabled: true
  xpack.security.transport.ssl.verification_mode: certificate
  xpack.security.transport.ssl.keystore.path: elastic-certificates.p12
  xpack.security.transport.ssl.truststore.path: elastic-certificates.p12
  </code></pre>