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

AbstractCoordinator.ensureCoordinatorReady() stuck in loop if absent any bootstrap servers

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.10.0.0, 0.10.0.1, 0.10.1.0, 0.10.1.1, 0.10.2.0
    • None
    • clients
    • Important

    Description

      If Consumer started with wrong bootstrap servers or absent any valid servers, and Thread call Consumer.poll(timeout) with any timeout Thread stuck in loop with debug logs like

      org.apache.kafka.common.network.Selector - Connection with /172.31.1.100 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:81)
      	at org.apache.kafka.common.network.Selector.pollSelectionKeys(Selector.java:335)
      	at org.apache.kafka.common.network.Selector.poll(Selector.java:303)
      	at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:349)
      	at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:226)
      	at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:203)
      	at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.awaitMetadataUpdate(ConsumerNetworkClient.java:138)
      	at org.apache.kafka.clients.consumer.internals.AbstractCoordinator.ensureCoordinatorReady(AbstractCoordinator.java:216)
      	at org.apache.kafka.clients.consumer.internals.AbstractCoordinator.ensureCoordinatorReady(AbstractCoordinator.java:193)
      	at org.apache.kafka.clients.consumer.internals.ConsumerCoordinator.poll(ConsumerCoordinator.java:275)
      	at org.apache.kafka.clients.consumer.KafkaConsumer.pollOnce(KafkaConsumer.java:1030)
      	at org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:995)
      	at com.example.SccSpringCloudDemoApplication.main(SccSpringCloudDemoApplication.java:46)
      

      Problem with AbstractCoordinator.ensureCoordinatorReady() method
      It uses Long.MAX_VALUE as timeout.

      Attachments

        Issue Links

          Activity

            People

              james.c james chien
              neosonic Vladimir Porshkevich
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 4m
                  4m
                  Remaining:
                  Remaining Estimate - 4m
                  4m
                  Logged:
                  Time Spent - Not Specified
                  Not Specified