Свободный от упругого поиска unreachable_exception - PullRequest
0 голосов
/ 13 февраля 2020

Я настраиваю упругую поисковую систему и провожу в docker я получаю host_unreachable_exceptions. Ниже приведен мой полный журнал исключений:

2020-02-13 08:45:05 +0000 [error]: #0 unexpected error error_class=NameError error="uninitialized constant Faraday::Error::ConnectionFailed"
  2020-02-13 08:45:05 +0000 [error]: #0 /usr/lib/ruby/gems/2.5.0/gems/elasticsearch-transport-7.4.0/lib/elasticsearch/transport/transport/http/faraday.rb:51:in `host_unreachable_exceptions'
  2020-02-13 08:45:05 +0000 [error]: #0 /usr/lib/ruby/gems/2.5.0/gems/fluent-plugin-elasticsearch-4.0.3/lib/fluent/plugin/elasticsearch_index_template.rb:36:in `rescue in retry_operate'
  2020-02-13 08:45:05 +0000 [error]: #0 /usr/lib/ruby/gems/2.5.0/gems/fluent-plugin-elasticsearch-4.0.3/lib/fluent/plugin/elasticsearch_index_template.rb:34:in `retry_operate'
  2020-02-13 08:45:05 +0000 [error]: #0 /usr/lib/ruby/gems/2.5.0/gems/fluent-plugin-elasticsearch-4.0.3/lib/fluent/plugin/out_elasticsearch.rb:282:in `configure'

Мой docker -компонентный файл:

version: '3'
services:

    elasticsearch:
      image: docker.elastic.co/elasticsearch/elasticsearch:7.4.0
      container_name: Eagle_Core_local_elasticsearch
      environment:
        - xpack.security.enabled=false
        - discovery.type=single-node
      ulimits:
        memlock:
          soft: -1
          hard: -1
        nofile:
          soft: 65536
          hard: 65536
      cap_add:
        - IPC_LOCK
      volumes:
        - ./../../../data/elasticsearch-data:/usr/share/elasticsearch/data
      networks:
        - eaglenet
      ports:
        - 9200:9200
        - 9300:9300

    fluentd:
      container_name: Eagle_Core_FluentLogger
      build:
        context: ./docker-conf/fluentd
      environment:
        - FLUENT_UID=1000
      networks:
        - eaglenet
      ports:
        - "24231:24231"
      volumes:
        - ./../../../log/fluentd:/fluentd/log
        - ./docker-conf/fluentd/fluent.conf:/fluentd/etc/fluent.conf
      logging:
        driver: "json-file"
        options:
          max-size: "200k"
          max-file: "3"
      env_file:
        - ./local.config.env

, а вот мой fluent.conf:

<match flight.error.log>
  @type elasticsearch
  host elasticsearch
  port 9200
  utc_index false
  target_index_key @target_index
  logstash_prefix ${tag}
  logstash_dateformat %Y%m%d
  type_name error_log
  <buffer>
    flush_interval 2s
    chunk_limit_size 64m
    flush_thread_count 4
    @type file
    path /fluentd/log/flight
  </buffer>
</match>

Примечание: Я могу пропинговать elasticsearch:9200 из контейнера Fluentd

1 Ответ

1 голос
/ 15 февраля 2020

У меня тоже такая же проблема. пожалуйста, посмотрите это https://github.com/uken/fluent-plugin-elasticsearch/issues/699, lucasteles22 сказал, что нужно изменить сценарийasticsearch-transport-7.4.0 / lib /asticsearch / transport / transport / http / fa raday.rb: 51. Я попробовал, и это сработало.

...