Return-Path: X-Original-To: apmail-kafka-dev-archive@www.apache.org Delivered-To: apmail-kafka-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 968701858A for ; Mon, 4 Jan 2016 15:08:40 +0000 (UTC) Received: (qmail 88134 invoked by uid 500); 4 Jan 2016 15:08:40 -0000 Delivered-To: apmail-kafka-dev-archive@kafka.apache.org Received: (qmail 88028 invoked by uid 500); 4 Jan 2016 15:08:40 -0000 Mailing-List: contact dev-help@kafka.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@kafka.apache.org Delivered-To: mailing list dev@kafka.apache.org Received: (qmail 88002 invoked by uid 99); 4 Jan 2016 15:08:40 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Jan 2016 15:08:40 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id D0AFB2C1F5C for ; Mon, 4 Jan 2016 15:08:39 +0000 (UTC) Date: Mon, 4 Jan 2016 15:08:39 +0000 (UTC) From: "Ismael Juma (JIRA)" To: dev@kafka.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (KAFKA-3041) NullPointerException in new Consumer API on broker restart MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/KAFKA-3041?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Ismael Juma resolved KAFKA-3041. -------------------------------- Resolution: Duplicate Assignee: Jason Gustafson (was: Neha Narkhede) > NullPointerException in new Consumer API on broker restart > ---------------------------------------------------------- > > Key: KAFKA-3041 > URL: https://issues.apache.org/jira/browse/KAFKA-3041 > Project: Kafka > Issue Type: Bug > Components: consumer > Affects Versions: 0.9.0.0 > Reporter: Enrico Olivelli > Assignee: Jason Gustafson > Priority: Blocker > > I 'm unning a brand new Kafka cluster (version 0.9.0.0). During my tests = I noticed this error at Consumer.partitionsFor during a full cluster restar= t. > My DEV cluster is made of 4 brokers > I cannot reproduce the problem consistently but it heppens sometimes duri= ng the restart of the brokers > This is my code: > this.properties =3D new Properties(); > properties.put("bootstrap.servers", "list of servers")); > properties.put("acks", "all"); > properties.put("retries", 0); > properties.put("batch.size", 16384); > properties.put("linger.ms", 1); > properties.put("buffer.memory", 33554432); > properties.put("group.id", "test"); > properties.put("session.timeout.ms", "30000"); > properties.put("key.deserializer", "org.apache.kafka.common.seria= lization.ByteArrayDeserializer"); > properties.put("value.deserializer", "org.apache.kafka.common.ser= ialization.ByteArrayDeserializer"); > String topic =3D "xxx=E2=80=9D; > try (KafkaConsumer consumer =3D new KafkaConsumer= <>(properties);) { > List partitions =3D consumer.partitionsFor(top= ic); > =E2=80=A6. > } > This is the error: > java.lang.NullPointerException > at org.apache.kafka.common.requests.MetadataResponse.(MetadataResponse.java:130) > at org.apache.kafka.clients.consumer.internals.Fetcher.ge= tTopicMetadata(Fetcher.java:203) > at org.apache.kafka.clients.consumer.KafkaConsumer.partit= ionsFor(KafkaConsumer.java:1143) > at magnews.datastream.KafkaDataStreamConsumer.fetchNewDat= a(KafkaDataStreamConsumer.java:44 -- This message was sent by Atlassian JIRA (v6.3.4#6332)