kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Manikumar (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (KAFKA-4122) Consumer startup swallows DNS resolution exception and infinitely retries
Date Sun, 01 Jul 2018 12:07:00 GMT

     [ https://issues.apache.org/jira/browse/KAFKA-4122?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Manikumar resolved KAFKA-4122.
------------------------------
    Resolution: Duplicate

Fixed under KAFKA-7111.

> Consumer startup swallows DNS resolution exception and infinitely retries
> -------------------------------------------------------------------------
>
>                 Key: KAFKA-4122
>                 URL: https://issues.apache.org/jira/browse/KAFKA-4122
>             Project: Kafka
>          Issue Type: Bug
>          Components: clients, consumer, network
>    Affects Versions: 0.9.0.1
>         Environment: Run from Docker image with following Dockerfile:
> {code}
> FROM java:openjdk-8-jre
> ENV DEBIAN_FRONTEND noninteractive
> ENV SCALA_VERSION 2.11
> ENV KAFKA_VERSION 0.9.0.1
> ENV KAFKA_HOME /opt/kafka_"$SCALA_VERSION"-"$KAFKA_VERSION"
> # Install Kafka, Zookeeper and other needed things
> RUN apt-get update && \
>     apt-get install -y zookeeper wget supervisor dnsutils && \
>     rm -rf /var/lib/apt/lists/* && \
>     apt-get clean && \
>     wget -q http://apache.mirrors.spacedump.net/kafka/"$KAFKA_VERSION"/kafka_"$SCALA_VERSION"-"$KAFKA_VERSION".tgz
-O /tmp/kafka_"$SCALA_VERSION"-"$KAFKA_VERSION".tgz && \
>     tar xfz /tmp/kafka_"$SCALA_VERSION"-"$KAFKA_VERSION".tgz -C /opt && \
>     rm /tmp/kafka_"$SCALA_VERSION"-"$KAFKA_VERSION".tgz
> {code}
>            Reporter: Shane Hender
>            Priority: Major
>
> 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:
> {code}
> 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
> {code}
> This exception is streamed out repeatedly.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message