elasticsearch@6ef6c3f5ee45:~$ bin/elasticsearch-setup-passwords auto
Unexpected response code [405] from calling GET
http://172.17.0.2: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.
一、问题原因
X-Pack 安全功能在你的 Elasticsearch 配置中被禁用了。你需要在 elasticsearch.yml 文件中启用 X-Pack 安全功能,然后重启 Elasticsearch 以使更改生效。