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

Consumer startup swallows DNS resolution exception and infinitely retries

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 0.9.0.1
    • Fix Version/s: None
    • Component/s: clients, consumer, network
    • Labels:
      None
    • Environment:

      Description

      When a consumer encounters nodes that it can't resolve the IP to, I'd expect it to print an ERROR level msg and bubble up an exception, especially if there are no other nodes available.

      Following is the stack trace that was hidden under the DEBUG trace level:

      18:30:47.070 [Filters-akka.kafka.default-dispatcher-7] DEBUG o.apache.kafka.clients.NetworkClient - Initialize connection to node 0 for sending metadata request
      18:30:47.070 [Filters-akka.kafka.default-dispatcher-7] DEBUG o.apache.kafka.clients.NetworkClient - Initiating connection to node 0 at kafka.docker:9092.
      18:30:47.071 [Filters-akka.kafka.default-dispatcher-7] DEBUG o.apache.kafka.clients.NetworkClient - Error connecting to node 0 at kafka.docker:9092:
      java.io.IOException: Can't resolve address: kafka.docker:9092
             	at org.apache.kafka.common.network.Selector.connect(Selector.java:156)
             	at org.apache.kafka.clients.NetworkClient.initiateConnect(NetworkClient.java:489)
             	at org.apache.kafka.clients.NetworkClient.access$400(NetworkClient.java:47)
             	at org.apache.kafka.clients.NetworkClient$DefaultMetadataUpdater.maybeUpdate(NetworkClient.java:624)
             	at org.apache.kafka.clients.NetworkClient$DefaultMetadataUpdater.maybeUpdate(NetworkClient.java:543)
             	at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:254)
             	at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.clientPoll(ConsumerNetworkClient.java:320)
             	at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:213)
             	at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:193)
             	at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.awaitMetadataUpdate(ConsumerNetworkClient.java:134)
             	at org.apache.kafka.clients.consumer.internals.AbstractCoordinator.ensureCoordinatorKnown(AbstractCoordinator.java:184)
             	at org.apache.kafka.clients.consumer.KafkaConsumer.pollOnce(KafkaConsumer.java:886)
             	at org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:853)
             	at akka.kafka.internal.ConsumerStageLogic.poll(ConsumerStage.scala:410)
             	at akka.kafka.internal.CommittableConsumerStage$$anon$1.poll(ConsumerStage.scala:166)
             	at akka.kafka.internal.ConsumerStageLogic$$anon$5.onPull(ConsumerStage.scala:360)
             	at akka.stream.impl.fusing.GraphInterpreter.processEvent(GraphInterpreter.scala:608)
             	at akka.stream.impl.fusing.GraphInterpreter.execute(GraphInterpreter.scala:542)
             	at akka.stream.impl.fusing.GraphInterpreterShell.runBatch(ActorGraphInterpreter.scala:471)
             	at akka.stream.impl.fusing.GraphInterpreterShell.receive(ActorGraphInterpreter.scala:414)
             	at akka.stream.impl.fusing.ActorGraphInterpreter.akka$stream$impl$fusing$ActorGraphInterpreter$$processEvent(ActorGraphInterpreter.scala:603)
             	at akka.stream.impl.fusing.ActorGraphInterpreter$$anonfun$receive$1.applyOrElse(ActorGraphInterpreter.scala:618)
             	at akka.actor.Actor$class.aroundReceive(Actor.scala:484)
             	at akka.stream.impl.fusing.ActorGraphInterpreter.aroundReceive(ActorGraphInterpreter.scala:529)
             	at akka.actor.ActorCell.receiveMessage(ActorCell.scala:526)
             	at akka.actor.ActorCell.invoke(ActorCell.scala:495)
             	at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:257)
             	at akka.dispatch.Mailbox.run(Mailbox.scala:224)
             	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
             	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
             	at java.lang.Thread.run(Thread.java:745)
      Caused by: java.nio.channels.UnresolvedAddressException: null
             	at sun.nio.ch.Net.checkAddress(Net.java:101)
             	at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:622)
             	at org.apache.kafka.common.network.Selector.connect(Selector.java:153)
             	... 30 common frames omitted
      18:30:47.071 [Filters-akka.kafka.default-dispatcher-7] DEBUG o.apache.kafka.clients.NetworkClient - Give up sending metadata request since no node is available
      

      This exception is streamed out repeatedly.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                henders@gmail.com Shane Hender
              • Votes:
                2 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: