ElasticSearch无法打开,仅显示用于输入用户名和密码的身份验证面板

polkgigr  于 2023-04-29  发布在  ElasticSearch
关注(0)|答案(2)|浏览(352)

我的elasticsearch有问题。
https://www.elastic.co/downloads/elasticsearch下载的。我无法打开页面。
当我使用https://localhost:9200/时,我只能看到验证(用户名和密码)的弹出菜单。你知道怎么修吗?
下面是屏幕截图。

当我在Postman中访问localhost:9200时,我得到如下所示的错误消息。

{
    "error": {
        "root_cause": [
            {
                "type": "security_exception",
                "reason": "unable to authenticate with provided credentials and anonymous access is not allowed for this request",
                "additional_unsuccessful_credentials": "oauth2 token: invalid token",
                "header": {
                    "WWW-Authenticate": [
                        "Basic realm=\"security\" charset=\"UTF-8\"",
                        "ApiKey"
                    ]
                }
            }
        ],
        "type": "security_exception",
        "reason": "unable to authenticate with provided credentials and anonymous access is not allowed for this request",
        "additional_unsuccessful_credentials": "oauth2 token: invalid token",
        "header": {
            "WWW-Authenticate": [
                "Basic realm=\"security\" charset=\"UTF-8\"",
                "ApiKey"
            ]
        }
    },
    "status": 401
}
kxeu7u2r

kxeu7u2r1#

Elasticsearch最新版本(8.0)具有基本的安全性,因此您可以看到用于身份验证的弹出窗口,您需要提供用户名(elastic,这是保留名称)和它的密码(在启动服务时打印在Elasticsearch日志上)。

ewm0tg9j

ewm0tg9j2#

你可以转到config文件夹和elasticsearch。yml为xpack或HTTPS设置了false安全功能,而不是默认的true,以跳过登录,您可能需要检查这个问题:
Elasticsearch_Installation_询问用户名和密码。
我发现这两者有关联

相关问题