I recently attempted to install elasticsearch on a RHEL VM. I have been following the tutorial at Tutorial 1: Installing a self-managed Elastic Stack | Elastic Installation and Upgrade Guide [8.15] | Elastic.
When I get up to step 3.2, sudo curl --cacert /etc/elasticsearch/certs/http_ca.crt -u elastic:$ELASTIC_PASSWORD https://localhost:9200, I get the error below. If I run sudo systemctl status elasticsearch, it does show that elasticsearch is running.
Does anyone have any idea what is causing the error? I've tried using the ELASTIC_PASSWORD variable as well as replacing it with the actual password.
Thank you!
"error":{"root_cause":[{"type":"status_exception","reason":"Cluster state has not been recovered yet, cannot write to the [null] index"}],"type":"authentication_processing_error","reason":"failed to promote the auto-configured elastic password hash","caused_by":{"type":"status_exception","reason":"Cluster state has not been recovered yet, cannot write to the [null] index"}},"status":503}
Copy the terminal output from the install command to a local file. In particular, you’ll need the password for the built-in elastic superuser account. The output also contains the commands to enable Elasticsearch to run as a service, which you’ll use in the next step.
That is where the elastic password would be it would look something like this on your output....
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ Elasticsearch security features have been automatically configured!
✅ Authentication is enabled and cluster connections are encrypted.
ℹ️ Password for the elastic user (reset with `bin/elasticsearch-reset-password -u elastic`):
sdfgsdfgsdfgsdfgsdfgsdfg. <<<<< THIS IS THE PASSWORD
ℹ️ HTTP CA certificate SHA-256 fingerprint:
asfdasfdasdfasdf08778ca577502769f8159beecc1a8d5f1edc95422321e528
.......
If you did not copy that down... you will need to generate a new password with
Thank you for the reply!
I did save the password and was entering it. Turned out I needed to change my cluster.initial_master_nodes from "localhost" to the name of my first node.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.