Kafka在使用Docker时无法在9092端口启动。

huangapple go评论78阅读模式
英文:

Kafka does not start on port 9092 using docker

问题

我按照这个链接 使用Docker启动Kafka。在我的操作系统中,Docker和Docker Compose已经预装。

我克隆了该网站上提到的存储库并导航到该目录。然后,我在该目录中打开了终端并执行了以下命令:sudo docker-compose -f zk-single-kafka-single.yml up -d,没有任何错误。然后,为了验证容器是否正在运行,我输入了sudo docker ps;终端上显示的输出如下所示。
Kafka在使用Docker时无法在9092端口启动。

但是当我在浏览器中输入localhost:9092时,没有加载任何页面。但在我的终端上,显示Kafka正在运行。

那么问题可能出在哪里?

英文:

I followed this link to start Kafka using docker. In my OS, docker and docker-compose were preinstalled.

I cloned the repo mentioned on that website and navigated to that directory. Then, I opened the terminal in that directory and executed this command: sudo docker-compose -f zk-single-kafka-single.yml up -d without any error. Then, to verify whether the containers are running, I entered sudo docker ps; the output I got on the terminal is shown in the image below.
Kafka在使用Docker时无法在9092端口启动。

But when I hit localhost:9092 on my browser, no pages load. But on my terminal, it is showing that Kafka is running.

So what might be the issue here?

答案1

得分: 1

  • Kafka 不会显示任何页面,因为 Kafka 使用二进制协议进行通信,而不是基于 Web 的界面。Port:9092 用于 Kafka 客户端和 Kafka 代理之间的通信。

  • 要与 Kafka 交互,您必须使用 Kafka 客户端库或命令行工具。

英文:
  • It won't display any pages because Kafka uses a binary protocol for communication rather than a web-based interface. Port:9092 is used for communication between Kafka clients and Kafka broker.

  • To interact with Kafka, you have to use Kafka client library or command-line tools.

huangapple
  • 本文由 发表于 2023年5月25日 05:36:28
  • 转载请务必保留本文链接:https://go.coder-hub.com/76327560.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定