安装 elasticsearch 遇到 ERROR: Failed to determine the health of the cluster 问题解决
通常安装好 elasticsearch 之后,需要验证安装是否正常,都会在浏览器访问 http://安装的IP地址:9200/ 地址,此时,直接访问都会连接不上,需要修改elasticsearch.yml文件
(图片来源网络,侵删)
# Enable security features xpack.security.enabled: false
重启 elasticsearch 一般都能正常访问该地址。继续安装kibana,安装完成后登录kibana需要输入注册的令牌,执行以下命令生成令牌报错:
root@localhost:~/docker/elasticsearch/config# docker exec -it elastic /usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s kibana ERROR: Failed to determine the health of the cluster.
百度了两小时,结果依然没有解决,最后修改了 elasticsearch.yml文件,将xpack.security.enabled改成true
# Enable security features xpack.security.enabled: true
再重新执行生成令牌的命令,问题解决
root@localhost:~/docker/elasticsearch/config# docker exec -it elastic /usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s kibana eyJ2ZXIiOiI4LjguMiIsImFkciI6WyIxNzIuMjIuMC40OjkyMDAiXSwiZmdyIjoiNWQ4N2M5ZWRlZDhjMDI3ZDMzMDZlMmJlYTExMmE4NmUzYzg0NDllZWViOWM4NGJmNjJjOWM2YTI4ZGM4YWQwZiIsImtleSI6IkN2U19oWThCUWV4aG4zcVktanozOmtjSFJmMm53UzItWnExSm0tZ3BXaHcifQ==
文章版权声明:除非注明,否则均为主机测评原创文章,转载或复制请以超链接形式并注明出处。