user9467051
user9467051

Reputation: 128

Can't start zookeeper server

i tried to start zookeeper with:

/opt/Kafka/kafka_2.10-0.10.0.1/bin/zookeeper-server-start.sh  
/opt/Kafka/kafka_2.10-0.10.0.1/config/zookeeper.properties   

but I got

ERROR Unexpected exception, exiting abnormally (org.apache.zookeeper.server.ZooKeeperServerMain) java.net.BindException: Address already in use

I restarted the computer and I got the same problem
I tried netstat -nlp|grep 2181 the result:

tcp6       0      0 :::2181                 :::*                    LISTEN   

kill -9 2181 --> bash: kill: (2181) - No such process

./zookeeper-server-stop.sh  # no result so it works but 
./zookeeper-server-start.sh /opt/Kafka/kafka_2.10-0.10.0.1/config/zookeeper.properties # the same exception 

what can I do?

Note: when starting kafka server there is no exception

Upvotes: 1

Views: 3079

Answers (1)

OneCricketeer
OneCricketeer

Reputation: 191711

kill -9 2181 --> bash: kill: (2181) - No such process

You're trying to kill a port number, not a process ID.

Address already in use

Okay, so you clearly already have something on that port.

Options:

  1. Edit the zookeeper.properties to bind to a different port. Also edit kafka properties to use the new Zookeeper connection.
  2. You already have a running Zookeeper, which would explain why Kafka would work when starting.

P.S. I would recommend using a later version of Kafka anyway. Lots of good upgrades.

Upvotes: 1

Related Questions