You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Tobias Liefke (Jira)" <ji...@apache.org> on 2023/06/19 09:30:00 UTC
[jira] [Commented] (KAFKA-14273) Kafka doesn't start with KRaft on Windows
[ https://issues.apache.org/jira/browse/KAFKA-14273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17734089#comment-17734089 ]
Tobias Liefke commented on KAFKA-14273:
---------------------------------------
Still not fixed for 3.5.0.
> Kafka doesn't start with KRaft on Windows
> -----------------------------------------
>
> Key: KAFKA-14273
> URL: https://issues.apache.org/jira/browse/KAFKA-14273
> Project: Kafka
> Issue Type: Bug
> Components: kraft
> Affects Versions: 3.3.1
> Reporter: Kedar Joshi
> Priority: Major
>
> {{Basic setup doesn't work on Windows 10.}}
> *{{Steps}}*
> * {{Initialize cluster with -}}
> {code:sh}
> bin\windows\kafka-storage.bat random-uuid
> bin\windows\kafka-storage.bat format -t %cluster_id% -c .\config\kraft\server.properties{code}
>
> * Start Kafka with -
> {code:sh}
> bin\windows\kafka-server-start.bat .\config\kraft\server.properties{code}
>
> *Stacktrace*
> Kafka fails to start with following exception -
> {code:java}
> D:\LocationGuru\Servers\Kafka-3.3>bin\windows\kafka-server-start.bat .\config\kraft\server.properties
> [2022-10-03 23:14:20,089] INFO Registered kafka:type=kafka.Log4jController MBean (kafka.utils.Log4jControllerRegistration$)
> [2022-10-03 23:14:20,375] INFO Setting -D jdk.tls.rejectClientInitiatedRenegotiation=true to disable client-initiated TLS renegotiation (org.apache.zookeeper.common.X509Util)
> [2022-10-03 23:14:20,594] INFO [LogLoader partition=__cluster_metadata-0, dir=D:\LocationGuru\Servers\Kafka-3.3\tmp\kraft-combined-logs] Loading producer state till offset 0 with message format version 2 (kafka.log.UnifiedLog$)
> [2022-10-03 23:14:20,594] INFO [LogLoader partition=__cluster_metadata-0, dir=D:\LocationGuru\Servers\Kafka-3.3\tmp\kraft-combined-logs] Reloading from producer snapshot and rebuilding producer state from offset 0 (kafka.log.UnifiedLog$)
> [2022-10-03 23:14:20,594] INFO [LogLoader partition=__cluster_metadata-0, dir=D:\LocationGuru\Servers\Kafka-3.3\tmp\kraft-combined-logs] Producer state recovery took 0ms for snapshot load and 0ms for segment recovery from offset 0 (kafka.log.UnifiedLog$)
> [2022-10-03 23:14:20,640] INFO Initialized snapshots with IDs SortedSet() from D:\LocationGuru\Servers\Kafka-3.3\tmp\kraft-combined-logs__cluster_metadata-0 (kafka.raft.KafkaMetadataLog$)
> [2022-10-03 23:14:20,734] INFO [raft-expiration-reaper]: Starting (kafka.raft.TimingWheelExpirationService$ExpiredOperationReaper)
> [2022-10-03 23:14:20,900] ERROR Exiting Kafka due to fatal exception (kafka.Kafka$)
> java.io.UncheckedIOException: Error while writing the Quorum status from the file D:\LocationGuru\Servers\Kafka-3.3\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: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:\LocationGuru\Servers\Kafka-3.3\tmp\kraft-combined-logs_cluster_metadata-0\quorum-state.tmp -> D:\LocationGuru\Servers\Kafka-3.3\tmp\kraft-combined-logs_cluster_metadata-0\quorum-state: The process cannot access the file because it is being used by another process
> 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:403)
> at java.base/sun.nio.fs.WindowsFileSystemProvider.move(WindowsFileSystemProvider.java:293)
> at java.base/java.nio.file.Files.move(Files.java:1430)
> 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:\LocationGuru\Servers\Kafka-3.3\tmp\kraft-combined-logs_cluster_metadata-0\quorum-state.tmp -> D:\LocationGuru\Servers\Kafka-3.3\tmp\kraft-combined-logs_cluster_metadata-0\quorum-state: The process cannot access the file because it is being used by another process
> 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:317)
> at java.base/sun.nio.fs.WindowsFileSystemProvider.move(WindowsFileSystemProvider.java:293)
> at java.base/java.nio.file.Files.move(Files.java:1430)
> at org.apache.kafka.common.utils.Utils.atomicMoveWithFallback(Utils.java:932)
> ... 12 more{code}
>
> *Environment*
> Windows 10 (64 bit)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)