我正在尝试将fluentd与elasticsearch连接起来,并且在启动td-agent服务时遇到此错误。
td-agent.log:
无法与Elasticsearch通信,重置连接并重试。连接被拒绝-127.0.0.1:9092(Errno::ECONNREFUSED)的connect(2)
td-agent.conf
<match docker.*>
@type elasticsearch
host localhost
port 9092
logstash_format true
</match>
我的elasticsearch正在运行,因为我可以检查
http://localhost:9200/
和fluentd插件plugin 2020-05-21 12:57:55 -0300 [info]: gem 'fluent-plugin-elasticsearch' version '4.0.8'
最佳答案
如果您可以从localhost:9200
访问elasticsearch,则.conf
如下所示:
<match docker.*>
@type elasticsearch
host localhost
port 9200
logstash_format true
</match>
关于elasticsearch - 流利+ Elasticsearch =连接被拒绝,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61940291/