Yes, I also tried to set password for teh default users for elasticsearch. But Throws me newly error. I don't think I changed the password for Elasticsearch or bootstrap before.
I ran this:
bin/elasticsearch-setup-passwords interactive
Error:
Failed to authenticate user 'elastic' against http://127.0.0.1:9200/_xpack/security/_authenticate?pretty
Possible causes include:
- The password for the 'elastic' user has already been changed on this cluster
- Your elasticsearch node is running against a different keystore
This tool used the keystore at /Path to elasticsearch-6.3.0/config/elasticsearch.keystore
So I referred this thread....
Then created another user and tried to reset the password for elastic user as shown below:
curl -u my_admin -XPUT 'http://localhost:9200/_xpack/security/user/elastic/_password?pretty' -H 'Content-Type: application/json' -d'
{
"password" : "my_password"
}'
Enter host password for user 'my_admin':
{
"error" : {
"root_cause" : [
{
"type" : "cluster_block_exception",
"reason" : "blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];"
}
],
"type" : "cluster_block_exception",
"reason" : "blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];"
},
"status" : 403
}
How to fix it?
Thanks