Hi,
I need to add few settings to Elasticsearch keystore in windows using elasticsearch-keystore.bat
file. Hence I tried the following from the windows command prompt:
echo "mypwd" | D:\Elasticsearch-7.17.0\bin\elasticsearch-keystore.bat add bootstrap.password --force
This didn't prompt me to input the password but after starting the Elasticsearch server, getting below error when I am trying to use the password mentioned above.
{
"error": {
"root_cause": [
{
"type": "security_exception",
"reason": "unable to authenticate user [elastic] for REST request [/]",
"header": {
"WWW-Authenticate": "Basic realm=\"security\" charset=\"UTF-8\""
}
}
],
"type": "security_exception",
"reason": "unable to authenticate user [elastic] for REST request [/]",
"header": {
"WWW-Authenticate": "Basic realm=\"security\" charset=\"UTF-8\""
}
},
"status": 401
}
Hence is there a way to provide input to elasticsearch-keystore.bat
programatically? (instead of inputting from the command prompt). Thanks in advance.
P.S. This problem is not seen when I manually input the password using the command prompt.