I cannot start zookeeper
I am new to kafka world, I want to start zookeeper then when I type this
bin/zookeeper-server-start.sh config/zookeeper.properties
I got the following error:
ERROR Unexpected exception, exiting abnormally (org.apache.zookeeper.server.ZooKeeperServerMain)
java.net.BindException: Address already in use
ERROR Unexpected exception, exiting abnormally (org.apache.zookeeper.server.ZooKeeperServerMain)
java.net.BindException: Address already in use
Then I tried netstat -nlp|grep 2181
it but the process doesn't work
tcp 0 0 0.0.0.0:2181 0.0.0.0:* LISTEN -
Some light please
Sounds like a zookeeper server.
try:
bin/zkServer.sh stop
from the zookeeper directory to close it and then:
bin/zookeeper-server-start.sh config/zookeeper.properties
from catalog kafka
This fixed my problem
There must be some process using port 2181. I had the same problem. First I checked the server state:
/usr/share/zookeeper$ bin/zkServer.sh status
or
/usr/share/zookeeper$ echo status | nc 127.0.0.1 2181
Then I tried to start kafka and it failed with the same error. I changed the resolution and it worked like sudo .. it didn't work either. As I have not seen any process using the port. I restarted my computer and it works!
Maybe another user starts this process. check using jps if any process running Quorum kills it then try
Check if it is executed zookeeper
or not using this command.
bin/kafka-topics.sh --list --zookeeper localhost:2181
Check to see if you have the number of topics if you are getting anything that means Zookeeper is already running. So, check if Zookeeper is running or not.