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

o2rvlv0m  于 2022-12-26  发布在  ElasticSearch
关注(0)|答案(3)|浏览(291)

我有一个包含三个节点的7.6.2群集,希望应用x-pack安全性,因此我更新了elasticsearch. ymlconf。

/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].

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

p8ekf7hl

p8ekf7hl1#

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

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

mbskvtky2#

我有同样的问题。升级后。
1.我设置了“xpack.security.enabled= true“并尝试启动,但无法启动,它会引发要启用的传输ssl。
1.设置两个xpack.security.transport.ssl.已启用:true & xpack.security.enabled= true已尝试按照基本安全设置密码。a.但得到“无法在[apm_system]上设置密码”b.当trying _cat/health时,得到“缺少凭据”

o2gm4chl

o2gm4chl3#

您的群集没有数据节点。
只需添加到/etc/elasticsearch/elasticsearch.yml

    • 节点数据:真实**

它会成功的

相关问题