在ELK群集上应用安全性-身份验证问题

问题描述 投票:0回答:1

我有一个由三个节点组成的7.6.2群集,并且想要应用x-pack安全性。所以我更新了我的elasticsearch.yml conf。我首先要设置密码

/usr/share/elasticsearch/bin/elasticsearch-setup-passwords auto

Unexpected response code [405] from calling GET http://xxx:9200/_security/_authenticate?pretty
It doesn't look like the X-Pack security feature is enabled on this Elasticsearch node.
Please check if you have enabled X-Pack security in your elasticsearch.yml configuration file.

ERROR: X-Pack Security is disabled by configuration.

但是失败了,所以我重新启动了一个elasticsearch节点,但是仍然无法设置密码

/etc/elasticsearch$ /usr/share/elasticsearch/bin/elasticsearch-setup-passwords auto

Your cluster health is currently RED.
This means that some cluster data is unavailable and your cluster is not fully functional.

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]y

Initiating the setup of passwords for reserved users elastic,apm_system,kibana,logstash_system,beats_system,remote_monitoring_user.
The passwords will be randomly generated and printed to the console.
Please confirm that you would like to continue [y/N]y



Connection failure to: http://xxx:9200/_security/user/apm_system/_password?pretty failed: Read timed out

ERROR:Failed to set password for user [apm_system].

而且由于身份验证问题,我无法访问任何内容。我找不到如何在群集上成功应用安全性。无法设置密码或无法验证?

security elasticsearch elasticsearch-x-pack
1个回答
0
投票

您需要为集群中的所有节点设置xpack.security.enabled: true,然后完全重启集群(所有节点)。之后,您可以使用

生成密码
/usr/share/elasticsearch/bin/elasticsearch-setup-passwords auto
© www.soinside.com 2019 - 2024. All rights reserved.