【问题标题】:"message":"No living connections","node_env":"production""message":"没有活的连接","node_env":"production"
【发布时间】:2015-06-20 23:46:54
【问题描述】:

我正在尝试在我的机器上安装 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

【问题讨论】:

    标签: elasticsearch kibana kibana-4


    【解决方案1】:

    ECONNREFUSED 告诉您它无法连接到 Elasticsearch。 http://0.0.0.0:9200/ 告诉你它试图连接到什么。

    您需要修改config/kibana.yml 并将elasticsearch_url 设置更改为指向您的集群。如果你在同一个盒子上运行 Elasticsearch,正确的值是http://localhost:9200

    【讨论】:

      【解决方案2】:

      您的弹性搜索已关闭。 就我而言,这是因为未设置环境变量 Java_Home 正确。您必须手动设置它。这些是执行此操作的指南:

      1. 转到您的 PC 环境。

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

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

      结果你有这样的东西:C:\Progra~2\Java\jre1.8.0_131

      【讨论】:

        【解决方案3】:

        在您使用 AWS Elasticsearch 服务的情况下可能会发生这种情况还有另一个原因。

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

        【讨论】:

          【解决方案4】:

          还有一种可能,可能你的 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

          【讨论】:

            猜你喜欢
            • 1970-01-01
            • 1970-01-01
            • 2014-01-16
            • 1970-01-01
            • 1970-01-01
            • 2012-03-04
            • 1970-01-01
            • 1970-01-01
            相关资源
            最近更新 更多