I'm trying to install ElasticSearch on my mac.
I downloaded the tar from the official website and extract it.
Then I run the bin/elastic. After that I open https://localhost:9200/ and it displays the input field for username and password when I canceled it, this appears:
{
"error": {
"root_cause": [
{
"type": "security_exception",
"reason": "missing authentication credentials for REST request [/]",
"header": {
"WWW-Authenticate": [
"Basic realm=\"security\" charset=\"UTF-8\"",
"Bearer realm=\"security\"",
"ApiKey"
]
}
}
],
"type": "security_exception",
"reason": "missing authentication credentials for REST request [/]",
"header": {
"WWW-Authenticate": [
"Basic realm=\"security\" charset=\"UTF-8\"",
"Bearer realm=\"security\"",
"ApiKey"
]
}
},
"status": 401
}
I did not put a password or username and I look at the previous questions about that and no one is working for me. What should I do?
Note: When I open http://localhost:9200/ it displays:
This page isn’t working localhost didn’t send any data.
ERR_EMPTY_RESPONSE
CodePudding user response:
Tldr;
Seems like Elasticsearch create a password automatically.
You may want to set you own with
bin/elasticsearch-setup-passwords interactive
But in version 8.x
and above it is deprecated.
You should be using
elasticsearch-setup-passwords interactive