Created 10-20-2017 05:50 AM
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?
Created 10-20-2017 06:01 AM
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.
.
Created 10-20-2017 06:01 AM
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.
.
Created 10-20-2017 08:05 AM
thank you so much