You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by 陈小军 <ch...@nhn.com> on 2014/01/21 07:30:00 UTC

Kafka server occure java.nio.BufferUnderflowException

Hi all, 
   in my kafka cluster, it alway ocuure following erro logs
 
[2014-01-21 15:25:24,462] ERROR Closing socket for /10.99.116.54 because of error (kafka.network.Processor)
java.nio.BufferUnderflowException
        at java.nio.Buffer.nextGetIndex(Buffer.java:498)
        at java.nio.HeapByteBuffer.getShort(HeapByteBuffer.java:304)
        at kafka.api.ApiUtils$.readShortString(ApiUtils.scala:34)
        at kafka.api.TopicMetadataRequest$$anonfun$readFrom$1.apply(TopicMetadataRequest.scala:44)
        at kafka.api.TopicMetadataRequest$$anonfun$readFrom$1.apply(TopicMetadataRequest.scala:43)
        at scala.collection.immutable.Range$ByOne$class.foreach(Range.scala:285)
        at scala.collection.immutable.Range$$anon$2.foreach(Range.scala:265)
        at kafka.api.TopicMetadataRequest$.readFrom(TopicMetadataRequest.scala:43)
        at kafka.api.RequestKeys$$anonfun$4.apply(RequestKeys.scala:39)
        at kafka.api.RequestKeys$$anonfun$4.apply(RequestKeys.scala:39)
        at kafka.network.RequestChannel$Request.&lt;init&gt;(RequestChannel.scala:50)
        at kafka.network.Processor.read(SocketServer.scala:353)
        at kafka.network.Processor.run(SocketServer.scala:245)
        at java.lang.Thread.run(Thread.java:744)
 
does someone also have this problem??
 

Best Regards
Jerry

Re:Re: Kafka server occure java.nio.BufferUnderflowException

Posted by linxpwww <li...@163.com>.
I guess this may cause by incompatible versions. Could you list your kafka server, zookeeper and librdkafka versions?


Xianping





At 2014-01-22 23:11:05,"Jun Rao" <ju...@gmail.com> wrote:
>This could also be an implementation issue with the wire protocol in the c
>library. Could you dump out the bytes in the request and see if it matches
>the protocol specified in our wiki (
>https://cwiki.apache.org/confluence/display/KAFKA/A+Guide+To+The+Kafka+Protocol
>)?
>
>Thanks,
>
>Jun
>
>
>On Wed, Jan 22, 2014 at 12:27 AM, 陈小军 <ch...@nhn.com> wrote:
>
>> I use c  library (librdkafka)
>>
>>
>> Best Regards
>> Jerry
>>
>> -----Original Message-----
>> *From:* "Jun Rao"<ju...@gmail.com>
>> *To:* "users@kafka.apache.org"<us...@kafka.apache.org>; "陈小军"<
>> chenxiaojun@nhn.com>;
>> *Cc:*
>> *Sent:* 2014-01-22 (星期三) 00:44:59
>> *Subject:* Re: Kafka server occure java.nio.BufferUnderflowException
>>
>> This means that the broker somehow gets a corrupted TopicMetadata request.
>> Are you using the java/scala client?
>>
>> Thanks,
>>
>> Jun
>>
>>
>> On Mon, Jan 20, 2014 at 10:30 PM, 陈小军 <ch...@nhn.com> wrote:
>>
>> Hi all,
>> in my kafka cluster, it alway ocuure following erro logs
>>
>> [2014-01-21 15:25:24,462] ERROR Closing socket for /10.99.116.54 because
>> of error (kafka.network.Processor)
>> java.nio.BufferUnderflowException
>> at java.nio.Buffer.nextGetIndex(Buffer.java:498)
>> at java.nio.HeapByteBuffer.getShort(HeapByteBuffer.java:304)
>> at kafka.api.ApiUtils$.readShortString(ApiUtils.scala:34)
>> at
>> kafka.api.TopicMetadataRequest$$anonfun$readFrom$1.apply(TopicMetadataRequest.scala:44)
>> at
>> kafka.api.TopicMetadataRequest$$anonfun$readFrom$1.apply(TopicMetadataRequest.scala:43)
>> at scala.collection.immutable.Range$ByOne$class.foreach(Range.scala:285)
>> at scala.collection.immutable.Range$$anon$2.foreach(Range.scala:265)
>> at kafka.api.TopicMetadataRequest$.readFrom(TopicMetadataRequest.scala:43)
>> at kafka.api.RequestKeys$$anonfun$4.apply(RequestKeys.scala:39)
>> at kafka.api.RequestKeys$$anonfun$4.apply(RequestKeys.scala:39)
>> at
>> kafka.network.RequestChannel$Request.&lt;init&gt;(RequestChannel.scala:50)
>> at kafka.network.Processor.read(SocketServer.scala:353)
>> at kafka.network.Processor.run(SocketServer.scala:245)
>> at java.lang.Thread.run(Thread.java:744)
>>
>> does someone also have this problem??
>>
>>
>> Best Regards
>> Jerry
>>
>>
>>

Re: Kafka server occure java.nio.BufferUnderflowException

Posted by Jun Rao <ju...@gmail.com>.
This could also be an implementation issue with the wire protocol in the c
library. Could you dump out the bytes in the request and see if it matches
the protocol specified in our wiki (
https://cwiki.apache.org/confluence/display/KAFKA/A+Guide+To+The+Kafka+Protocol
)?

Thanks,

Jun


On Wed, Jan 22, 2014 at 12:27 AM, 陈小军 <ch...@nhn.com> wrote:

> I use c  library (librdkafka)
>
>
> Best Regards
> Jerry
>
> -----Original Message-----
> *From:* "Jun Rao"<ju...@gmail.com>
> *To:* "users@kafka.apache.org"<us...@kafka.apache.org>; "陈小军"<
> chenxiaojun@nhn.com>;
> *Cc:*
> *Sent:* 2014-01-22 (星期三) 00:44:59
> *Subject:* Re: Kafka server occure java.nio.BufferUnderflowException
>
> This means that the broker somehow gets a corrupted TopicMetadata request.
> Are you using the java/scala client?
>
> Thanks,
>
> Jun
>
>
> On Mon, Jan 20, 2014 at 10:30 PM, 陈小军 <ch...@nhn.com> wrote:
>
> Hi all,
> in my kafka cluster, it alway ocuure following erro logs
>
> [2014-01-21 15:25:24,462] ERROR Closing socket for /10.99.116.54 because
> of error (kafka.network.Processor)
> java.nio.BufferUnderflowException
> at java.nio.Buffer.nextGetIndex(Buffer.java:498)
> at java.nio.HeapByteBuffer.getShort(HeapByteBuffer.java:304)
> at kafka.api.ApiUtils$.readShortString(ApiUtils.scala:34)
> at
> kafka.api.TopicMetadataRequest$$anonfun$readFrom$1.apply(TopicMetadataRequest.scala:44)
> at
> kafka.api.TopicMetadataRequest$$anonfun$readFrom$1.apply(TopicMetadataRequest.scala:43)
> at scala.collection.immutable.Range$ByOne$class.foreach(Range.scala:285)
> at scala.collection.immutable.Range$$anon$2.foreach(Range.scala:265)
> at kafka.api.TopicMetadataRequest$.readFrom(TopicMetadataRequest.scala:43)
> at kafka.api.RequestKeys$$anonfun$4.apply(RequestKeys.scala:39)
> at kafka.api.RequestKeys$$anonfun$4.apply(RequestKeys.scala:39)
> at
> kafka.network.RequestChannel$Request.&lt;init&gt;(RequestChannel.scala:50)
> at kafka.network.Processor.read(SocketServer.scala:353)
> at kafka.network.Processor.run(SocketServer.scala:245)
> at java.lang.Thread.run(Thread.java:744)
>
> does someone also have this problem??
>
>
> Best Regards
> Jerry
>
>
>

Re: Kafka server occure java.nio.BufferUnderflowException

Posted by Magnus Edenhill <ma...@edenhill.se>.
Hey Jerry,

this issue was fixed on dec 14 in commit 16915a2.

If the problem persists in the latest version of librdkafka (0.8.2), please
file a github issue here:
https://github.com/edenhill/librdkafka/issues/


Thanks,
Magnus


2014/1/22 陈小军 <ch...@nhn.com>

> I use c  library (librdkafka)
>
> Best Regards
> Jerry
> -----Original Message-----
> From: "Jun Rao"&lt;junrao@gmail.com&gt;
> To: "users@kafka.apache.org"&lt;users@kafka.apache.org&gt;; "陈小军"&
> lt;chenxiaojun@nhn.com&gt;;
> Cc:
> Sent: 2014-01-22 (星期三) 00:44:59
> Subject: Re: Kafka server occure java.nio.BufferUnderflowException
>
> This means that the broker somehow gets a corrupted TopicMetadata request.
> Are you using the java/scala client? Thanks, Jun
>
>
> On Mon, Jan 20, 2014 at 10:30 PM, 陈小军 &lt;chenxiaojun@nhn.com&gt; wrote:
>
> Hi all,
>
>    in my kafka cluster, it alway ocuure following erro logs
>
>
>
> [2014-01-21 15:25:24,462] ERROR Closing socket for /10.99.116.54 because
> of error (kafka.network.Processor)
>
> java.nio.BufferUnderflowException
>
>         at java.nio.Buffer.nextGetIndex(Buffer.java:498)
>
>         at java.nio.HeapByteBuffer.getShort(HeapByteBuffer.java:304)
>
>         at kafka.api.ApiUtils$.readShortString(ApiUtils.scala:34)
>
>         at
> kafka.api.TopicMetadataRequest$$anonfun$readFrom$1.apply(TopicMetadataRequest.scala:44)
>
>         at
> kafka.api.TopicMetadataRequest$$anonfun$readFrom$1.apply(TopicMetadataRequest.scala:43)
>
>         at
> scala.collection.immutable.Range$ByOne$class.foreach(Range.scala:285)
>
>         at
> scala.collection.immutable.Range$$anon$2.foreach(Range.scala:265)
>
>         at
> kafka.api.TopicMetadataRequest$.readFrom(TopicMetadataRequest.scala:43)
>
>         at kafka.api.RequestKeys$$anonfun$4.apply(RequestKeys.scala:39)
>
>         at kafka.api.RequestKeys$$anonfun$4.apply(RequestKeys.scala:39)
>
>         at
> kafka.network.RequestChannel$Request.&amp;lt;init&amp;gt;(RequestChannel.scala:50)
>
>         at kafka.network.Processor.read(SocketServer.scala:353)
>
>         at kafka.network.Processor.run(SocketServer.scala:245)
>
>         at java.lang.Thread.run(Thread.java:744)
>
>
>
> does someone also have this problem??
>
>
>
>
>
> Best Regards
>
> Jerry
>
>
>
>
>

Re: Kafka server occure java.nio.BufferUnderflowException

Posted by 陈小军 <ch...@nhn.com>.
I use c  library (librdkafka)

Best Regards
Jerry
-----Original Message-----
From: "Jun Rao"&lt;junrao@gmail.com&gt; 
To: "users@kafka.apache.org"&lt;users@kafka.apache.org&gt;; "陈小军"&lt;chenxiaojun@nhn.com&gt;; 
Cc: 
Sent: 2014-01-22 (星期三) 00:44:59
Subject: Re: Kafka server occure java.nio.BufferUnderflowException
 
This means that the broker somehow gets a corrupted TopicMetadata request. Are you using the java/scala client? Thanks, Jun 


On Mon, Jan 20, 2014 at 10:30 PM, 陈小军 &lt;chenxiaojun@nhn.com&gt; wrote:

Hi all,

   in my kafka cluster, it alway ocuure following erro logs



[2014-01-21 15:25:24,462] ERROR Closing socket for /10.99.116.54 because of error (kafka.network.Processor)

java.nio.BufferUnderflowException

        at java.nio.Buffer.nextGetIndex(Buffer.java:498)

        at java.nio.HeapByteBuffer.getShort(HeapByteBuffer.java:304)

        at kafka.api.ApiUtils$.readShortString(ApiUtils.scala:34)

        at kafka.api.TopicMetadataRequest$$anonfun$readFrom$1.apply(TopicMetadataRequest.scala:44)

        at kafka.api.TopicMetadataRequest$$anonfun$readFrom$1.apply(TopicMetadataRequest.scala:43)

        at scala.collection.immutable.Range$ByOne$class.foreach(Range.scala:285)

        at scala.collection.immutable.Range$$anon$2.foreach(Range.scala:265)

        at kafka.api.TopicMetadataRequest$.readFrom(TopicMetadataRequest.scala:43)

        at kafka.api.RequestKeys$$anonfun$4.apply(RequestKeys.scala:39)

        at kafka.api.RequestKeys$$anonfun$4.apply(RequestKeys.scala:39)

        at kafka.network.RequestChannel$Request.&amp;lt;init&amp;gt;(RequestChannel.scala:50)

        at kafka.network.Processor.read(SocketServer.scala:353)

        at kafka.network.Processor.run(SocketServer.scala:245)

        at java.lang.Thread.run(Thread.java:744)



does someone also have this problem??





Best Regards

Jerry

 



Re: Kafka server occure java.nio.BufferUnderflowException

Posted by Jun Rao <ju...@gmail.com>.
This means that the broker somehow gets a corrupted TopicMetadata request.
Are you using the java/scala client?

Thanks,

Jun


On Mon, Jan 20, 2014 at 10:30 PM, 陈小军 <ch...@nhn.com> wrote:

> Hi all,
>    in my kafka cluster, it alway ocuure following erro logs
>
> [2014-01-21 15:25:24,462] ERROR Closing socket for /10.99.116.54 because
> of error (kafka.network.Processor)
> java.nio.BufferUnderflowException
>         at java.nio.Buffer.nextGetIndex(Buffer.java:498)
>         at java.nio.HeapByteBuffer.getShort(HeapByteBuffer.java:304)
>         at kafka.api.ApiUtils$.readShortString(ApiUtils.scala:34)
>         at
> kafka.api.TopicMetadataRequest$$anonfun$readFrom$1.apply(TopicMetadataRequest.scala:44)
>         at
> kafka.api.TopicMetadataRequest$$anonfun$readFrom$1.apply(TopicMetadataRequest.scala:43)
>         at
> scala.collection.immutable.Range$ByOne$class.foreach(Range.scala:285)
>         at
> scala.collection.immutable.Range$$anon$2.foreach(Range.scala:265)
>         at
> kafka.api.TopicMetadataRequest$.readFrom(TopicMetadataRequest.scala:43)
>         at kafka.api.RequestKeys$$anonfun$4.apply(RequestKeys.scala:39)
>         at kafka.api.RequestKeys$$anonfun$4.apply(RequestKeys.scala:39)
>         at
> kafka.network.RequestChannel$Request.&lt;init&gt;(RequestChannel.scala:50)
>         at kafka.network.Processor.read(SocketServer.scala:353)
>         at kafka.network.Processor.run(SocketServer.scala:245)
>         at java.lang.Thread.run(Thread.java:744)
>
> does someone also have this problem??
>
>
> Best Regards
> Jerry
>