kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "M. Manna" <manme...@gmail.com>
Subject console consumer doesn't recognise localhost:2181 but only
Date Fri, 07 Jul 2017 08:59:47 GMT

As part of my PoC I wanted to check if we have two Windows 10 boxes where

1) One box will have the ZK
2) Other box will have Kafka

The idea was to physically separate zookeeper and Kafka to isolate issues.
For trial, I set it up on my Windows 10 machine where I used the
Documentation to create 3 ZK and 3 Kafka cluster setup. For this, I
downloaded zookeeper-3.4.10 separately, and started them (in order) and
independent of Kafka Servers. So I am* not *using zookeeper-server-start.

When I ran the topics utility

C:/kafka/bin/windows/kafka-topics --create --topic "test1" --partitions 3
--replication-factor 3 --zookeeper

It spits out error since it cannot find localhost:

C:\kafka_2.10-\bin\windows>kafka-topics.bat --create --topic test1
> --zookeeper localhsot:2181,localhost:2182,localhost:2183 --partitions 3
> --replication-factor 3
> Exception in thread "main" org.I0Itec.zkclient.exception.ZkException:
> Unable to connect to localhsot:2181,localhost:2182,localhost:2183
>         at org.I0Itec.zkclient.ZkConnection.connect(ZkConnection.java:72)
>         at org.I0Itec.zkclient.ZkClient.connect(ZkClient.java:1228)
>         at org.I0Itec.zkclient.ZkClient.<init>(ZkClient.java:157)
>         at org.I0Itec.zkclient.ZkClient.<init>(ZkClient.java:131)
>         at
> kafka.utils.ZkUtils$.createZkClientAndConnection(ZkUtils.scala:106)
>         at kafka.utils.ZkUtils$.apply(ZkUtils.scala:88)
>         at kafka.admin.TopicCommand$.main(TopicCommand.scala:53)
>         at kafka.admin.TopicCommand.main(TopicCommand.scala)
> Caused by: java.net.UnknownHostException: localhsot
>         at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
>         at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928)
>         at
> java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323)
>         at java.net.InetAddress.getAllByName0(InetAddress.java:1276)
>         at java.net.InetAddress.getAllByName(InetAddress.java:1192)
>         at java.net.InetAddress.getAllByName(InetAddress.java:1126)
>         at
> org.apache.zookeeper.client.StaticHostProvider.<init>(StaticHostProvider.java:61)
>         at org.apache.zookeeper.ZooKeeper.<init>(ZooKeeper.java:445)
>         at org.apache.zookeeper.ZooKeeper.<init>(ZooKeeper.java:380)
>         at org.I0Itec.zkclient.ZkConnection.connect(ZkConnection.java:70)
>         ... 7 more

but when I replace them with it works! I know that I have to keep
correct values for advertised.listeners or listeners property to make this
work correctly (and i have). But since it's ignoring "localhost" name when
zookeeper is started I am thinking that for some reason it couldn't bind to localhost.

Has anyone experienced this with fully segregated ZK and Kafka setup? or is
it just Windows issue?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message