Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-6257

KafkaConsumer was hung when bootstrap servers was not existed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Duplicate
    • None
    • None
    • clients
    • None

    Description

      Could anyone help me on this?

      We have an issue if we entered an non-existed host:port for bootstrap.servers property on KafkaConsumer. The created KafkaConsumer was hung forever.

      the debug message:
      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:50)
      at org.apache.kafka.common.network.KafkaChannel.finishConnect(KafkaChannel.java:95)
      at org.apache.kafka.common.network.Selector.pollSelectionKeys(Selector.java:359)
      at org.apache.kafka.common.network.Selector.poll(Selector.java:326)
      at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:432)
      at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:232)
      at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:208)
      at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:199)
      at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.awaitMetadataUpdate(ConsumerNetworkClient.java:134)
      at org.apache.kafka.clients.consumer.internals.AbstractCoordinator.ensureCoordinatorReady(AbstractCoordinator.java:223)
      at org.apache.kafka.clients.consumer.internals.AbstractCoordinator.ensureCoordinatorReady(AbstractCoordinator.java:200)
      at org.apache.kafka.clients.consumer.internals.ConsumerCoordinator.poll(ConsumerCoordinator.java:286)
      at org.apache.kafka.clients.consumer.KafkaConsumer.pollOnce(KafkaConsumer.java:1078)
      at org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:1043)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
      [2017-08-28 09:20:56,400] DEBUG Node -1 disconnected. (org.apache.kafka.clients.NetworkClient)
      [2017-08-28 09:20:56,400] WARN Connection to node -1 could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)
      [2017-08-28 09:20:56,400] DEBUG Give up sending metadata request since no node is available (org.apache.kafka.clients.NetworkClient)
      [2017-08-28 09:20:56,450] DEBUG Initialize connection to node -1 for sending metadata request (org.apache.kafka.clients.NetworkClient)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              brianc Brian Clark
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: