Once this set Kibana ask for a username and password. Which I don't know.
I am unable to curl localhost:9200 without getting an authorization error.
I tried to run setup-passowrds command but that fails because it can't curl or post to the cluster.
I tried using the elasticsearch-users command to add a user and try to curl the cluster. But when I did that it only allowed me to curl localhost:9200 anything else and I would get the following errors:
On Kibana if I added the user I created to kibana.yml
{"statusCode":503,"error":"Service Unavailable","message":"blocked by: [SERVICE_UNAVAILABLE/1/state not recovered / initialized];: [cluster_block_exception] blocked by: [SERVICE_UNAVAILABLE/1/state not recovered / initialized];"}
on the terminal if I tried tocurl -u jim:changeme localhost:9200/_cat/nodes
I ended up deleting the whole cluster (which sucked because I had data in there) and reinstalling Elasticsearch.
I think because the node was once a cluster it refused to work when I attempted to turn it back to a single node. To avoid this when you delete Elasticsearch make sure you remove all the directories and files associate with it. For me that was /var/lib/elasticsearch and /usr/share/elasticsearch.
Once I reinstalled and turned my nodes to single node cluster everything worked fine, I am now in the process of restoring the cluster to what it was.
Yes, that is what I followed.
I re-installed all the nodes. Set them up as single nodes, then set up a ca on the master node and now i'm using that ca to sign the certificates and create the cluster.
I am now facing this same problem again but under different circumstances.
My master node is working fine and the encryption is set up. I set up my node to join and it worked fine and even joins the cluster. However, when I come to run the setup-passwords command it gives me the Failed to authenticate user 'elastic' against http://1.1.1.1:9200/_security/_authenticate?pretty.
I have set up users on this node yet.
Any suggestions to how I can fix this?
At the moment I am installing a clean install of Elasticsearch then setting up cluster, security, and encryption then starting the service. Once that's done I attempt to run the setup-passwords commands. Should I be running this command earlier?
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.