After reboot EC2 instance, Filebeat cannot send log to logstash: ERROR logstash/async.go:256 Failed to publish events caused by: write tcp 127.0.0.1:52242->127.0.0.1:5043: write: connection reset by peer

After I reboot EC2, filebeat can no longer send log to logstash, I change port from 5044 to 5043 and filebeat has this error.

019-01-24T19:01:48.060Z INFO pipeline/output.go:95 Connecting to backoff(async(tcp://0.0.0.0:5043))
2019-01-24T19:01:48.060Z INFO pipeline/output.go:105 Connection to backoff(async(tcp://0.0.0.0:5043)) established
2019-01-24T19:01:48.093Z ERROR logstash/async.go:256 Failed to publish events caused by: write tcp 127.0.0.1:52242->127.0.0.1:5043: write: connection reset by peer

Filebeat reconnects upon error and sends again. Filebeat sends the events until the events have been acked by Logstash.
The connection reset by peer indicates that the remote logstash or server did close the connection. In this case filebeat will reconnect and send again.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.