Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id C5031200AE3 for ; Wed, 4 May 2016 17:08:19 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id C37441609FC; Wed, 4 May 2016 15:08:19 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 165951609A1 for ; Wed, 4 May 2016 17:08:18 +0200 (CEST) Received: (qmail 39733 invoked by uid 500); 4 May 2016 15:08:13 -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 39626 invoked by uid 99); 4 May 2016 15:08:12 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 May 2016 15:08:12 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id D97B42C1F5D for ; Wed, 4 May 2016 15:08:12 +0000 (UTC) Date: Wed, 4 May 2016 15:08:12 +0000 (UTC) From: "Vamsi Subhash Achanta (JIRA)" To: dev@kafka.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (KAFKA-3657) NewProducer NullPointerException on ProduceRequest MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 04 May 2016 15:08:20 -0000 Vamsi Subhash Achanta created KAFKA-3657: -------------------------------------------- Summary: NewProducer NullPointerException on ProduceRequest Key: KAFKA-3657 URL: https://issues.apache.org/jira/browse/KAFKA-3657 Project: Kafka Issue Type: Bug Components: network, producer Affects Versions: 0.8.2.1 Environment: linux 3.2.0 debian7 Reporter: Vamsi Subhash Achanta Assignee: Jun Rao The producer upon send.get() on the future appends to the accumulator the record batches and the Sender.java (separate thread) flushes it to the server. The produce request waits on the countDownLatch in the FutureRecordMetadata: public RecordMetadata get() throws InterruptedException, ExecutionException { this.result.await(); In this case, the client thread is blocked for ever (as it is get() without timeout) for the response and the response upon poll by the Sender returns an attachment with the batch value as null. The batch is processed and the request is errored out. The Sender catches a global level exception and then goes ahead. As the accumulator is drained, the response will never be returned and the producer client thread calling get() is blocked for ever on the latch await call. I checked at the server end but still haven't found the reason for null batch. Any pointers on this? ERROR [2016-05-01 21:00:09,256] [kafka-producer-network-thread |producer-app] [Sender] message_id: group_id: : Uncaught error in kafka producer I/O thread: ! java.lang.NullPointerException: null ! at org.apache.kafka.clients.producer.internals.Sender.completeBatch(Sender.java:266) ! at org.apache.kafka.clients.producer.internals.Sender.handleResponse(Sender.java:236) ! at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:196) ! at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:122) ! at java.lang.Thread.run(Thread.java:745) -- This message was sent by Atlassian JIRA (v6.3.4#6332)