Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

cant start zookeeper from ambari cluster

avatar

we have ambari cluster - 2.6

we restart the masters machine and start the services

when we start the zookeeper on master01 machine we get this from the log

2017-10-20 05:43:53,339 - INFO [main:NIOServerCnxnFactory@94] - binding to port 0.0.0.0/0.0.0.0:2181 2017-10-20 05:43:53,342 - ERROR [main:QuorumPeerMain@89] - Unexpected exception, exiting abnormally java.net.BindException: Address already in use at sun.nio.ch.Net.bind0(Native Method)

so zookeeper cant start on master01 and master02 machine

what chould be the problem here?

Michael-Bronson
1 ACCEPTED SOLUTION

avatar
Master Mentor

@uri ben-ari

As we see that the error says:

 Unexpected exception, exiting abnormally java.net.BindException: Address already in use 

Means there is a Port conflict. So please first check if port 2181 is being used by any other process ? If yes then first kill the other process and then try starting the zookeeper.

Example:

Finding process that is using port 2181

# netstat -tnlpa | grep 2181



Once we know if other process is using that port then kill it:

# kill -9  $OtherProcess


Now try restarting the Zookeeper.

.

View solution in original post

2 REPLIES 2

avatar
Master Mentor

@uri ben-ari

As we see that the error says:

 Unexpected exception, exiting abnormally java.net.BindException: Address already in use 

Means there is a Port conflict. So please first check if port 2181 is being used by any other process ? If yes then first kill the other process and then try starting the zookeeper.

Example:

Finding process that is using port 2181

# netstat -tnlpa | grep 2181



Once we know if other process is using that port then kill it:

# kill -9  $OtherProcess


Now try restarting the Zookeeper.

.

avatar

thank you so much

Michael-Bronson