fast-data-dev icon indicating copy to clipboard operation
fast-data-dev copied to clipboard

Kafka utilities are exiting with a timed out waiting message

Open SinaiNday opened this issue 5 years ago • 4 comments
trafficstars

1) Install and run lenses Box: Done

https://docs.lenses.io/dev/lenses-box/index.html#development-environment

http://localhost:3030 is running fine, I can log in and see the admin panel

2) Run the bash shell command in the terminal: Done

sudo docker run --rm -it --net=host landoop/fast-data-dev bash

3)Create a new topic with CLI : Error occurs

root@fast-data-dev / $ kafka-topics --create --zookeeper localhost:2181 --replication-factor 1 --partitions 3 --topic my-topic
Exception in thread "main" kafka.zookeeper.ZooKeeperClientTimeoutException: Timed out waiting for connection while in state: CONNECTING
	at kafka.zookeeper.ZooKeeperClient.$anonfun$waitUntilConnected$3(ZooKeeperClient.scala:242)
	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
	at kafka.utils.CoreUtils$.inLock(CoreUtils.scala:251)
	at kafka.zookeeper.ZooKeeperClient.waitUntilConnected(ZooKeeperClient.scala:238)
	at kafka.zookeeper.ZooKeeperClient.<init>(ZooKeeperClient.scala:96)
	at kafka.zk.KafkaZkClient$.apply(KafkaZkClient.scala:1825)
	at kafka.admin.TopicCommand$ZookeeperTopicService$.apply(TopicCommand.scala:262)
	at kafka.admin.TopicCommand$.main(TopicCommand.scala:53)
	at kafka.admin.TopicCommand.main(TopicCommand.scala)

None of the Kafka command utilities is working What did I miss?

SinaiNday avatar Mar 20 '20 01:03 SinaiNday

Hi SinaiNday, could you please provide the command that you use to start Lenses Box? Is the Lenses Box container also running in the host network?

ulfox avatar Mar 20 '20 03:03 ulfox

Hi SinaiNday, could you please provide the command that you use to start Lenses Box? Is the Lenses Box container also running in the host network?

docker run -e ADV_HOST=127.0.0.1 -e EULA="https://dl.lenses.io/d/?id=MY_PRIVATE_ID_SENT_BY_EMAIL" --rm -p 3030:3030 -p 9092:9092 lensesio/box

SinaiNday avatar Mar 20 '20 04:03 SinaiNday

Since the ports 3030 and 9092 are running after launching lenses box, I ran this command docker run --rm -it -p 8081:8081 -p 8082:8082 -p 8083:8083 -p 9581:9581 -p 9582:9582 -p 9583:9583 -p 9584:9584 -e ADV_HOST=127.0.0.1 landoop/fast-data-dev:latest

and then this error popped up

root@fast-data-dev / $ kafka-topics --create --zookeeper localhost:2181 --replication-factor 1 --partitions 3 --topic my-topic
Error while executing topic command : Replication factor: 1 larger than available brokers: 0.
[2020-03-20 04:13:17,925] ERROR org.apache.kafka.common.errors.InvalidReplicationFactorException: Replication factor: 1 larger than available brokers: 0.
 (kafka.admin.TopicCommand$)

I have a single broker running right now in the admin panel

SinaiNday avatar Mar 20 '20 04:03 SinaiNday

@ulfox I just solved it 1.Run this command in the terminal sudo docker run -e ADV_HOST=127.0.0.1 -e EULA="https://dl.lenses.io/d/?id=ID_GOT_FROM_EMAIL" --rm -p 3030:3030 -p 9092:9092 --name=sinai lensesio/box 2. follow by this sudo docker exec -it sinai bash 3. Try this command to see all the topics kafka-topics --zookeeper localhost:2181 --list

SinaiNday avatar Mar 20 '20 05:03 SinaiNday