不要急,总有办法的

filebeat发送log给logstash失败

Logstash | 作者 iloveleeyan | 发布于2018年03月29日 | 阅读数:10782

运行时,修改了目标log文件,打印信息如下,且没发现有提交到给elasticsearch:

错误消息:

2018-03-29T15:49:45.712+0800 ERROR pipeline/output.go:92 Failed to publish events: write tcp 192.168.1.80:53310->192.168.1.80:5044: write: connection reset by peer


配置信息:

/root/software/filebeat/filebeat.yml
filebeat.prospectors:

- type: log
paths:
- /mnt/hgfs/www/ciboapp/storage/custom/custom-20180322.log

output.logstash:
hosts: ["192.168.1.80:5044"]
 
/root/software/logstash/config/logstash.conf
input {

  beats {
    port => "5044"
  }
}

filter {
      grok {
        match => { "message" => "%{IP:client} %{WORD:method} %{URIPATHPARAM:request} %{NUMBER:bytes} %{NUMBER:duration}" }
      }
}


output {

        elasticsearch {
           hosts => ["192.168.1.80:9200"]
           index => "custom-%{+YYYY.MM.dd}"
        }
}

端口号都是匹配的,5044,并且telnet能连接5044,确定服务有开启
哪位大神告诉我怎么解决这个问题呢??
已邀请:

luozi192

赞同来自:

请问楼主问题最后怎么解决的?我现在报ERROR pipeline/output.go:74 Failed to connect: dial tcp 115.47.153.99:5044: getsockopt: connection refused。有什么可以借鉴的吗?

SilentHz

赞同来自:

应该是 安装了xpack没配置好导致。 在elasticsearch.yml 以及 kibana.yml 中加入 xpack.security.enabled: false 禁用先,重启各程序, Elasticsearch --> Kibana --> Logstash --> Filebeat 我的这个情况就解决了。

jobkouen - 90后IT男

赞同来自:

我的情况是logstash没有启动成功,原因是output里面的es的host设置错误,设置的应该是http而不是https....整整调试了2个小时,就是多了一个s。
 
output {
  elasticsearch {
     hosts => "http://0.0.0.0:9200/"
  }
}
 

要回复问题请先登录注册