# Failed to determine the health of the cluster

**URL:** https://discuss.elastic.co/t/failed-to-determine-the-health-of-the-cluster/379645
**Category:** Elasticsearch
**Created:** [June 30, 2025, 7:41pm UTC](https://discuss.elastic.co/t/failed-to-determine-the-health-of-the-cluster/379645 "2025-06-30T19:41:21Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![HarimbolaSantatra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/harimbolasantatra/32/136974_2.png) [@HarimbolaSantatra](https://discuss.elastic.co/u/HarimbolaSantatra)
#### Post date: [June 30, 2025, 7:41pm UTC](https://discuss.elastic.co/t/failed-to-determine-the-health-of-the-cluster/379645/1 "2025-06-30T19:41:21Z")

</div>

When I run `./elasticsearch-reset-password -i -u elastic --url https://192.168.3.1:9200`, it yields:

```auto
ERROR: Failed to determine the health of the cluster., with exit code 69

```

But when I remove the `--url` flag, I get:

```auto
ERROR: Failed to determine the health of the cluster. Unexpected http status [503], with exit code 65

```

If I run: `curl -Lk -u elastic:password http://localhost:9200/_cluster/health?pretty=null`, it gives me a 401 error. Solving this was the reason I tried to reset my password in the first place.

**What is the meaning of these error code and how can I debug this ?**

Configuration:

```yml
network.host: 192.168.3.1
http.port: 9200
xpack.security.enabled: true
xpack.security.enrollment.enabled: false
xpack.security.http.ssl:
  enabled: false
  keystore.path: certs/http.p12

xpack.security.transport.ssl:
  enabled: true
  verification_mode: certificate
  keystore.path: certs/transport.p12
  truststore.path: certs/transport.p12
cluster.initial_master_nodes: ["localhost"]
http.host: 0.0.0.0

```

---

<div class="post-metadata">

### Author: ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)
#### Post date: [June 30, 2025, 11:27pm UTC](https://discuss.elastic.co/t/failed-to-determine-the-health-of-the-cluster/379645/2 "2025-06-30T23:27:00Z")

</div>

@HarimbolaSantatra

How did you install?

The CLI commands are made to be run from the home directory not from inside the `/bin` directory. See the documentation... this is important

> [@HarimbolaSantatra](#):
>
> When I run `./elasticsearch-reset-password -i -u elastic --url https://192.168.3.1:9200`, it yields:
> 
> ```auto
> ERROR: Failed to determine the health of the cluster., with exit code 69
> 
> ```
> 
> But when I remove the `--url` flag, I get:
> 
> ```auto
> ERROR: Failed to determine the health of the cluster. Unexpected http status [503], with exit code 65
> 
> ```
> 
> If I run: `curl -Lk -u elastic:password http://localhost:9200/_cluster/health?pretty=null`, it gives me a 401 error. Solving this was the reason I tried to reset my password in the first place.

Also I am confused some places you are using `http` other you are using `https`

> [@HarimbolaSantatra](#):
>
> ```auto
> xpack.security.http.ssl:
> enabled: false
> keystore.path: certs/http.p12
> 
> ```

according to the you have https disabled so all connection would be via http

> **[elasticsearch-reset-password | Reference](https://www.elastic.co/docs/reference/elasticsearch/command-line-tools/reset-password)**
>
> The elasticsearch-reset-password command resets the passwords of users in the native realm and built-in users. Use this command to reset the password...

> **[Diagnose password setup connection failures | Elastic Docs](https://www.elastic.co/docs/troubleshoot/elasticsearch/security/trb-security-setup)**
>
> The elasticsearch-setup-passwords command sets passwords for the built-in users by sending user management API requests. If your cluster uses SSL/TLS...

try running

`bin/elasticsearch-reset-password -v -u elastic`

---

<div class="post-metadata">

### Author: ![HarimbolaSantatra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/harimbolasantatra/32/136974_2.png) [@HarimbolaSantatra](https://discuss.elastic.co/u/HarimbolaSantatra)
#### Post date: [July 1, 2025, 5:38pm UTC](https://discuss.elastic.co/t/failed-to-determine-the-health-of-the-cluster/379645/3 "2025-07-01T17:38:08Z")

</div>

> [@stephenb](#):
>
> The CLI commands are made to be run from the home directory not from inside the `/bin` directory. See the documentation... this is important

I always wonder why the doc always mentionned the `bin/` folder! Got it!

Nevertheless I still got the same error.

Also, I fixed the scheme: if I try with

```yml
xpack.security.http.ssl:
  enabled: true

```

... it throws a new error with the same exit code:

```auto
java.security.cert.CertificateException: No subject alternative names matching IP address 192.168.3.1 found
        at sun.security.util.HostnameChecker.matchIP(HostnameChecker.java:160) ~[?:?]
        at sun.security.util.HostnameChecker.match(HostnameChecker.java:101) ~[?:?]
        ...

ERROR: Failed to determine the health of the cluster., with exit code 69

```

I guess that I should recreate the certificate in order to include this IP address on it but I'm not sure of the step I should follow.

---

<div class="post-metadata">

### Author: ![HarimbolaSantatra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/harimbolasantatra/32/136974_2.png) [@HarimbolaSantatra](https://discuss.elastic.co/u/HarimbolaSantatra)
#### Post date: [July 5, 2025, 9:02am UTC](https://discuss.elastic.co/t/failed-to-determine-the-health-of-the-cluster/379645/4 "2025-07-05T09:02:11Z")

</div>

I found the solution! I noticed that it works when I disable my Ethernet network interface. That's because I did not install ES with this interface enabled so now the IP of it is not present in the certificate.

We need to set `verification_mode: certificate`

```auto
xpack.security.http.ssl:
  enabled: true
  verification_mode: certificate

```
