简体   繁体   English

Kibana将无法通过Amazon的Elasticsearch Service连接到Elasticsearch

[英]Kibana won't connect to Elasticsearch on Amazon's Elasticsearch Service

After switching from hosting my own Elastiscsearch cluster to Amazon's Elasticsearch Service , my Kibana dashboards (versions 4.0.2 and 4.1.2) won't load and I'm receiving the following error in kibana.log: 从托管我自己的Elastiscsearch集群切换到Amazon的Elasticsearch Service之后 ,我的Kibana仪表板(版本4.0.2和4.1.2)将无法加载,并且在kibana.log中收到以下错误:

{
  "name": "Kibana",
  "hostname": "logs.example.co",
  "pid": 8037,
  "level": 60,
  "err": {
    "message": "Not Found",
    "name": "Error",
    "stack": "Error: Not Found\n    at respond (\/srv\/kibana\/kibana-4.1.2-linux-x64\/src\/node_modules\/elasticsearch\/src\/lib\/transport.js:235:15)\n    at checkRespForFailure (\/srv\/kibana\/kibana-4.1.2-linux-x64\/src\/node_modules\/elasticsearch\/src\/lib\/transport.js:203:7)\n    at HttpConnector.<anonymous> (\/srv\/kibana\/kibana-4.1.2-linux-x64\/src\/node_modules\/elasticsearch\/src\/lib\/connectors\/http.js:156:7)\n    at IncomingMessage.bound (\/srv\/kibana\/kibana-4.1.2-linux-x64\/src\/node_modules\/elasticsearch\/node_modules\/lodash-node\/modern\/internals\/baseBind.js:56:17)\n    at IncomingMessage.emit (events.js:117:20)\n    at _stream_readable.js:944:16\n    at process._tickCallback (node.js:442:13)"
  },
  "msg": "",
  "time": "2015-10-14T20:48:40.169Z",
  "v": 0
}

unfortunately, this error is not very helpful. 不幸的是,此错误不是很有帮助。 I assume it's a wrapped HTTP 404, but for what ? 我认为这是一个包装好的HTTP 404,但是为什么呢?

How can I connect a Kibana install to Amazon's Elasticsearch Service? 如何将Kibana安装连接到Amazon的Elasticsearch Service?

Here are a some things to keep in mind when using Amazon's Elasticsearch Service: 使用Amazon的Elasticsearch Service时,请记住以下几点:

  1. Modifications to the access policies take a non-deterministic amount of time. 修改访问策略需要花费不确定的时间。 I've found that it's good to wait at least 15 minutes after the status is no longer "processing" after making policy changes. 我发现最好在更改策略后至少等待15分钟,直到状态不再“处理中”。

  2. It listens on port 80 for HTTP requests and not the standard port 9200. Be sure that your elasticsearch_url configuration directive reflects this, eg: 它在端口80上侦听HTTP请求,而不在标准端口9200上侦听。确保您的elasticsearch_url配置指令反映了这一点,例如:

    elasticsearch_url: " http://es.example.co:80 " elasticsearch_url:“ http://es.example.co:80

  3. It's very likely that your Kibana instance will not have the necessary permissions to create the index that it needs to show you a dashboard -- this is towards the root of the issue. 您的Kibana实例很可能没有必要的权限来创建它需要向您显示仪表板的索引-这是问题的根源。 Check out the indexes on the Elasticsearch domain and look for a line that matches the kibana_index config directive (eg via http://es.example.co/_cat/indices ). 在Elasticsearch域上检查索引,然后查找与kibana_index config指令匹配的行(例如,通过http://es.example.co/_cat/indices )。

for instance, if your kibana_index directive is the value is .kibana-4 , if you don't see a line like the following: 例如,如果您的kibana_index指令是.kibana-4 ,则看不到以下内容:

green open .kibana-4           1 1      3 2  30.3kb  17.2kb

then your Kibana index was not able to create the index it needs. 则您的Kibana索引无法创建所需的索引。 If you go to the dashboard for the Elasticsearch service in amazon and click on the Kibana link, it will likely create a .kibana-4 index for you. 如果您转到Amazon中的Elasticsearch服务的仪表板,然后单击Kibana链接,则可能会为您创建.kibana-4索引。

You can specify this index in your existing Kibana's configuration and you should see the next point. 您可以在现有的Kibana的配置中指定该索引,然后您将看到下一点。

  1. Your existing Kibana install will likely require authentication via the header: 您现有的Kibana安装可能需要通过标头进行身份验证:

    Kibana: Authorization header requires 'Credential' parameter. Kibana:授权标头需要“ Credential”参数。 Authorization header requires 'Signature' parameter. 授权标头需要“签名”参数。 Authorization header requires 'SignedHeaders' parameter. 授权标头需要“ SignedHeaders”参数。 Authorization header requires existence of either a 'X-Amz-Date' or a 'Date' header. 授权标头要求存在“ X-Amz-Date”或“ Date”标头。

You can configure this in Kibana and can see the general signing API request documentation for more help. 您可以在Kibana中进行配置,并可以查看常规的签名API请求文档以获取更多帮助。

It's worth noting that the error messaging is reportably better in Kibana 4.2, but as that's in beta and Amazon's Elasticsearch Service was very recently released, the above should be helpful in debugging. 值得注意的是,据报道,错误消息在Kibana 4.2中更好,但是由于该消息处于beta中,并且Amazon的Elasticsearch Service是最近发布的,因此上述内容对调试很有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM