在Windows 10上运行Kafka失败:系统找不到指定的路径 [英] Running Kafka on Windows 10 fails: The system cannot find the path specified
问题描述
我正在尝试在本地运行Kafka.我已经安装并运行了Zookeeper.我已经下载了Kafka 2.11-1.1.0的二进制文件.我已经将 server.config
中的日志位置调整为有效路径.当我运行.\ bin \ windows \ kafka-server-start.bat.\ config \ server.properties
时,出现错误
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 logs location 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.bat命令时遇到了此问题.我仔细检查了一下,以确保kafka二进制文件路径中没有空格,以及JAVA_HOME中的语法正确.
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.
最后意识到问题是由于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
C:\Program Files\Java\jdk1.8.0_144
程序和文件之间有一个空格.我更改了Java目录,并将JAVA_HOME变量更新为
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
C:\Java\jdk1.7.0_51
此更改解决了我的问题.我使用setx命令来更改JAVA_HOME中的值.
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"
这篇关于在Windows 10上运行Kafka失败:系统找不到指定的路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!