You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Jason Gustafson (JIRA)" <ji...@apache.org> on 2015/11/24 04:51:10 UTC
[jira] [Commented] (KAFKA-2880) Fetcher.getTopicMetadata
NullPointerException when broker cannot be reached
[ https://issues.apache.org/jira/browse/KAFKA-2880?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15023729#comment-15023729 ]
Jason Gustafson commented on KAFKA-2880:
----------------------------------------
[~ewencp] Looks like we're missing a disconnect check on the client response. Looking over the code, error handling for the listTopics() and partitionsFor() API clearly hasn't been given enough attention. How about we expand the scope of this ticket to include the following cases?
1. Unauthorized topics: raise TopicAuthorizationException
2. Miscellaneous topic errors (e.g. leader/replica not available): retry until request timeout expires
3. Disconnect errors: retry until request timeout expires
4. Request timeout: raise TimeoutException
> Fetcher.getTopicMetadata NullPointerException when broker cannot be reached
> ---------------------------------------------------------------------------
>
> Key: KAFKA-2880
> URL: https://issues.apache.org/jira/browse/KAFKA-2880
> Project: Kafka
> Issue Type: Bug
> Components: clients
> Affects Versions: 0.9.0.0
> Reporter: Ewen Cheslack-Postava
> Assignee: Jason Gustafson
>
> The Fetcher class will throw a NullPointerException if a broker cannot be reached:
> {quote}
> Exception in thread "main" java.lang.NullPointerException
> at org.apache.kafka.common.requests.MetadataResponse.<init>(MetadataResponse.java:130)
> at org.apache.kafka.clients.consumer.internals.Fetcher.getTopicMetadata(Fetcher.java:203)
> at org.apache.kafka.clients.consumer.KafkaConsumer.partitionsFor(KafkaConsumer.java:1143)
> at org.apache.kafka.connect.util.KafkaBasedLog.start(KafkaBasedLog.java:126)
> at org.apache.kafka.connect.storage.KafkaOffsetBackingStore.start(KafkaOffsetBackingStore.java:85)
> at org.apache.kafka.connect.runtime.Worker.start(Worker.java:108)
> at org.apache.kafka.connect.runtime.Connect.start(Connect.java:56)
> at org.apache.kafka.connect.cli.ConnectDistributed.main(ConnectDistributed.java:62)
> {quote}
> This is trivially reproduced by trying to start Kafka Connect in distributed mode (i.e. connect-distributed.sh config/connect-distributed.properties) with no broker running. However, it's not specific to Kafka Connect, it just happens to use the consumer in a way that triggers it reliably.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)