windowsapache-kafka

Running Kafka on Windows 10 fails: The system cannot find the path specified


I'm trying to run Kafka locally. I've got Zookeeper installed and running. I've downloaded the binaries for Kafka 2.11-1.1.0. I've adjusted the location of the logs in server.config, to a valid path. When I run .\bin\windows\kafka-server-start.bat .\config\server.properties, I get an error that says

The system cannot find the path specified.

I can see that both those files exist on my computer in the proper locations-what should I be troubleshooting? kafka-server-start: check server.config: check


Solution

  • I faced this issue while running the kafka-server-start.bat command. I double checked to ensure that there was no spaces in the kafka binaries path as well as correct syntax in JAVA_HOME.

    Finally realized that the issue was due to a space in the JAVA_HOME path.

    C:\Program Files\Java\jdk1.8.0_144

    There is a space between Program and Files. I changed the directory of Java and updated the JAVA_HOME variable to

    C:\Java\jdk1.7.0_51

    This change solved my issue. I used the setx command to change the value in JAVA_HOME.

    setx -m JAVA_HOME "C:\Java\jdk1.7.0_51"