Easysearch、Elasticsearch 还是 Opensearch,是个问题

filebeats启动报错:[publisher_pipeline_output] pipeline/output.go:155 Failed to connect to backoff

Beats | 作者 jhchen | 发布于2022年08月08日 | 阅读数:4993

本人初学小白,在启动filebeats时出现ERROR,显示[publisher_pipeline_output] pipeline/output.go:155 Failed to connect to backoff(async(tcp://localhost:5044)): dial tcp 127.0.0.1:5044: connect: connection refused。
 
logstash的配置文件和filebeats的配置文件如下所示,特向各位前辈请教学习。
 
filebeat.yml文件:
filebeat.inputs:
- type: log
enabled: true
backoff: "1s"
tail_files: false
paths:
- /usr/local/temp/log1/*.log

output.logstash:
enabled: true
hosts: ["localhost:5044"]
logstash.conf配置文件:
input {
beats {
host => "192.168.100.121
[attach]6341[/attach]
"
port => 5044
}
}

filter {
grok {
match => { "message" => "(?<Date>%{TIMESTAMP_ISO8601:logtime}) %{DATA:thread} %{DATA:level} %{DATA:classpath}" }
}

mutate {
convert => { "response" => "string" }
}

date {
timezone => "Asia/Shanghai"
match => ["logtime", "yyyy-MM-dd HH:mm:ss,SSS"]
target => "@timestamp"
}
}

output {
elasticsearch {
hosts => ["127.0.0.1:9200"]
index => "slog-%{+YYYY.MM.dd}"
}
}
 
 
已邀请:

tongchuan1992 - 学无止境、学以致用

赞同来自:

192.168.100.121是本机ip吗,我看flebeat的output是本机的5044端口。

jhchen - 00后IT男

赞同来自:

在filebeat.yml的配置文件中,将localhost替换成ip地址,即可解决该问题。该问题的根本原因在于使用localhost无法确定IP地址。使得filebeat无法与logstash进行连接。感谢前辈们的帮助。

要回复问题请先登录注册