kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ewen Cheslack-Postava <e...@confluent.io>
Subject Re: New producer hangs inifitely when it looses connection to Kafka cluster
Date Tue, 21 Jul 2015 16:17:47 GMT
This is a known issue. There are a few relevant JIRAs and a KIP:

https://issues.apache.org/jira/browse/KAFKA-1788
https://issues.apache.org/jira/browse/KAFKA-2120
https://cwiki.apache.org/confluence/display/KAFKA/KIP-19+-+Add+a+request+timeout+to+NetworkClient

-Ewen

On Tue, Jul 21, 2015 at 7:05 AM, Stevo Slavić <sslavic@gmail.com> wrote:

> Hello Apache Kafka community,
>
> Just noticed that :
> - message is successfully published using new 0.8.2.1 producer
> - and then Kafka is stopped
>
> next attempt to publish message using same instance of new producer hangs
> forever, and following stacktrace gets logged repeatedly:
>
> [WARN ] [o.a.kafka.common.network.Selector] [] Error in I/O with localhost/
> 127.0.0.1
> java.net.ConnectException: Connection refused
> at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.8.0_31]
> at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:716)
> ~[na:1.8.0_31]
> at org.apache.kafka.common.network.Selector.poll(Selector.java:238)
> ~[kafka-clients-0.8.2.1.jar:na]
> at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:192)
> [kafka-clients-0.8.2.1.jar:na]
> at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:191)
> [kafka-clients-0.8.2.1.jar:na]
> at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:122)
> [kafka-clients-0.8.2.1.jar:na]
> at java.lang.Thread.run(Thread.java:745) [na:1.8.0_31]
>
>
> I expect producer to respect timeout settings even in this connection lost
> scenario.
>
> Is this a known bug? Is there something I can do/configure as a workaround?
>
> Kind regards,
> Stevo Slavic.
>



-- 
Thanks,
Ewen

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