kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Максим Гумеров <mgume...@gmail.com>
Subject NPEs for practically empty log
Date Fri, 21 Oct 2016 05:07:50 GMT
Hi! I see WARNs on kafka startup even if I only have a single empty topic.
Is it OK? Doesn't that mean I am going to run into real problems at some
moment?

That's the scenario, it's under Windows 10.

I download and unzip kafka 2.11 (same story with 2.10), then I make changes
to kafka-server-start.bat to direct JAVA_HOME to Oracle's 64-bit JRE, and
to set KAFKA_HEAP_OPTS=-Xms2G -Xmx2G -XX:MaxPermSize=256m

Then I run this:

bin\windows\zookeeper-server-start config\zookeeper.properties
bin\windows\kafka-server-start config\server.properties
bin\windows\kafka-topics --create --zookeeper localhost:2181
--replication-factor 1 --partitions 1 --topic requests

Then I stop the Kafka server - either by terminating its process or with
kafka-server-stop - and re-start it.
And that's what I see in a log:

[2016-10-21 09:50:19,830] WARN Error when freeing index buffer
(kafka.log.OffsetIndex)
java.lang.NullPointerException
        at
kafka.log.OffsetIndex.kafka$log$OffsetIndex$$forceUnmap(OffsetIndex.scala:310)
        at
kafka.log.OffsetIndex$$anonfun$resize$1.apply(OffsetIndex.scala:292)
        at
kafka.log.OffsetIndex$$anonfun$resize$1.apply(OffsetIndex.scala:285)
        at kafka.utils.CoreUtils$.inLock(CoreUtils.scala:231)
        at kafka.log.OffsetIndex.resize(OffsetIndex.scala:285)
        at kafka.log.LogSegment.recover(LogSegment.scala:174)
        at kafka.log.Log.recoverLog(Log.scala:268)
        at kafka.log.Log.loadSegments(Log.scala:243)
        at kafka.log.Log.<init>(Log.scala:101)
        at
kafka.log.LogManager$$anonfun$loadLogs$2$$anonfun$3$$anonfun$apply$10$$anonfun$apply$1.apply$mcV$sp(LogManager.scala:152)
        at kafka.utils.CoreUtils$$anon$1.run(CoreUtils.scala:56)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown
Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
Source)
        at java.lang.Thread.run(Unknown Source)

To my understanding, there's no viable reason to have NPEs in production
environment as an expected condition. So even if that's shown as a warning
and is supposedly harmless, it looks like a bad symptom.

Or I am just being paranoid and it's OK for Kafka server to have multiple
NPEs on startup - even on an empty log, let alone a populated one?

Maksim

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message