You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Yonghui Zhao <zh...@gmail.com> on 2013/05/30 05:07:31 UTC

InvalidMessageException

Hi,

I am using kafka 0.7.2, do you see this exception?   What's the possible
reason?

2013/05/29 19:18:19.325 ERROR [KafkaRequestHandlers] [] Error processing
ProduceRequest on gallery:0
kafka.message.InvalidMessageException: message is invalid, compression
codec: NoCompressionCodec size: 222 curr offset: 0 init offset: 0
        at
kafka.message.ByteBufferMessageSet$$anon$1.makeNextOuter(ByteBufferMessageSet.scala:130)
        at
kafka.message.ByteBufferMessageSet$$anon$1.makeNext(ByteBufferMessageSet.scala:160)
        at
kafka.message.ByteBufferMessageSet$$anon$1.makeNext(ByteBufferMessageSet.scala:100)
        at
kafka.utils.IteratorTemplate.maybeComputeNext(IteratorTemplate.scala:59)
        at kafka.utils.IteratorTemplate.hasNext(IteratorTemplate.scala:51)
        at
kafka.message.ByteBufferMessageSet.verifyMessageSize(ByteBufferMessageSet.scala:89)
        at kafka.log.Log.append(Log.scala:218)
        at
kafka.server.KafkaRequestHandlers.kafka$server$KafkaRequestHandlers$$handleProducerRequest(KafkaRequestHandlers.scala:69)
        at
kafka.server.KafkaRequestHandlers.handleProducerRequest(KafkaRequestHandlers.scala:53)
        at
kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:38)
        at
kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:38)
        at kafka.network.Processor.handle(SocketServer.scala:296)
        at kafka.network.Processor.read(SocketServer.scala:319)
        at kafka.network.Processor.run(SocketServer.scala:214)
        at java.lang.Thread.run(Thread.java:679)

Re: InvalidMessageException

Posted by Yonghui Zhao <zh...@gmail.com>.
Thanks 国栋!


2013/5/30 王国栋 <wa...@gmail.com>

> Hi Yonghui,
>
> We see this exception too. We believe this is related to the jdk versions.
> In our case, the exception only happens on heavy workload, and after we
> upgrade the jdk version , it is gone.
>
> Currently, we use jdk1.6_35. I suggest you to try this.
>
> Best
>
> Guodong
>
>
> On Thu, May 30, 2013 at 11:07 AM, Yonghui Zhao <zhaoyonghui@gmail.com
> >wrote:
>
> > Hi,
> >
> > I am using kafka 0.7.2, do you see this exception?   What's the possible
> > reason?
> >
> > 2013/05/29 19:18:19.325 ERROR [KafkaRequestHandlers] [] Error processing
> > ProduceRequest on gallery:0
> > kafka.message.InvalidMessageException: message is invalid, compression
> > codec: NoCompressionCodec size: 222 curr offset: 0 init offset: 0
> >         at
> >
> >
> kafka.message.ByteBufferMessageSet$$anon$1.makeNextOuter(ByteBufferMessageSet.scala:130)
> >         at
> >
> >
> kafka.message.ByteBufferMessageSet$$anon$1.makeNext(ByteBufferMessageSet.scala:160)
> >         at
> >
> >
> kafka.message.ByteBufferMessageSet$$anon$1.makeNext(ByteBufferMessageSet.scala:100)
> >         at
> > kafka.utils.IteratorTemplate.maybeComputeNext(IteratorTemplate.scala:59)
> >         at
> kafka.utils.IteratorTemplate.hasNext(IteratorTemplate.scala:51)
> >         at
> >
> >
> kafka.message.ByteBufferMessageSet.verifyMessageSize(ByteBufferMessageSet.scala:89)
> >         at kafka.log.Log.append(Log.scala:218)
> >         at
> >
> >
> kafka.server.KafkaRequestHandlers.kafka$server$KafkaRequestHandlers$$handleProducerRequest(KafkaRequestHandlers.scala:69)
> >         at
> >
> >
> kafka.server.KafkaRequestHandlers.handleProducerRequest(KafkaRequestHandlers.scala:53)
> >         at
> >
> >
> kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:38)
> >         at
> >
> >
> kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:38)
> >         at kafka.network.Processor.handle(SocketServer.scala:296)
> >         at kafka.network.Processor.read(SocketServer.scala:319)
> >         at kafka.network.Processor.run(SocketServer.scala:214)
> >         at java.lang.Thread.run(Thread.java:679)
> >
>

Re: InvalidMessageException

Posted by 王国栋 <wa...@gmail.com>.
Hi Yonghui,

We see this exception too. We believe this is related to the jdk versions.
In our case, the exception only happens on heavy workload, and after we
upgrade the jdk version , it is gone.

Currently, we use jdk1.6_35. I suggest you to try this.

Best

Guodong


On Thu, May 30, 2013 at 11:07 AM, Yonghui Zhao <zh...@gmail.com>wrote:

> Hi,
>
> I am using kafka 0.7.2, do you see this exception?   What's the possible
> reason?
>
> 2013/05/29 19:18:19.325 ERROR [KafkaRequestHandlers] [] Error processing
> ProduceRequest on gallery:0
> kafka.message.InvalidMessageException: message is invalid, compression
> codec: NoCompressionCodec size: 222 curr offset: 0 init offset: 0
>         at
>
> kafka.message.ByteBufferMessageSet$$anon$1.makeNextOuter(ByteBufferMessageSet.scala:130)
>         at
>
> kafka.message.ByteBufferMessageSet$$anon$1.makeNext(ByteBufferMessageSet.scala:160)
>         at
>
> kafka.message.ByteBufferMessageSet$$anon$1.makeNext(ByteBufferMessageSet.scala:100)
>         at
> kafka.utils.IteratorTemplate.maybeComputeNext(IteratorTemplate.scala:59)
>         at kafka.utils.IteratorTemplate.hasNext(IteratorTemplate.scala:51)
>         at
>
> kafka.message.ByteBufferMessageSet.verifyMessageSize(ByteBufferMessageSet.scala:89)
>         at kafka.log.Log.append(Log.scala:218)
>         at
>
> kafka.server.KafkaRequestHandlers.kafka$server$KafkaRequestHandlers$$handleProducerRequest(KafkaRequestHandlers.scala:69)
>         at
>
> kafka.server.KafkaRequestHandlers.handleProducerRequest(KafkaRequestHandlers.scala:53)
>         at
>
> kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:38)
>         at
>
> kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:38)
>         at kafka.network.Processor.handle(SocketServer.scala:296)
>         at kafka.network.Processor.read(SocketServer.scala:319)
>         at kafka.network.Processor.run(SocketServer.scala:214)
>         at java.lang.Thread.run(Thread.java:679)
>

RE: InvalidMessageException

Posted by Jason Weiss <Ja...@rapid7.com>.
I've seen this error when using OpenJDK - I don't have the exact version in front of me at the moment. As soon as I switched to the Oracle JDKs, the error went away. However, in fairness to OpenJDK, others have had success on different versions of the OpenJDK than what I was using.

It's all in the group over the last couple of weeks - if you search for OpenJDK you can find a thread I'm on that shows which OpenJDK version failed for me, and worked for others.

HTH,

Jason

________________________________________
From: Yonghui Zhao [zhaoyonghui@gmail.com]
Sent: Wednesday, May 29, 2013 23:07
To: users@kafka.apache.org
Subject: InvalidMessageException

Hi,

I am using kafka 0.7.2, do you see this exception?   What's the possible
reason?

2013/05/29 19:18:19.325 ERROR [KafkaRequestHandlers] [] Error processing
ProduceRequest on gallery:0
kafka.message.InvalidMessageException: message is invalid, compression
codec: NoCompressionCodec size: 222 curr offset: 0 init offset: 0
        at
kafka.message.ByteBufferMessageSet$$anon$1.makeNextOuter(ByteBufferMessageSet.scala:130)
        at
kafka.message.ByteBufferMessageSet$$anon$1.makeNext(ByteBufferMessageSet.scala:160)
        at
kafka.message.ByteBufferMessageSet$$anon$1.makeNext(ByteBufferMessageSet.scala:100)
        at
kafka.utils.IteratorTemplate.maybeComputeNext(IteratorTemplate.scala:59)
        at kafka.utils.IteratorTemplate.hasNext(IteratorTemplate.scala:51)
        at
kafka.message.ByteBufferMessageSet.verifyMessageSize(ByteBufferMessageSet.scala:89)
        at kafka.log.Log.append(Log.scala:218)
        at
kafka.server.KafkaRequestHandlers.kafka$server$KafkaRequestHandlers$$handleProducerRequest(KafkaRequestHandlers.scala:69)
        at
kafka.server.KafkaRequestHandlers.handleProducerRequest(KafkaRequestHandlers.scala:53)
        at
kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:38)
        at
kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$1.apply(KafkaRequestHandlers.scala:38)
        at kafka.network.Processor.handle(SocketServer.scala:296)
        at kafka.network.Processor.read(SocketServer.scala:319)
        at kafka.network.Processor.run(SocketServer.scala:214)
        at java.lang.Thread.run(Thread.java:679)
This electronic message contains information which may be confidential or privileged. The information is intended for the use of the individual or entity named above. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited. If you have received this electronic transmission in error, please notify us by e-mail at (postmaster@rapid7.com) immediately.