Saeed Mohtasham
Saeed Mohtasham

Reputation: 1951

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. 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]

Starting kafka

|Kafka failed to start

kafka is [DOWN]

Cannot start Schema Registry, Kafka Server is not running. Check your deployment

I tried to start Kafka using :

# cd confluent-4.0.0
# ./bin/kafka-server-start ./etc/kafka/server.properties

Here is the IMPORTANT error log:

Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer) java.net.UnknownHostException: linuxkit-025000000001: linuxkit-025000000001: Name or service not known

What is the solution to run Kafka?

Upvotes: 1

Views: 9497

Answers (1)

Saeed Mohtasham
Saeed Mohtasham

Reputation: 1951

Here is a hint to solution : 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:

 # hostname 

then I tried to edit /etc/hosts

# (printf "127.0.0.1  " ; hostname ) >> /etc/hosts

now Confluent can start successfuly!

Upvotes: 1

Related Questions