You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Manikumar (JIRA)" <ji...@apache.org> on 2018/09/12 09:21:00 UTC

[jira] [Resolved] (KAFKA-3657) NewProducer NullPointerException on ProduceRequest

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

Manikumar resolved KAFKA-3657.
------------------------------
    Resolution: Cannot Reproduce

Closing inactive issue.  Please reopen if  the issue still exists on newer versions.

> 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, 0.9.0.1
>         Environment: linux 3.2.0 debian7
>            Reporter: Vamsi Subhash Achanta
>            Assignee: Jun Rao
>            Priority: Major
>              Labels: reliability
>
> 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
(v7.6.3#76005)