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
+3
source to share
4 answers
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!
+1
source to share