【Kibana启动报错】Unable to retrieve version information from Elasticsearch nodes.

项目场景:

提示:这里简述项目相关背景:

使用docker单机安装elasticsearch后再安装kibana时找不到es


问题描述

提示:这里描述项目中遇到的问题:

具体报错信息

[ERROR][elasticsearch-service] Unable to retrieve version information from Elasticsearch nodes. security_exception: [security_exception] Reason: missing authentication credentials for REST request [/_nodes?filter_path=nodes.*.version%2Cnodes.*.http.publish_address%2Cnodes.*.ip]

原因分析:

es在启动时设置了密码开启了安全验证,导致kibana没访问到,取消安全验证就可让kibana找到es,由于我是学习所用,所以加不加安全验证无所谓,需要加安全验证请参考其他博主文章。仅解决了本人在部署kibana中遇到的情况,如无法解决您的问题也请参考其他博主文章。


解决方案:

进入容器查看配置文件

# 进入容器命令
docker exec -it container_name /bin/bash

先确定kibana.yml配置文件是否正确

server.host: "0.0.0.0"
server.shutdownTimeout: "5s"
elasticsearch.hosts: "http://localhost:9200"

再看看elasticsearch.yml配置

cluster.name: "docker-cluster"
network.host: 0.0.0.0

如没有xpack.security.enabled: false就将其填上,等于true就将其改为false
在docker容器中操作时可能会没有vi 或 vim命令,可以使用echo来进行修改

echo "xpack.security.enabled: false" >> elasticsearch.yml

⚠️注意使用echo “xxx” > filename 时会覆盖原有文本,使用echo “xxx”>> filename 会在最后行进行添加

相关文章

文章浏览阅读774次,点赞24次,收藏16次。typescript项目中我...
文章浏览阅读784次。react router redux antd eslint pretti...
文章浏览阅读3.9k次,点赞5次,收藏11次。需要删除.security...
文章浏览阅读1.2k次,点赞23次,收藏24次。Centos 8 安装es_...
文章浏览阅读3.2k次。设置完之后,数据会⾃动同步到其他节点...
文章浏览阅读1.9k次,点赞2次,收藏7次。针对多数据源写入的...