错误无法通过http:// localhost:9200联系Elasticsearch。 – kibana仪表板

'错误无法联系Elasticsearch在http:// localhost:9200 。 请确保您的系统可以访问Elasticsearch。

目前我正在关注http://packetbeat.com/getstarted

我安装了

  1. 弹性search – 在localhost上运行:9200 – 返回json,2.packetbeat – 运行,
  2. 端口8000上的Kibana

现在,我改变我的kibana / config.js文件 – 进入,

elasticsearch: "http://"localhost":9200", 

在elasticsearch下。 我得到一个普通的白色页面,顶部是{{dashboard.current.title}}

如果我注释掉elasticsearch: "http://"localhost":9200",

我得到Error Could not contact Elasticsearch at http://localhost:9200. Please ensure that Elasticsearch is reachable from your system. Error Could not contact Elasticsearch at http://localhost:9200. Please ensure that Elasticsearch is reachable from your system.

如果我还将它作为elasticsearch: "http://localhost:9200",inputelasticsearch: "http://localhost:9200", ,我得到的错误是它无法联系elasticsearch。

所以,我假设elasticsearch: "http://"localhost":9200",是正确的,但它应该呈现的东西。 也许是一个UI

你需要确保在你的kibanaconfiguration中设置了elaticsearch_url。

vim /opt/kibana/config/kibana.yml

elasticsearch_url: "http://localhost:9200"

然后重启:

sudo service kibana restart

来源: Logz

在/etc/elasticsearch/elasticsearch.yml中检查你的elasticsearch监听

检查是否弹性search:)(ps -ef | grep elasticsearch)

如果不重新启动它。

并检查你是否不防火你的9200端口。 因为kibana需要连接到elasticsearch。

所有kibana作业都是在9200端口的elasticsearch数据库上完成的。

在我的情况下,问题是由HTTP_PROXY环境variables设置和代理服务器closures造成的。

这不是最显而易见的原因,并且从错误信息中没有显而易见的方式,您可以考虑看看。

对于本地开发,您可能希望通过编辑您的Elasticsearch YAML文件来启用CORS:

例如:

 http.cors.enabled: true http.cors.allow-origin: "*" 

(对于生产工作量,你应该加紧)。