kafka-topics --zookeeper bigdata-01 --create --if-not-exists --topic d

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
kafka-topics --zookeeper bigdata-01 --create --if-not-exists --topic data.mobile.nsk.t2m.call --replication-factor 2 --partitions 3
[2019-09-17 11:18:52,404] ERROR Unable to connect to server: bigdata-01:2181 (org.apache.zookeeper.client.StaticHostProvider)
java.net.UnknownHostException: bigdata-01: Name or service not known
at java.net.Inet4AddressImpl.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:62)
at org.apache.zookeeper.ZooKeeper.<init>(ZooKeeper.java:450)
at org.apache.zookeeper.ZooKeeper.<init>(ZooKeeper.java:384)
at kafka.zookeeper.ZooKeeperClient.<init>(ZooKeeperClient.scala:86)
at kafka.zk.KafkaZkClient$.apply(KafkaZkClient.scala:1587)
at kafka.admin.TopicCommand$.main(TopicCommand.scala:57)
at kafka.admin.TopicCommand.main(TopicCommand.scala)
Exception in thread "main" java.lang.IllegalArgumentException: A HostProvider may not be empty!
at org.apache.zookeeper.client.StaticHostProvider.<init>(StaticHostProvider.java:74)
at org.apache.zookeeper.ZooKeeper.<init>(ZooKeeper.java:450)
at org.apache.zookeeper.ZooKeeper.<init>(ZooKeeper.java:384)
at kafka.zookeeper.ZooKeeperClient.<init>(ZooKeeperClient.scala:86)
at kafka.zk.KafkaZkClient$.apply(KafkaZkClient.scala:1587)
at kafka.admin.TopicCommand$.main(TopicCommand.scala:57)
at kafka.admin.TopicCommand.main(TopicCommand.scala)