我正在尝试为我的ES云启用安全性。我正在按照以下说明操作:
https://www.elastic.co/guide/en/elasticsearch/reference/7.5/configuring-security.html
当我尝试运行bin/elasticsearch-setup-passwords interactive
时,我得到了错误:
Failed to determine the health of the cluster running at http://XXX:9200
Unexpected response code [503] from calling GET http://XXX:9200/_cluster/health?pretty
Cause: master_not_discovered_exception
It is recommended that you resolve the issues with your cluster before running elasticsearch-setup-passwords.
It is very likely that the password changes will fail when run against an unhealthy cluster.
Do you want to continue with the password setup process [y/N]
字符串
我尝试检查我的ES示例状态:
curl http://XXX:9200/_cluster/health?pretty
型
并获得
{
"error" : {
"root_cause" : [
{
"type" : "security_exception",
"reason" : "missing authentication credentials for REST request [/_cluster/health?pretty]",
"header" : {
"WWW-Authenticate" : "Basic realm=\"security\" charset=\"UTF-8\""
}
}
],
"type" : "security_exception",
"reason" : "missing authentication credentials for REST request [/_cluster/health?pretty]",
"header" : {
"WWW-Authenticate" : "Basic realm=\"security\" charset=\"UTF-8\""
}
},
"status" : 401
}
型
所以,看起来我不能设置密码,因为我不能验证:)?
5条答案
按热度按时间4ioopgfo1#
下面是为Elasticsearch设置安全性的官方doc
步骤1:
cd /usr/share/elasticsearch/
第二步:
字符串
或
型
auto -使用随机生成的密码交互式-使用用户输入的密码
以上命令可以帮助您设置密码
rbpvctlc2#
以下是我在Windows中的工作。
确保弹性节点已启动并正在运行。
Elastic将要求您继续设置自动生成的密码。一旦您继续进行,您将获得弹性/kibana/beats等的密码。
xsuvu9jc3#
对于windows,在cmd中运行elk
打开其他cmd和过去的命令,其中文件夹中的麋鹿
字符串
k4emjkb14#
经过一些研究,我发现Magento将凭据存储在XML文件中,可以在基本目录中找到:
字符串
lo8azlld5#
在你的bin文件夹
D:\software\elasticsearch-8.8.0\bin
中打开cmd并点击>elasticsearch.bat
在你的bin文件夹
D:\software\elasticsearch-8.8.0\bin
中打开另一个cmd并点击>elasticsearch-reset-password -u elastic