Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
1.
LOG.error("Exception while listening", e);
At least, the log should print the address to help me find what port has conflicted in my host
2. The stack trace is following:
2020-04-17 18:49:24,757 [myid:1] - INFO [main:ZKAuditProvider@42] - ZooKeeper audit is disabled. 2020-04-17 18:49:24,758 [myid:1] - ERROR [ListenerHandler-/127.0.0.1:3888:QuorumCnxManager$Listener$ListenerHandler@1093] - Exception while listening java.net.BindException: Address already in use (Bind failed) at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:387) at java.net.ServerSocket.bind(ServerSocket.java:375) at java.net.ServerSocket.bind(ServerSocket.java:329) at org.apache.zookeeper.server.quorum.QuorumCnxManager$Listener$ListenerHandler.createNewServerSocket(QuorumCnxManager.java:1134) at org.apache.zookeeper.server.quorum.QuorumCnxManager$Listener$ListenerHandler.acceptConnections(QuorumCnxManager.java:1064) at org.apache.zookeeper.server.quorum.QuorumCnxManager$Listener$ListenerHandler.run(QuorumCnxManager.java:1033) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) 2020-04-17 18:49:24,764 [myid:1] - INFO [QuorumPeer[myid=1](plain=[0:0:0:0:0:0:0:0]:2183)(secure=disabled):QuorumPeer@1371] - LOOKING 2020-04-17 18:49:24,765 [myid:1] - INFO [QuorumPeer[myid=1](plain=[0:0:0:0:0:0:0:0]:2183)(secure=disabled):FastLeaderElection@944] - New election. My id = 1, proposed zxid=0xfab000000002