Windows 上的 Apache Kafka 错误 - 无法找到或加载主类 QuorumPeerMain [英] Apache Kafka error on windows - Couldnot find or load main class QuorumPeerMain

查看:40
本文介绍了Windows 上的 Apache Kafka 错误 - 无法找到或加载主类 QuorumPeerMain的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚从 Apache 网站下载了 Kafka 2.8.0,我正在尝试使用网站上给出的说明进行设置.但是当我尝试启动 zookper 服务器时,出现以下错误:

I just downloaded Kafka 2.8.0 from Apache website, and I am trying to setup using the instructions given on the website. But when I try to start zookeper server, I am getting below error:

错误:无法找到或加载主类 org.apache.zookeeper.server.quorum.QuorumPeerMain

Error: Could not find or load main class org.apache.zookeeper.server.quorum.QuorumPeerMain

我的环境是 Windows 7 64 位.我尝试遵循以下电子邮件链:Apache 电子邮件链.但它仍然有同样的问题.任何人都可以指导我吗?因为我对此很陌生,无法在 Google/Apache Kafka 电子邮件链上找到很多信息.

My environment is Windows 7 64 bit. I tried to follow below e-mail chain: Apache Email Chain . But still it's having same issue. Can anyone guide me in this? As I am very new to this and couldn't find many information on Google/Apache Kafka email chain.

推荐答案

从 Kafka 根文件夹运行这些命令:

Run these commands from your Kafka root folder:

cd bin\windows

然后运行 ​​Zookeper 服务器:

Then run Zookeper server:

zookeeper-server-start.bat ..\..\config\zookeeper.properties

然后运行Kafka服务器:

Then run Kafka server:

kafka-server-start.bat ..\..\config\server.properties

这里的问题是运行 /bin/windows 文件夹中的 .bat 文件,因此在您按照上述步骤运行服务器并想要跟进之后使用本教程,请确保您正在运行正确的批处理文件来创建主题等,例如:

The gotcha here is to run the .bat files from the /bin/windows folder, so after you run your servers with the steps above and want to follow up with the tutorial, make sure you are running the correct batch files to create topics and whatnot, e.g.:

创建主题:

kafka-topics.bat --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic test

列出主题:

kafka-topics.bat --list --zookeeper localhost:2181

这篇关于Windows 上的 Apache Kafka 错误 - 无法找到或加载主类 QuorumPeerMain的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆