我正在尝试在我的 Mac 上安装 ElasticSearch。
我从official website下载了tar。并提取它。
然后我运行 bin/elastic。之后我打开 https://localhost:9200/,当我取消它时,它会显示用户名和密码的输入字段,如下所示:
{
"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
}
我没有输入密码或用户名,我查看了之前的相关问题,但没有人为我工作。 我该怎么办?
注意:当我打开 http://localhost:9200/时,它显示:
This page isn’t working localhost didn’t send any data.
ERR_EMPTY_RESPONSE
最佳答案
Tldr;
看起来像Elasticsearch create a password automatically .
您可能想设置自己的
bin/elasticsearch-setup-passwords interactive
但在 8.x
及以上版本 it is deprecated .
你应该使用
elasticsearch-setup-passwords interactive
关于elasticsearch - 如何解决ElasticSearch登录问题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72378773/