Rajni Jain created KAFKA-12714: ---------------------------------- Summary: Kafka 2.8 server not starting on Windows OS Key: KAFKA-12714 URL: https://issues.apache.org/jira/browse/KAFKA-12714 Project: Kafka Issue Type: Bug Components: core Affects Versions: 2.8.0 Reporter: Rajni Jain
On Windows OS , Server is not getting started because of below error. Ubuntu , everything is working as expected. kafka-server-start.bat config\kraft\server.properties [2021-04-25 16:50:15,831] INFO Registered kafka:type=kafka.Log4jController MBean (kafka.utils.Log4jControllerRegistration$) [2021-04-25 16:50:16,151] INFO Setting -D jdk.tls.rejectClientInitiatedRenegotiation=true to disable client-initiated TLS renegotiation (org.apache.zookeeper.common.X509Util) [2021-04-25 16:50:16,254] DEBUG Initializing task scheduler. (kafka.utils.KafkaScheduler) [2021-04-25 16:50:16,320] INFO [Log partition=@metadata-0, dir=C:\tmp\kraft-combined-logs] Recovering unflushed segment 0 (kafka.log.Log) [2021-04-25 16:50:16,335] INFO [Log partition=@metadata-0, dir=C:\tmp\kraft-combined-logs] Loading producer state till offset 0 with message format version 2 (kafka.log.Log) [2021-04-25 16:50:16,335] DEBUG Loaded index file C:\tmp\kraft-combined-logs\@metadata-0\00000000000000000000.index with maxEntries = 1310720, maxIndexSize = 10485760, entries = 1310720, lastOffset = 0, file position = 10485760 (kafka.log.OffsetIndex) [2021-04-25 16:50:16,335] DEBUG Truncated index C:\tmp\kraft-combined-logs\@metadata-0\00000000000000000000.index to 0 entries; position is now 0 and last offset is now 0 (kafka.log.OffsetIndex) [2021-04-25 16:50:16,335] DEBUG Index C:\tmp\kraft-combined-logs\@metadata-0\00000000000000000000.index was not resized because it already has size 10485760 (kafka.log.AbstractIndex) [2021-04-25 16:50:16,351] DEBUG Loaded index file C:\tmp\kraft-combined-logs\@metadata-0\00000000000000000000.timeindex with maxEntries = 873813, maxIndexSize = 10485760, entries = 873813, lastOffset = TimestampOffset(0,0), file position = 10485756 (kafka.log.TimeIndex) [2021-04-25 16:50:16,351] DEBUG Truncated index C:\tmp\kraft-combined-logs\@metadata-0\00000000000000000000.timeindex to 0 entries; position is now 0 and last entry is now TimestampOffset(-1,0) (kafka.log.TimeIndex) [2021-04-25 16:50:16,351] DEBUG Index C:\tmp\kraft-combined-logs\@metadata-0\00000000000000000000.timeindex was not resized because it already has size 10485756 (kafka.log.AbstractIndex) [2021-04-25 16:50:16,351] DEBUG Resized C:\tmp\kraft-combined-logs\@metadata-0\00000000000000000000.index to 0, position is 0 and limit is 0 (kafka.log.AbstractIndex) [2021-04-25 16:50:16,351] DEBUG Resized C:\tmp\kraft-combined-logs\@metadata-0\00000000000000000000.timeindex to 0, position is 0 and limit is 0 (kafka.log.AbstractIndex) [2021-04-25 16:50:16,351] DEBUG Resized C:\tmp\kraft-combined-logs\@metadata-0\00000000000000000000.index to 10485760, position is 0 and limit is 10485760 (kafka.log.AbstractIndex) [2021-04-25 16:50:16,351] DEBUG Resized C:\tmp\kraft-combined-logs\@metadata-0\00000000000000000000.timeindex to 10485756, position is 0 and limit is 10485756 (kafka.log.AbstractIndex) [2021-04-25 16:50:16,367] INFO [Log partition=@metadata-0, dir=C:\tmp\kraft-combined-logs] Loading producer state till offset 0 with message format version 2 (kafka.log.Log) [2021-04-25 16:50:16,373] DEBUG Scheduling task PeriodicProducerExpirationCheck with initial delay 2147483647 ms and period 2147483647 ms. (kafka.utils.KafkaScheduler) [2021-04-25 16:50:16,420] INFO [raft-expiration-reaper]: Starting (kafka.raft.TimingWheelExpirationService$ExpiredOperationReaper) [2021-04-25 16:50:16,590] ERROR Exiting Kafka due to fatal exception (kafka.Kafka$) java.nio.file.FileSystemException: C:\tmp\kraft-combined-logs\@metadata-0\quorum-state.tmp -> C:\tmp\kraft-combined-logs\@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:395) at java.base/sun.nio.fs.WindowsFileSystemProvider.move(WindowsFileSystemProvider.java:288) at java.base/java.nio.file.Files.move(Files.java:1421) at org.apache.kafka.common.utils.Utils.atomicMoveWithFallback(Utils.java:904) at org.apache.kafka.raft.FileBasedStateStore.writeElectionStateToFile(FileBasedStateStore.java:148) at org.apache.kafka.raft.FileBasedStateStore.writeElectionState(FileBasedStateStore.java:124) at org.apache.kafka.raft.QuorumState.transitionTo(QuorumState.java:449) at org.apache.kafka.raft.QuorumState.initialize(QuorumState.java:202) at org.apache.kafka.raft.KafkaRaftClient.initialize(KafkaRaftClient.java:351) at kafka.raft.KafkaRaftManager.buildRaftClient(RaftManager.scala:229) at kafka.raft.KafkaRaftManager.<init>(RaftManager.scala:127) at kafka.server.KafkaRaftServer.<init>(KafkaRaftServer.scala:70) at kafka.Kafka$.buildServer(Kafka.scala:79) at kafka.Kafka$.main(Kafka.scala:87) at kafka.Kafka.main(Kafka.scala) Suppressed: java.nio.file.FileSystemException: C:\tmp\kraft-combined-logs\@metadata-0\quorum-state.tmp -> C:\tmp\kraft-combined-logs\@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:309) at java.base/sun.nio.fs.WindowsFileSystemProvider.move(WindowsFileSystemProvider.java:288) at java.base/java.nio.file.Files.move(Files.java:1421) at org.apache.kafka.common.utils.Utils.atomicMoveWithFallback(Utils.java:901) ... 11 more -- This message was sent by Atlassian Jira (v8.3.4#803005)