Hello Kafka Community, We are investigating a recurring Kafka broker startup failure on Windows Server and would appreciate guidance from the Kafka maintainers and community. Environment
* Apache Kafka: 4.0.1 * Operating system: Windows Server * Java: Eclipse Temurin JDK 17.0.18 * Metadata mode: KRaft, single-node combined broker/controller * Service management: NSSM * Kafka storage directory: D:\KafkaStorage * Configuration: D:\Kafka\config\kraft\server.properties Problem description Kafka repeatedly fails during startup while recovering KRaft metadata snapshots. The service manager reports the Windows service as Running or restarts the Java process, but Kafka does not successfully start its listeners. Ports 9092 and 9093 remain unavailable. The recurring exception is: java.nio.file.AccessDeniedException: D:\KafkaStorage\__cluster_metadata-0\00000000000004062214-0000001671.checkpoint.deleted The stack trace indicates that the exception occurs during file deletion in: kafka.raft.KafkaMetadataLog$.recoverSnapshots(KafkaMetadataLog.scala:691) The failure is followed by a fatal process termination. Investigations performed 1. Confirmed that Kafka is no longer running after the Windows service is stopped. 2. Checked the affected file's NTFS permissions. The SYSTEM account has Full Control. 3. Checked the file with Sysinternals Handle while Kafka was stopped; no matching open handles were found. 4. Verified that the D: volume is NTFS, reports Healthy/Operational OK, and is not marked dirty. 5. Found approximately 165 checkpoint files marked with the Windows ReadOnly attribute. 6. Clearing the ReadOnly attribute on one previously failing checkpoint file did not resolve startup; Kafka subsequently failed on another .checkpoint.deleted file. 7. Confirmed that the issue recurs and that restarting the Windows service alone does not resolve it. Questions for the Kafka team 1. Is this a known issue in Kafka 4.0.1 on Windows when recovering KRaft metadata snapshots? 2. Does KafkaMetadataLog.recoverSnapshots() have any known Windows-specific file deletion or rename limitations? 3. Is the presence of numerous ReadOnly .checkpoint and .checkpoint.deleted files consistent with a Kafka defect, or should we investigate a specific Windows filesystem, security or file-attribute interaction? 4. Are there known fixes in later Kafka releases that address this failure path? 5. What additional diagnostics or a minimal reproduction would help determine whether the root cause is in Kafka, the JDK/Windows filesystem interaction, or our environment? We want to identify the root cause and implement a permanent fix rather than rely on manual attribute changes or repeated service restarts. We can provide the relevant configuration (with sensitive information redacted), complete startup logs, file attributes, ACL output, and additional diagnostics as needed. Thank you for your guidance. Regards, Autonautics Engineering Team
