You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Wenbing Shen (Jira)" <ji...@apache.org> on 2021/04/17 17:31:00 UTC
[jira] [Created] (KAFKA-12680) Failed to restart the broker in
kraft mode
Wenbing Shen created KAFKA-12680:
------------------------------------
Summary: Failed to restart the broker in kraft mode
Key: KAFKA-12680
URL: https://issues.apache.org/jira/browse/KAFKA-12680
Project: Kafka
Issue Type: Bug
Reporter: Wenbing Shen
I tested kraft mode for the first time today, I deployed a single node kraft mode broker according to the documentation:
[https://github.com/apache/kafka/blob/6d1d68617ecd023b787f54aafc24a4232663428d/config/kraft/README.md]
first step: ./bin/kafka-storage.sh random-uuid
Second step: Use the uuid generated above to execute the following commands:
./bin/kafka-storage.sh format -t <uuid> -c ./config/kraft/server.properties
third step: ./bin/kafka-server-start.sh ./config/kraft/server.properties
Then I created two topics with two partitions and a single replica.
./bin/kafka-topics.sh --create --topic test-01 --partitions 2 --replication-factor 1 --bootstrap-server localhost:9092
Verify that there is no problem with production and consumption, but when I call kafka-server-stop.sh, when I call the start command again, the broker starts to report an error.
I am not sure if it is a known bug or a problem with my usage
[2021-04-18 00:19:37,443] ERROR Exiting Kafka due to fatal exception (kafka.Kafka$)
java.io.IOException: Invalid argument
at java.io.RandomAccessFile.setLength(Native Method)
at kafka.log.AbstractIndex.$anonfun$resize$1(AbstractIndex.scala:189)
at kafka.log.AbstractIndex.resize(AbstractIndex.scala:175)
at kafka.log.AbstractIndex.$anonfun$trimToValidSize$1(AbstractIndex.scala:241)
at kafka.log.AbstractIndex.trimToValidSize(AbstractIndex.scala:241)
at kafka.log.LogSegment.recover(LogSegment.scala:385)
at kafka.log.Log.recoverSegment(Log.scala:741)
at kafka.log.Log.recoverLog(Log.scala:894)
at kafka.log.Log.$anonfun$loadSegments$2(Log.scala:816)
at kafka.log.Log$$Lambda$153/391630194.apply$mcJ$sp(Unknown Source)
at scala.runtime.java8.JFunction0$mcJ$sp.apply(JFunction0$mcJ$sp.scala:17)
at kafka.log.Log.retryOnOffsetOverflow(Log.scala:2456)
at kafka.log.Log.loadSegments(Log.scala:816)
at kafka.log.Log.<init>(Log.scala:326)
at kafka.log.Log$.apply(Log.scala:2593)
at kafka.raft.KafkaMetadataLog$.apply(KafkaMetadataLog.scala:358)
at kafka.raft.KafkaRaftManager.buildMetadataLog(RaftManager.scala:253)
at kafka.raft.KafkaRaftManager.<init>(RaftManager.scala:127)
at kafka.server.KafkaRaftServer.<init>(KafkaRaftServer.scala:74)
at kafka.Kafka$.buildServer(Kafka.scala:79)
at kafka.Kafka$.main(Kafka.scala:87)
at kafka.Kafka.main(Kafka.scala)
--
This message was sent by Atlassian Jira
(v8.3.4#803005)