Kafka错误:Kafka进程经常失败尝试重新启动时显示以下错误

f4t66c6m  于 2021-06-06  发布在  Kafka
关注(0)|答案(1)|浏览(623)

提前谢谢。请帮助我解决下面提到的Kafka错误。

00000000000000.txnindex and rebuilding index... (kafka.log.Log)
[2018-09-25 12:48:05,462] ERROR There was an error in one of the threads during logs loading: java.lang.InternalError: a fault occurred in a recent unsafe memory access operation in compiled Java code (kafka.log.LogManager)
[2018-09-25 12:48:05,469] FATAL [KafkaServer id=0] Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
java.lang.InternalError: a fault occurred in a recent unsafe memory access operation in compiled Java code
        at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:57)
        at java.nio.ByteBuffer.allocate(ByteBuffer.java:335)
        at org.apache.kafka.common.record.FileLogInputStream$FileChannelRecordBatch.loadBatchWithSize(FileLogInputStream.java:209)
        at org.apache.kafka.common.record.FileLogInputStream$FileChannelRecordBatch.loadFullBatch(FileLogInputStream.java:192)
        at org.apache.kafka.common.record.FileLogInputStream$FileChannelRecordBatch.ensureValid(FileLogInputStream.java:164)
        at kafka.log.LogSegment$$anonfun$recover$1.apply(LogSegment.scala:263)
        at kafka.log.LogSegment$$anonfun$recover$1.apply(LogSegment.scala:262)
        at scala.collection.Iterator$class.foreach(Iterator.scala:891)
        at scala.collection.AbstractIterator.foreach(Iterator.scala:1334)
ia2d9nvy

ia2d9nvy1#

我猜你的Kafka日志目录( log.dirsserver.properties )内存不足。当kafka试图重建索引时,内存不足,因此无法启动kafka代理。假设 log.dirs=/var/lib/kafka ```
df -hT /var/lib/kafka

将显示日志目录的存储使用情况。

相关问题