kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vamsi Subhash Achanta (JIRA)" <j...@apache.org>
Subject [jira] [Created] (KAFKA-3657) NewProducer NullPointerException on ProduceRequest
Date Wed, 04 May 2016 15:08:12 GMT
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)

Mime
View raw message