[英]Kafka failed to start when running Confluent start command on Docker Ubuntu image (Name or service not known)
I am trying to start Confluent on a running docker image for ubuntu. 我正在尝试在运行的ubuntu码头工人映像上启动Confluent。 Here is the error for the command:
这是命令的错误:
root@linuxkit-025000000001:/# /my/dir/path/confluent-4.0.0/bin/confluent start
Here is the output log: 这是输出日志:
Starting zookeeper
启动动物园管理员
zookeeper is [UP]
动物园管理员是[UP]
Starting kafka
开始卡夫卡
|Kafka failed to start
| Kafka无法启动
kafka is [DOWN]
kafka是[DOWN]
Cannot start Schema Registry, Kafka Server is not running.
无法启动Schema Registry,Kafka服务器未运行。 Check your deployment
检查您的部署
I tried to start Kafka using : 我试图使用启动Kafka:
# cd confluent-4.0.0
# ./bin/kafka-server-start ./etc/kafka/server.properties
Here is the IMPORTANT error log: 这是重要的错误日志:
Fatal error during KafkaServer startup.
KafkaServer启动期间发生致命错误。 Prepare to shutdown (kafka.server.KafkaServer) java.net.UnknownHostException: linuxkit-025000000001: linuxkit-025000000001: Name or service not known
准备关闭(kafka.server.KafkaServer)java.net.UnknownHostException:linuxkit-025000000001:linuxkit-025000000001:名称或服务未知
What is the solution to run Kafka? 运行Kafka的解决方案是什么?
Here is a hint to solution : https://github.com/ModernMT/MMT/issues/276 这是解决方案的提示: https : //github.com/ModernMT/MMT/issues/276
I should add the hostname to the hosts. 我应该将主机名添加到主机。 For my own solution I add a new line for 127.0.0.1 to be linuxkit-025000000001 as it is available from hostname command:
对于我自己的解决方案,我为127.0.0.1添加了新行,即linuxkit-025000000001,因为它可以从hostname命令获得:
# hostname
then I tried to edit /etc/hosts 然后我试图编辑/ etc / hosts
# (printf "127.0.0.1 " ; hostname ) >> /etc/hosts
now Confluent can start successfuly! 现在Confluent可以成功启动!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.