You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by 苏卫泉 <su...@szkingdom.com> on 2017/05/24 06:19:57 UTC
How to stop the producer if I use the incorrect bootstrap.servers
Hello,
I am new to kafka and I found that if I use the incorrect bootstrap.server in producer, the kafka client seems that never give up althought the console show the exception below but no exception throws:
Connection with /10.201.0.119 disconnected
java.net.ConnectException: Connection timed out: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
at org.apache.kafka.common.network.PlaintextTransportLayer.finishConnect(PlaintextTransportLayer.java:51)
at org.apache.kafka.common.network.KafkaChannel.finishConnect(KafkaChannel.java:73)
at org.apache.kafka.common.network.Selector.pollSelectionKeys(Selector.java:323)
at org.apache.kafka.common.network.Selector.poll(Selector.java:291)
at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:260)
at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:236)
at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:135)
at java.lang.Thread.run(Thread.java:745)
[DEBUG] 2017-05-24 14:12:50,906 method:org.apache.kafka.clients.NetworkClient.handleDisconnections(NetworkClient.java:463)
Node -1 disconnected.
Would you like to tell me how to stop the producer when Connection timed out?
Thank you in advance :)