Skip to content

Filebeat losing connection to Kafka #1432

Closed
@gossu

Description

I'm using latest nightly build of Filebeat and Kafka 0.9.0.1, both on the same machine.
My setup is that Filebeat is reading logs from /var/log/messages and then publishing them to Kafka.

The whole thing is working fine for about 30mins and after that Filebeat suddenly stops being able to communicate with Kafka.

Restarting the filebeat service then fixes the issue.

Below the logs I'm getting at the moment when the problem occurs:

2016-04-18T13:20:14+03:00 DBG  output worker: publish 2 events
2016-04-18T13:20:14+03:00 DBG  guaranteed flag is set
2016-04-18T13:20:14+03:00 DBG  publish events with attempts=-1
2016-04-18T13:20:14+03:00 DBG  forwards msg with attempts=-1
2016-04-18T13:20:14+03:00 DBG  message forwarded
2016-04-18T13:20:14+03:00 DBG  events from worker worker queue
2016-04-18T13:20:14+03:00 DBG  publish events
2016-04-18T13:20:14+03:00 WARN producer/broker/[1 859530387616] state change to [closing] because %!s(MISSING)
2016-04-18T13:20:14+03:00 WARN Closed connection to broker [172.24.33.7:9092]
2016-04-18T13:20:14+03:00 DBG  Kafka publish failed with: EOF
2016-04-18T13:20:14+03:00 DBG  Kafka publish failed with: EOF
2016-04-18T13:20:14+03:00 DBG  finished kafka batch
2016-04-18T13:20:14+03:00 DBG  handlePublishEventsResult
2016-04-18T13:20:14+03:00 DBG  handle publish error: EOF
2016-04-18T13:20:14+03:00 INFO Error publishing events (retrying): EOF

After that I'm getting infinite number of repeated logs looking like that:

2016-04-18T13:20:14+03:00 DBG  forwards msg with attempts=-1
2016-04-18T13:20:14+03:00 DBG  message forwarded
2016-04-18T13:20:14+03:00 DBG  events from retries queue
2016-04-18T13:20:14+03:00 DBG  publish events
2016-04-18T13:20:14+03:00 DBG  Kafka publish failed with: EOF
2016-04-18T13:20:14+03:00 DBG  Kafka publish failed with: EOF
2016-04-18T13:20:14+03:00 DBG  finished kafka batch
2016-04-18T13:20:14+03:00 DBG  handlePublishEventsResult
2016-04-18T13:20:14+03:00 DBG  handle publish error: EOF
2016-04-18T13:20:14+03:00 INFO Error publishing events (retrying): EOF

Observed on Centos 7.
Might not be so obvious to reproduce as for me it only happens in "random" moments.
Previously discussed here: https://discuss.elastic.co/t/filebeat-loses-connection-to-kafka/47660

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions