ERROR Unexpected exception exiting abnormally org apache zookeeper server ZooKeeperServerMain java net BindException Address already in use

+1 vote

Hi everyone,

I am getting this error when try to start kafka server.

[2020-02-05 13:29:34,028] INFO Server environment:user.dir=/root/Desktop/kafka (org.apache.zookeeper.server.ZooKeeperServer)
[2020-02-05 13:29:34,073] INFO tickTime set to 3000 (org.apache.zookeeper.server.ZooKeeperServer)
[2020-02-05 13:29:34,074] INFO minSessionTimeout set to -1 (org.apache.zookeeper.server.ZooKeeperServer)
[2020-02-05 13:29:34,074] INFO maxSessionTimeout set to -1 (org.apache.zookeeper.server.ZooKeeperServer)
[2020-02-05 13:29:34,429] INFO binding to port 0.0.0.0/0.0.0.0:2181 (org.apache.zookeeper.server.NIOServerCnxnFactory)
[2020-02-05 13:29:34,438] ERROR Unexpected exception, exiting abnormally (org.apache.zookeeper.server.ZooKeeperServerMain)
java.net.BindException: Address already in use
    at sun.nio.ch.Net.bind0(Native Method)
    at sun.nio.ch.Net.bind(Net.java:433)
    at sun.nio.ch.Net.bind(Net.java:425)
    at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
    at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
    at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:67)
    at org.apache.zookeeper.server.NIOServerCnxnFactory.configure(NIOServerCnxnFactory.java:95)
    at org.apache.zookeeper.server.ZooKeeperServerMain.runFromConfig(ZooKeeperServerMain.java:111)
    at org.apache.zookeeper.server.ZooKeeperServerMain.initializeAndRun(ZooKeeperServerMain.java:86)
    at org.apache.zookeeper.server.ZooKeeperServerMain.main(ZooKeeperServerMain.java:52)
    at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:116)
    at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:78)

Can anyone help me to solve this?

Thank You

Feb 5, 2020 in Apache Kafka by akhtar
• 38,230 points
11,420 views

1 answer to this question.

0 votes

Hi@akhtar,

Here the zookeeper service is already started in your  node. So you can stop and the zookeeper service again.

$ ./bin/zookeeper-server-start.sh config/zookeeper.properties

$ kill -9 ID

$ ./bin/zookeeper-server.stop.sh config/zookeeper.properties

Thank You

answered Feb 5, 2020 by MD
• 95,440 points

Related Questions In Apache Kafka

0 votes
1 answer
0 votes
1 answer
+2 votes
2 answers

Getting error in schema-registry start command

It is working for me with below ...READ MORE

answered Sep 30, 2019 in Apache Kafka by Brajkishore
• 220 points
4,404 views
+1 vote
2 answers
0 votes
1 answer
+1 vote
1 answer

What is the importance of Kafka bootstrap.servers?

Hi@akhtar, Bootstrap.servers is a mandatory field in Kafka ...READ MORE

answered Feb 11, 2020 in Apache Kafka by MD
• 95,440 points
17,153 views
+1 vote
3 answers

What is the need of zookeeper in kafka? Can I use kafka without zookeeper?

I just would like to complete the ...READ MORE

answered Dec 4, 2020 in Apache Kafka by Tamás
• 140 points
8,209 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP