kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Magesh Kumar <magesh.n.ku...@gmail.com>
Subject Fwd: Kafka Defunct Sockets
Date Tue, 27 Sep 2016 18:50:57 GMT

This is Magesh working as a Engineer at Visa INc. I'm relatively new to the
Kafka ecosystem. We are using Kafka 0.9 and during our testing in our test
environments, we have noticed that producer does retries with

To debug the issue, i enabled TRACE logging and noticed that the nodes were
added to the Disconnected list and hence they were being retried.

>From the producer code, I noticed that the following would be the only
scenario where a node is marked disconnected

                    /* cancel any defunct sockets */
                    if (!key.isValid()) {
                } catch (Exception e) {
                    String desc = channel.socketDescription();
                    if (e instanceof IOException)
                        log.debug("Connection with {} disconnected", desc,
                        log.warn("Unexpected error from {}; closing
connection", desc, e);

Upon careful analysis, I didn't find  any logs related to the exception
block. So, the only possibility is that the sockets were becoming DeFunct.
With netsat, I found that the sockets were getting dropped periodically. I
wasn't sure if it was the Producer, Broker or the network layer thats
causing this. Just wanted to check if there is any recommendation for this.
We are using SASL.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message