“消息”:“没有生活联系”,“node_env”:“生产”

时间:2015-04-15 06:30:57

标签: elasticsearch kibana kibana-4

'我正在尝试在我的机器中安装Kibana 4,但它会出现以下错误。

{"@timestamp":"2015-04-15T06:25:50.688Z","level":"error","node_env":"production","error":"Request error, retrying -- connect ECONNREFUSED"}
{"@timestamp":"2015-04-15T06:25:50.693Z","level":"warn","message":"Unable to revive connection: http://0.0.0.0:9200/","node_env":"production"}
{"@timestamp":"2015-04-15T06:25:50.693Z","level":"warn","message":"No living connections","node_env":"production"}
{"@timestamp":"2015-04-15T06:25:50.698Z","level":"fatal","message":"No Living connections","node_env":"production","error":{"message":"No Living connections","name":"Error","stack":"Error: No Living connections\n  at sendReqWithConnection (/home/kibana-4.0.0-rc1-linux-x64/src/node_modules/elasticsearch/src/lib/transport.js:174:15)\n

4 个答案:

答案 0 :(得分:8)

ECONNREFUSED告诉您它无法连接到Elasticsearch。 http://0.0.0.0:9200/会告诉您它尝试连接的内容。

您需要修改config/kibana.yml并更改elasticsearch_url设置以指向您的群集。如果您在同一个框中运行Elasticsearch,则正确的值为http://localhost:9200

答案 1 :(得分:0)

您的弹性搜索已关闭。 在我的情况下,这是因为没有设置环境变量Java_Home  正确。你必须手动设置它。这些是指导方针:

  1. 转到您的PC环境。

  2. 创建一个变量名为Java_Home的新变量。变量值应该是java安装路径。

  3. 确保您的路径没有空格。如果您的Java位于Program Files(x86)中,则可以使用以下快捷方式:progra~2而不是Program Files(x86)

  4. 结果你有这样的事情:C:\Progra~2\Java\jre1.8.0_131

答案 2 :(得分:0)

在使用AWS Elasticsearch服务的情况下,可能还会发生这种情况。

没有针对ES的授予权限访问策略并且没有加载权限AWS凭证将是根本原因。

答案 3 :(得分:0)

还有一种可能性,也许您的 elasticsearch 没有按照您的意愿正常运行:请检查 this link 并尝试对 elasticsearch 进行 dockerize。

对我来说,这个 docker-compose.yml 文件可以对 elasticsearch 进行 dockerize:

services:
  elasticsearch:
    image: "${CREATED_IMAGE_NAME_PREFIX}:1"
    container_name: efk_elastic
    build:
      context: ./elasticsearch
      args:
        EFK_VERSION: $EFK_VERSION
        ELASTIC_PORT1: $ELASTIC_PORT1
        ELASTIC_PORT2: $ELASTIC_PORT2
    environment:
      # node.name: node
      # cluster.name: elasticsearch-default
      ES_JAVA_OPTS: -Xms1g -Xmx1g
      discovery.type: single-node
      ELASTIC_PASSWORD: changeme
      http.cors.enabled: "true"
      http.cors.allow-credentials: "true"
      http.cors.allow-headers: X-Requested-With,X-Auth-Token,Content-Type,Content-Length,Authorization
      http.cors.allow-origin: /https?:\/\/localhost(:[0-9]+)?/
    hostname: elasticsearch
    ports:
      - "${ELASTIC_EXPOSED_PORT1}:$ELASTIC_PORT1"
      - "$ELASTIC_EXPOSED_PORT2:${ELASTIC_PORT2}"
    volumes:
      # - type: bind
      #   source: ./elasticsearch/config/elasticsearch.yml
      #   target: /usr/share/elasticsearch/config/elasticsearch.yml
      #   read_only: true
      - type: volume
        source: elasticsearch_data
        target: /usr/share/elasticsearch/data
    networks:
      - efk

请注意,这并不完整。有关详细信息,请参阅我的 GitHub repository