0

I keep getting this error when running Kafka on Windows 10:

ERROR Error while writing to checkpoint file c:\kafka\config\kafka-logs\log-start-offset-checkpoint (kafka.server.LogDirFailureChannel)
java.nio.file.AccessDeniedException: c:\kafka\config\kafka-logs

My server.properties file I modified the logs.dir to:

log.dirs=c:/kafka/config/kafka-logs

Not sure what to do, tried changing the log.dirs but still same error.

My kafka install folder is c:\kafka and I have full permissions to the folder.

Is this an issue with Zookeeper?

Any advice is much appreciated.

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
  • Simply dont use CMD. https://www.confluent.io/blog/set-up-and-run-kafka-on-windows-linux-wsl-2/ – OneCricketeer Sep 27 '21 at 18:36
  • I had seen that link earlier today, but Kafka is cross platform and thus runs on Windows as shown in many examples over the net - just that I cannot get it to work... – Steven Green Sep 27 '21 at 19:41
  • Earlier versions may run to begin with and long enough to show on a short article, but it'll eventually crash, actually. It really just doesn't run on Windows, due to filesytem semantics available on Unix systems and you can search the Kafka JIRA for lots of related issues. Use a Unix environment instead – OneCricketeer Sep 27 '21 at 19:59
  • Thanks again, yeah, got it running via WSL2. So, my next question would be with kafka running in WSL2, how do I connect to it via a Spring Boot app which would be running on my windows machine (localhost:8080) - so I can just publish messages from the Spring boot app to Kafka (using KafkaTemplate) - is this possible or would the spring boot app need to be running inside WSL2 which I'm presuming - unfortunately though I've not got intelliJ in WSL2, guess would need to install some graphics display/xwindows for it? – Steven Green Sep 27 '21 at 21:03
  • You can either port-forward the hypervisor to the windows host or simply use Docker. Otherwise, install Java in WSL2, and run your app as a JAR – OneCricketeer Sep 27 '21 at 22:43

0 Answers0