Manolo Viso Romero
Manolo Viso Romero

Reputation: 161

How can I solve this no such file log error in Kafka quickstart?

I'm following (at least trying to) this Kafka quickstart doc Kafka quickstart

Upon executing the Kafka and Zookeeper server starts, they both result in this error:

[0.003s][error][logging] Error opening log file '/c/Users/Manol/Downloads/kafka_2.13-2.7.0/kafka_2.13-2.7.0/bin/../logs/kafkaServer-gc.log': No such file or directory

[0.003s][error][logging] Error opening log file '/c/Users/Manol/downloads/kafka_2.13-2.7.0/kafka_2.13-2.7.0/bin/../logs/zookeeper-gc.log': No such file or directory

I've even tried manually creating these files to confirm they are actually there:

enter image description here

But it made no difference. I have not a single clue of what could cause this error and I'm also not familiar with .sh files so I can't see if there's any problems in those. Does anyone know what could be the problem and maybe even how to fix it? I couldn't find anyone else experiencing this particular issue.

Upvotes: 8

Views: 7691

Answers (4)

For me I got this issue resolved by changing the JAVA_HOME to "C:/Program Files/Java/jdk1.8.0_341/bin/java", means explicitly set the JAVA_HOME. The version should be JDK1.8. I tried with version JDK18.0.2, which is not working. Hope it helps for the starters. Cheers!!!

Upvotes: 0

Muhammad Usman
Muhammad Usman

Reputation: 913

Kafka quickstart is intended to use .sh scripts, for windows use .bat scripts.

Here is how I fixed the issue, run following command.

$ bin/windows/zookeeper-server-start.bat config/zookeeper.properties

Upvotes: 9

Ikbal Rasimov
Ikbal Rasimov

Reputation: 55

Changing the Java version to 8 solved the problem for me.

Upvotes: 1

Attila
Attila

Reputation: 3406

You may get this error, when you try to start Zookeper or Kafka in git-shell or cygwin.

A potential solution is to start Zookeeper and Kafka in Windows Subsystem for Linux.

After adding WSL support in Windows, you could install a Linux distribution like Ubuntu.

Zookeper and Kafka started like a charm on Ubuntu running in WSL:

enter image description here

Upvotes: 7

Related Questions