ERROR: Failed to determine the health of the cluster

I'm trying to install elasticsearch on RedHat 8.5 with SELinux enabled and enforcing. Additionally, the account I'm using has very limited sudo privileges so I run a python script to execute the commands. So I am executing the following sequence of commands:

sed,-i,s/true/false/g,/etc/elasticsearch/elasticsearch.yml

sed,-i,s/xpack.security.enabled: false/xpack.security.enabled: true/,/etc/elasticsearch/elasticsearch.yml

sed,-i,s/xpack.security.enrollment.enabled: false/xpack.security.enrollment.enabled: true/,/etc/elasticsearch/elasticsearch.yml

systemctl,restart,elasticsearch

The above commands appear to run successfully. However when I attempt the following:
/usr/share/elasticsearch/bin/elasticsearch-reset-password,-u,elastic,-i

/usr/share/elasticsearch/bin/elasticsearch-reset-password,-u,kibana_system,-i

Both return the following:

ERROR: Failed to determine the health of the cluster.

with no further information. I'm very new to elasticsearch so any suggestions on how to troubleshoot this would be greatly appreciated.

Thanks

Welcome to our community! :smiley:

Can you curl Elasticsearch? What do it's logs show?

Thank you for your reply. I found the problem. Another program was using port 9200.

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