Unable to start Zookeeper server - Kafka Setup
Asked Answered
L

5

15

I am trying to setup Kafka referring to the quick start guide on the apache kafka page and while starting the zookeeper server it gets stuck at this step...Would appreciate if someone can help guide me through on how to start the zookeeper server

[2015-05-26 15:41:39,216] INFO tickTime set to 3000 (org.apache.zookeeper.server.ZooKeeperServer)
[2015-05-26 15:41:39,216] INFO minSessionTimeout set to -1 (org.apache.zookeeper.server.ZooKeeperServer)
[2015-05-26 15:41:39,216] INFO maxSessionTimeout set to -1 (org.apache.zookeeper.server.ZooKeeperServer)
[2015-05-26 15:41:39,235] INFO binding to port 0.0.0.0/0.0.0.0:2181 (org.apache.zookeeper.server.NIOServerCnxnFactory)
Levator answered 26/5, 2015 at 22:52 Comment(2)
what script did you run? Have you written: bin/zookeeper-server-start.sh config/zookeeper.properties?Massif
Server already started. No need to run once againDemisemiquaver
P
13

The terminal getting stuck at that step actually means that the server is running. So, while you may have thought you were getting an error, it actually means that the server has started.

Popelka answered 22/6, 2015 at 23:25 Comment(0)
H
7

I'm running through the same setup. Since you've opened the port in that terminal, you can proceed with the rest of the instructions from another terminal. You'll have to open multiple terminals throughout the setup, and eventually will be entering messages in one terminal (the producer), and seeing them appear in another terminal (the consumer).

Hootenanny answered 27/10, 2015 at 22:44 Comment(0)
G
2

My logs were stuck at this line, meaning zookeper could not start properly. I could not start kafka too.

0.0.0.0 might mean something is wrong, sometimes. I renewed my DHCP lease on my mac and (system preferences -> Advanced -> TCP/IP -> Renew DHCP lease), restarted zookeeper and it started working.

Goldsworthy answered 19/7, 2016 at 22:32 Comment(0)
A
0

based on the screenshot posted, below line tells that zookeeper is running on the port 2181

[2015-05-26 15:41:39,235] INFO binding to port 0.0.0.0/0.0.0.0:2181
Aquanaut answered 15/6, 2019 at 12:17 Comment(0)
L
0

it seems like you have started the zookeeper server successfully but without running the Kafka server you are trying to run Kafka commands and because of you are getting an error of broker is not available.

in mac run the following two commands in two tabs: start-zookeeper:

zookeeper-start-server /usr/local/kafka/zookeeper.properties

start kafka server:

kafka-server-start /usr/local/etc/kafka/server.properties

open another terminal and try out the Kafka commands, commands will run without any issues

Linette answered 9/2, 2021 at 2:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.