gpt4 book ai didi

docker - 熟练使用elasticsearch unreachable_exception

转载 作者:行者123 更新时间:2023-12-03 01:20:51 26 4
gpt4 key购买 nike

我正在设置elasticsearch并精通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-compose文件是:
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>

注意:我可以从流利的容器ping elasticsearch:9200

最佳答案

我也有同样的问题。请看一下https://github.com/uken/fluent-plugin-elasticsearch/issues/699,lucasteles22说需要修改脚本elasticsearch-transport-7.4.0 / lib / elasticsearch / transport / transport / http / fa raday.rb:51。我尝试了,它奏效了。

关于docker - 熟练使用elasticsearch unreachable_exception,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60203708/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com