-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rsyslog-Kafka: After disconnect, never retries to reconnect #1234
Comments
Any thoughts or comments on this...? Maybe I'm just doing something wrong? I'm cool with that kind of feedback also 😄 |
librdkafka will reconnect automatically, but there is no corresponding log message for when it manages to connect (unless debugging is enabled (debug=broker). Are you registering a delivery report callback? (dr_msg_cb or dr_cb) |
hi @edenhill, I've added this debug config like so:
but I'm not seeing any additional logs. Does librdkafka throw these debug messages some where on the host? It looks like librdkafka, whether through rsyslog or internally, will attempt to reconnect for ~10 minutes continuously (with proper backoff) with every log rsyslog picks up, then stop; notice the timestamp of the last few logs without any broker disconnect errors in-between.
Another observation: It also looks like the larger the time gap between logs, the more "brokers are down" error messages pop up. |
Update: Looking through the logs over the weekend, omkafka remained down until a HUP was sent Sunday night at 3:16:03 UTC, probably via logrotated since these were the first lines in the log:
It seems to have not come back ever since, current logs still aren't being sent to the brokers. |
debug logs will go to the same place as standard librdkafka logs, but with the log level/severity set to LOG_DEBUG, so it might be filtered by the syslog daemon? The consistent flood of 1/1 brokers are down indicates that it manages to reconnect before it is being closed down again - in this case you should check the broker logs for hints, unless there are numerous librdkafka producer instances running simultaneously? |
Description
Not sure if this is an rsyslog problem or a librdkafka one, but using Rsyslog-Kafka w/ librdkafka 0.9.5, if rsyslog-kafka is unable to connect to a broker, it will retry 10 times then stop....and it stops forever. Rsyslog continues to log files to the syslog, but the omkafka module no longer tries to send anything out to the kafka brokers. We can resume the omkafka producer by restarting rsyslog.
This is the complete inverse of issue #1089, where librdkafka had a backoff bug and continued to retry forever until the box DoS'd itself. When using this same rsyslog version with version < 0.9.5 of librdkafka, the producer continues to retry, making me believe this to be librdkafka related.
rsyslog-kafka now has the ability to specify librdkafka configuration with the
confParam
parameter. I'm curious if there a configuration option somewhere in librdkafka that will tell it to come back to life.Logs:
How to reproduce
Using rsyslog-kafka v8.27.0 /w librdkafka 0.9.5, set the broker destination to a broker that is no longer listening on port 9092 such that the connection is dropped and the broker is disconnected. Then restore the connection--no new logs are forwarded over to broker.
Checklist
Please provide the following information:
Name : librdkafka
Arch : x86_64
Version : 0.9.5
Release : 1.el6.remi
Size : 681 k
Repo : installed
Summary : Apache Kafka C/C++ client library
URL : https://github.com/edenhill/librdkafka
License : BSD and MIT
Description : librdkafka is a C library implementation of the Apache Kafka protocol,
: containing both Producer and Consumer support.
:
: It was designed with message delivery reliability and high performance
: in mind, current figures exceed 800000 msgs/second for the producer
: and 3 million msgs/second for the consumer.
v0.10.2.1
rsyslog-omkafka config:
Amazon Linux 2017.03.0
debug=..
as necessary) from librdkafkaThe text was updated successfully, but these errors were encountered: