In windows 10 0r 11, Kafka installation I am facing the below error. When I Run the below command.
.\bin\windows\kafka-server-start.bat .\config\server.properties
java.nio.file.AccessDeniedException on kafka on Windows on the folder/ file : D:\tmp\kraft-combined-logs__cluster_metadata-0\
or
ERROR Exiting Kafka due to fatal exception (kafka.Kafka$) java.lang.RuntimeException: No readable meta.properties files found. at org.apache.kafka.metadata.properties.MetaPropertiesEnsemble.verify(MetaPropertiesEnsemble.java:480) ~[kafka-metadata-4.0.0.jar:?]
In windows 10 0r 11, if you are facing the above error.
I was trying to start the kafka server, and got an error message as below
It happened for me when I put the laptop to sleep for a few days and Kafka Producer crashed ( did not shutdown gracefully)
Delete the Log folder, In my case Kafka was run from d:drive, so my log folder was in D:\tmp\kraft-combined-logs, dont do this in production if your consumer hasnt read all messages.
Run the below command to recreate the logs folder
.\bin\windows\kafka-storage.bat format --standalone -t kafkastore -c .\config\server.properties
3. You should see something like this :
It does say complain about some error , but it creates the storage dir as needed.
4. Run the below command to get the server up and running
.\bin\windows\kafka-server-start.bat .\config\server.properties
5. You will see something like this below
Kafka server cluster is up and running now