大佬能帮看下是什么原因么,win10环境下,raft模式单节点启动报错,提示quorum-state另一个程序正在使用此文件,进程无法访问,查看生成目录下并无这个文件,我手动加了个空文件,被进程自己删掉了,错误日志:
[2022-08-10 18:10:22,760] ERROR Exiting Kafka due to fatal exception (kafka.Kafka$)
java.io.UncheckedIOException: Error while writing the Quorum status from the file D:\tmp\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:364)
at kafka.raft.KafkaRaftManager.buildRaftClient(RaftManager.scala:203)
at kafka.raft.KafkaRaftManager.<init>(RaftManager.scala:125)
at kafka.server.KafkaRaftServer.<init>(KafkaRaftServer.scala:76)
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:\tmp\kraft-combined-logs\__cluster_metadata-0\quorum-state.tmp -> D:\tmp\kraft-combined-logs\__cluster_metadata-0\quorum-state: 另一个程序正在使用此文件,进程无法访问。
at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:92)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
at java.base/sun.nio.fs.WindowsFileCopy.move(WindowsFileCopy.java:395)
at java.base/sun.nio.fs.WindowsFileSystemProvider.move(WindowsFileSystemProvider.java:292)
at java.base/java.nio.file.Files.move(Files.java:1421)
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:\tmp\kraft-combined-logs\__cluster_metadata-0\quorum-state.tmp -> D:\tmp\kraft-combined-logs\__cluster_metadata-0\quorum-state: 另一个程序正在使用此文件,进程无法访问。
at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:92)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
at java.base/sun.nio.fs.WindowsFileCopy.move(WindowsFileCopy.java:309)
at java.base/sun.nio.fs.WindowsFileSystemProvider.move(WindowsFileSystemProvider.java:292)
at java.base/java.nio.file.Files.move(Files.java:1421)
at org.apache.kafka.common.utils.Utils.atomicMoveWithFallback(Utils.java:932)
... 12 more