我尝试按照此guideline在CentOS 8(在一个AWS群集上)上安装ELK
。
安装elastic
和kibana
后,kibana
启动失败,错误为:
*"message":"License information could not be obtained from Elasticsearch
我谷歌了一下,意识到我应该使用OSS版本(最新版本是7.10.2) 因此,请确保只安装OSS版本。您可以使用guideline
之后,我收到来自kibana.log
的新错误
-08T07:19:32Z","tags":["error","savedobjects-service"],"pid":62767,"message":"Unable to retrieve version information from Elasticsearch nodes."}
我尝试在谷歌上搜索,但没有解决方案对我起作用。
我的kibana.yaml
:
server.port: 5601
server.host: "0.0.0.0"
elasticsearch.hosts: "[my public AWS instance ip:9200]"
我的elasticsearch.yaml
:
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
network.host: 0.0.0.0
http.port: 9200
discovery.seed_hosts: "[my private AWS instance ip]"
cluster.initial_master_nodes: "[my private AWS instance ip]"
更新:
如果要将kibana.yaml
文件中的此行更改为:
elasticsearch.hosts: "http://localhost:9200"
那么它就起作用了。根本原因是什么?为什么不能访问弹性公网IP,只能访问本端?
根据@leandrojmp评论,问题确实出在elasticsearch.hosts
中的公网IP。一旦我将其替换为我的内网IP,它就可以工作