I am trying to setup a Kafka cluster (the first node in the cluster actually).
I have a single node zookeeper cluster setup. I am setting up kafka on a separate node.
Both running CentOS 6.4, running IPV6 which is a bit of a PITA. I verified that the machines can talk to each other using netcat.
When I startup kafka, I am getting the following exception (which causes kafka to shut down).
EDIT: I got kafka starting, I had to set the host.name
property in the server.config file.
I was able to create a test topic and send messages just fine from the kafka server.
However, I get the same error when trying to consume the messages.
Any help, suggestions?
bin/kafka-console-consumer.sh --zookeeper zk1:2181 --topic test --from-beginning
Exception in thread "main" java.net.UnknownHostException: kafka: kafka: Name or service not known
at java.net.InetAddress.getLocalHost(InetAddress.java:1473)
at kafka.consumer.ZookeeperConsumerConnector.<init>(ZookeeperConsumerConnector.scala:107)
at kafka.consumer.ZookeeperConsumerConnector.<init>(ZookeeperConsumerConnector.scala:128)
at kafka.consumer.Consumer$.create(ConsumerConnector.scala:89)
at kafka.consumer.ConsoleConsumer$.main(ConsoleConsumer.scala:178)
at kafka.consumer.ConsoleConsumer.main(ConsoleConsumer.scala)
Caused by: java.net.UnknownHostException: kafka: Name or service not known
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:901)
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1293)
at java.net.InetAddress.getLocalHost(InetAddress.java:1469)
... 5 more
config/server.properties
does have thehost.name
property set properly .. what is your/etc/hosts
file shows? – Nigercongoorg.I0Itec.zkclient.exception.ZkException: Unable to connect to zk1:2181
&Caused by: java.net.UnknownHostException: zk1
– Nigercongo