{"error":{"root_cause":[{"type":"security_exception","reason":"failed to authenticate user [elastic]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}}],"type":"security_exception","reason":"failed to authenticate user [elastic]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}},"status":401}
This process still works just fine, so I would assume that something went wrong when you attempted to run the commands you share. The bootstrap.password is only taken into consideration when the elastic user doesn't already have a password.
Do you get any error messages when running the elasticsearch-keystore-add command ? Can you verify that bootstrap.password is in the keystore with elasticsearch-keystore-list ?
It does exist but what it does is that it prevents the CLI from outputting verification messages to the user. You wouldn't be able to use a CLI tool in interactive mode if it doesn't prompt you for input
As Tim mentioned in the original post, the elasticsearch-setup-password is not designed to be scriptable, so the proper way to achieve what you are after is the original suggestion.
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.