Hi Kafka Dev Team,
We are encountering critical issues while running Apache Kafka in our 
application and would appreciate your assistance.

Application Context:
   
   -    
We are using a Spring Boot Java application that depends on Apache Kafka.

   -    
The application and Kafka brokers are running on a Windows system.

   -    
We have tested with:
      
      -       
Kafka 2.8.0 (Zookeeper mode)

      -       
Kafka 3.3.0 (KRaft mode – Zookeeper-less)



Observed Issues:

Error 1: During Log Cleanup in Consumer Offsets

Kafka attempts to perform log cleanup when the log file size reaches 100 MB, 
but encounters a file lock error:
java.nio.file.FileSystemException: 
C:\tmp\kraft-combined-logs-1__consumer_offsets-21\00000000000000000000.timeindex.cleaned
 -> 
C:\tmp\kraft-combined-logs-1__consumer_offsets-21\00000000000000000000.timeindex.swap:
 The process cannot access the file because it is being used by another process
This results in the broker shutting down gracefully but unexpectedly.


Error 2: During Topic Log Retention Deletion
When a topic log file reaches the retention threshold, a similar error occurs:
java.nio.file.FileSystemException: 
C:\tmp\kraft-combined-logs-1\Persistance-1-0\00000000000000000000.index -> 
C:\tmp\kraft-combined-logs-1\Persistance-1-0\00000000000000000000.index.deleted:
 The process cannot access the file because it is being used by another process
This again causes the broker to shut down.

server.properties Configuration Snapshot:

process.roles=broker,controllernode.id=1controller.quorum.voters=1@localhost:9093listeners=PLAINTEXT://localhost:9092,CONTROLLER://localhost:9093inter.broker.listener.name=PLAINTEXTadvertised.listeners=PLAINTEXT://localhost:9092controller.listener.names=CONTROLLERlistener.security.protocol.map=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXTlog.dirs=/tmp/kraft-combined-logs-1num.partitions=1offsets.topic.replication.factor=1transaction.state.log.replication.factor=1transaction.state.log.min.isr=1log.retention.hours=168log.segment.bytes=1073741824log.retention.check.interval.ms=300000

Request:

We would like to understand:
   
   -    
Is this an issue related to Kafka configuration on Windows?

   -    
Is this expected behavior due to Windows file locking mechanisms?

   -    
Are there any recommended workarounds or configurations for stable Kafka 
operation on Windows environments?


This issue is blocking our production deployment. Your guidance or any leads 
would be greatly appreciated.
Thanks & Regards,
Rakesh Muniganti

Reply via email to