kafka:解决 Classpath is empty 问题
程序员文章站
2022-06-07 10:21:45
...
kafka:解决 Classpath is empty 问题
key: Classpath is empty. Please build the project first e.g. by running ‘./gradlew jar -PscalaVersion=2.12.8’
环境:linux
启动kafka的时候,bin/kafka-server-start.sh config/server.properties
, 出现Classpath is empty. Please build the project first e.g. by running './gradlew jar -PscalaVersion=2.12.8'
的提示,启动失败。
*上有一个回答提到引发这个问题的原因:
- In my case it has nothing to do with the binary or source cause both of them give that same “classpath is empty please build the project first” error. Its because there is a space in the path where kafka resides.
- Please help to resolve this problem, I’m getting the same error, Classpath is empty. Please build the project first e.g. by running ‘./gradlew jar -PscalaVersion=2.11.12’ – nitinsridar Sep 9 '18 at 5:59
- This is the correct answer. When I removed the space in the Kafka folder name. It was able to start up again. Thanks for sharing the solution! – Babajide M. Moibi Oct 1 '18 at 8:06
问题原因1:kafka安装路径中有空格,解决空格等问题即可。
但是,如果路径中没有空格呢?可能是你下载的kafka有问题。检查一下载命令:
http://mirrors.tuna.tsinghua.edu.cn/apache/kafka/2.3.0/kafka-2.3.0-src.tgz`, 下载的是源码,不是binary。 重新下载
http://mirrors.tuna.tsinghua.edu.cn/apache/kafka/2.3.0/kafka_2.12-2.3.0.tgz
tar -xzvf kafka_2.12-2.3.0.tgz
mv kafka_2.12-2.3.0 kafka
bin/zookeeper-server-start.sh -daemon config/zookeeper.properties
启动成功,问题解决。
推荐阅读
-
bootstrap table实现x-editable的行单元格编辑及解决数据Empty和支持多样式问题
-
php警告Creating default object from empty value 问题的解决方法
-
解决kafka消息堆积及分区不均匀的问题
-
php警告Creating default object from empty value 问题的解决方法_PHP教程
-
spring boot加载资源路径配置和classpath问题解决
-
kafka:解决 Classpath is empty 问题
-
php警告Creating default object from empty value 问题的解决方法_php技巧
-
php警告Creating default object from empty value 问题的解决方法_PHP教程
-
bootstrap table实现x-editable的行单元格编辑及解决数据Empty和支持多样式问题
-
php警告Creating default object from empty value 问题的解决方法