赞
踩
报错信息
[2024-01-02 16:44:00,892] INFO [raft-expiration-reaper]: Starting (kafka.raft.TimingWheelExpirationService$ExpiredOperationReaper)
[2024-01-02 16:44:01,041] ERROR Exiting Kafka due to fatal exception (kafka.Kafka$)
java.io.UncheckedIOException: Error while writing the Quorum status from the file D:\dev\kafka_2.13-3.3.1\logs\kraft-combined-logs\__cluster_metadata-0\quorum-state
at org.apache.kafka.raft.FileBasedStateStore.writeElectionStateToFile(FileBasedStateStore.java:155)
at org.apache.kafka.raft.FileBasedStateStore.writeElectionState(FileBasedStateStore.java:128)
at org.apache.kafka.raft.QuorumState.transitionTo(QuorumState.java:477)
at org.apache.kafka.raft.QuorumState.initialize(QuorumState.java:212)
at org.apache.kafka.raft.KafkaRaftClient.initialize(KafkaRaftClient.java:369)
at kafka.raft.KafkaRaftManager.buildRaftClient(RaftManager.scala:200)
at kafka.raft.KafkaRaftManager.<init>(RaftManager.scala:127)
at kafka.server.KafkaRaftServer.<init>(KafkaRaftServer.scala:83)
at kafka.Kafka$.buildServer(Kafka.scala:79)
at kafka.Kafka$.main(Kafka.scala:87)
at kafka.Kafka.main(Kafka.scala)
Caused by: java.nio.file.FileSystemException: D:\dev\kafka_2.13-3.3.1\logs\kraft-combined-logs\__cluster_metadata-0\quorum-state.tmp -> D:\dev\kafka_2.13-3.3.1\logs\kraft-combined-logs\__cluster_metadata-0\quorum-state: 另一个程序正在使 用此文件,进程无法访问。
at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:86)
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
at sun.nio.fs.WindowsFileCopy.move(WindowsFileCopy.java:387)
at sun.nio.fs.WindowsFileSystemProvider.move(WindowsFileSystemProvider.java:287)
at java.nio.file.Files.move(Files.java:1395)
at org.apache.kafka.common.utils.Utils.atomicMoveWithFallback(Utils.java:935)
at org.apache.kafka.common.utils.Utils.atomicMoveWithFallback(Utils.java:918)
at org.apache.kafka.raft.FileBasedStateStore.writeElectionStateToFile(FileBasedStateStore.java:152)
... 10 more
Suppressed: java.nio.file.FileSystemException: D:\dev\kafka_2.13-3.3.1\logs\kraft-combined-logs\__cluster_metadata-0\quorum-state.tmp -> D:\dev\kafka_2.13-3.3.1\logs\kraft-combined-logs\__cluster_metadata-0\quorum-state: 另一个程序正在使用此文件,进程无法访问。
at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:86)
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
at sun.nio.fs.WindowsFileCopy.move(WindowsFileCopy.java:301)
at sun.nio.fs.WindowsFileSystemProvider.move(WindowsFileSystemProvider.java:287)
at java.nio.file.Files.move(Files.java:1395)
at org.apache.kafka.common.utils.Utils.atomicMoveWithFallback(Utils.java:932)
... 12 more
解决办法: 升级到 3.6.0
相关issue参考: [KAFKA-14273] Kafka doesn't start with KRaft on Windows - ASF JIRA
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。