kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "苏卫泉" <s...@szkingdom.com>
Subject How to stop the producer if I use the incorrect bootstrap.servers
Date Wed, 24 May 2017 06:19:57 GMT
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    :)
Mime
  • Unnamed multipart/alternative (inline, 7-Bit, 0 bytes)
View raw message