Confluent REST Proxy - A HostProvider may not be empty

1.1k views Asked by At

I'm using Confluent Platform v5.5.0

I have Zookeeper, Kafka, Registry Schema, and REST Proxy all running after following the Confluent Quickstart steps: https://docs.confluent.io/current/kafka-rest/quickstart.html

I've made no changes to any configuration, only downloaded Confluent 5.5.0 and started each of the 4 processes in separate Terminal windows.

But, when I try to create a Consumer by POSTing the sample, the error shows a couple times in the REST Proxy Terminal window:

[2020-06-07 10:26:38,403] INFO Terminate ZkClient event thread. (org.I0Itec.zkclient.ZkEventThread:83)
[2020-06-07 10:26:38,440] ERROR Unhandled exception (io.confluent.rest.exceptions.KafkaExceptionMapper:123)
java.lang.IllegalArgumentException: A HostProvider may not be empty!
    at org.apache.zookeeper.client.StaticHostProvider.init(StaticHostProvider.java:136)
    at org.apache.zookeeper.client.StaticHostProvider.<init>(StaticHostProvider.java:87)
    at org.apache.zookeeper.ZooKeeper.createDefaultHostProvider(ZooKeeper.java:1312)
    at org.apache.zookeeper.ZooKeeper.<init>(ZooKeeper.java:951)
    at org.apache.zookeeper.ZooKeeper.<init>(ZooKeeper.java:688)
    at org.I0Itec.zkclient.ZkConnection.connect(ZkConnection.java:70)
    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 io.confluent.kafka.utils.ZkUtils$.createZkClientAndConnection(ZkUtils.scala:95)

I'm able to send GET requests to these endpoints

http://192.168.1.164:8082/topics/jsontest
http://192.168.1.164:8081/config

and receive the topic list and configuration, respectively. So I think the REST Proxy is mostly working, but I'm missing something in a property file.

I found this line in /etc/kafka-rest/kafka-rest.properties

#zookeeper.connect=localhost:2181

but uncommenting it only gave the error:

[2020-06-07 12:33:11,546] ERROR Server died unexpectedly:  (io.confluent.kafka.schemaregistry.rest.SchemaRegistryMain:50)
java.io.IOException: Failed to bind to /0.0.0.0:8081
    at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:346)
    at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:307)
    at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
    at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:231)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
    at org.eclipse.jetty.server.Server.doStart(Server.java:385)
    at io.confluent.rest.ApplicationServer.doStart(ApplicationServer.java:192)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
    at io.confluent.kafka.schemaregistry.rest.SchemaRegistryMain.main(SchemaRegistryMain.java:43)
Caused by: java.net.BindException: Address already in use

Does anything stand out as something I've missed or done incorrectly? Thank you for any ideas!

0

There are 0 answers