Filebeat +Logstash write: connection reset by peer(已解決)

2020/05/26

記一次FIlebeat 異常,目前沒有深究解決方案,不影響使用。

2020/05/28  今天抽出時間去排查這個問題。

首先不確定對每個人都受用,但是在我這邊是可以解決。

connection reset by peer:我這邊是因爲搭了個測試環境操作不頻繁導致Logstash可能由於不工作而嘗試重置連接,在這種情況下應該會引起connection reset by peer。你可以嘗試在可以嘗試在Logstash配置文件中添加client_inactivity_timeout這個參數就可以解決下面附上我的配置:

 

input{
    betas{
        port =>5044
        client_inactivity_timeout => 36000
     }
}

參考:https://discuss.elastic.co/t/solved-filebeat-logstash-connection-reset-by-peer/87012

2020/05/26 06:48:35.384662 metrics.go:34: INFO No non-zero metrics in the last 30s
2020/05/26 06:49:05.384659 metrics.go:34: INFO No non-zero metrics in the last 30s
2020/05/26 06:49:35.384751 metrics.go:34: INFO No non-zero metrics in the last 30s
2020/05/26 06:49:35.436374 log.go:91: INFO Harvester started for file: /opt/apache-tomcat-8.5.6-log-8089/logs/ds-logservice-web/error-s.log
2020/05/26 06:49:40.408966 sync.go:85: ERR Failed to publish events caused by: write tcp 192.168.2.63:57732->192.168.2.61:5044: write: connection reset by peer
2020/05/26 06:49:40.409005 single.go:91: INFO Error publishing events (retrying): write tcp 192.168.2.63:57732->192.168.2.61:5044: write: connection reset by peer
2020/05/26 06:50:05.384693 metrics.go:39: INFO Non-zero metrics in the last 30s: filebeat.harvester.open_files=1 filebeat.harvester.running=1 filebeat.harvester.started=1 libbeat.logstash.call_count.PublishEvents=3 libbeat.logstash.publish.read_bytes=18 libbeat.logstash.publish.write_bytes=1267 libbeat.logstash.publish.write_errors=1 libbeat.logstash.published_and_acked_events=4 libbeat.logstash.published_but_not_acked_events=3 libbeat.publisher.published_events=4 publish.events=6 registrar.states.cleanup=1 registrar.states.update=6 registrar.writes=3

 


 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章