[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2938?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17176941#comment-17176941
 ] 

zhangzhisheng commented on ZOOKEEPER-2938:
------------------------------------------

We use 3.4.6 and deployed in aliyun vpc ecs, we see this issue server is unable 
to join quorum.

zookeeper version: 3.4.6

jdk version:jdk1.8.0_60

There is an error for server 1, which can explains maybe the problem
{code:java}
// code placeholder
2019-02-01 12:21:36,415 [myid:1] - INFO [main:FileSnap@83] - Reading snapshot 
/alidata1/admin/data/zookeeper/version-2/snapshot.e009c148d
2019-02-01 12:21:37,695 [myid:1] - INFO 
[Thread-2:QuorumCnxManager$Listener@504] - My election bind port: 
/10.139.98.126:3888
2019-02-01 12:21:37,707 [myid:1] - INFO 
[QuorumPeer[myid=1]/0.0.0.0:2181:QuorumPeer@714] - LOOKING
2019-02-01 12:21:37,710 [myid:1] - INFO 
[QuorumPeer[myid=1]/0.0.0.0:2181:FastLeaderElection@815] - New election. My id 
= 1, proposed zxid=0xe009c7817
2019-02-01 12:21:37,716 [myid:1] - INFO 
[WorkerReceiver[myid=1]:FastLeaderElection@597] - Notification: 1 (message 
format version), 1 (n.leader), 0xe009c7817 (n.zxid), 0x1 (n.round), LOOKING 
(n.state), 1 (n.sid), 0xe (n.peerEpoch) LOOKING (my state)
2019-02-01 12:21:37,720 [myid:1] - INFO 
[WorkerSender[myid=1]:QuorumCnxManager@193] - Have smaller server identifier, 
so dropping the connection: (2, 1)
2019-02-01 12:21:37,723 [myid:1] - INFO 
[WorkerSender[myid=1]:QuorumCnxManager@193] - Have smaller server identifier, 
so dropping the connection: (3, 1)
2019-02-01 12:21:37,920 [myid:1] - INFO 
[QuorumPeer[myid=1]/0.0.0.0:2181:QuorumCnxManager@193] - Have smaller server 
identifier, so dropping the connection: (2, 1)
2019-02-01 12:21:37,922 [myid:1] - INFO 
[QuorumPeer[myid=1]/0.0.0.0:2181:QuorumCnxManager@193] - Have smaller server 
identifier, so dropping the connection: (3, 1)
2019-02-01 12:21:37,922 [myid:1] - INFO 
[QuorumPeer[myid=1]/0.0.0.0:2181:FastLeaderElection@849] - Notification time 
out: 400
2019-02-01 12:21:38,325 [myid:1] - INFO 
[QuorumPeer[myid=1]/0.0.0.0:2181:QuorumCnxManager@193] - Have smaller server 
identifier, so dropping the connection: (2, 1)
2019-02-01 12:21:38,327 [myid:1] - INFO 
[QuorumPeer[myid=1]/0.0.0.0:2181:QuorumCnxManager@193] - Have smaller server 
identifier, so dropping the connection: (3, 1)
2019-02-01 12:21:38,332 [myid:1] - INFO 
[QuorumPeer[myid=1]/0.0.0.0:2181:FastLeaderElection@849] - Notification time 
out: 800
2019-02-01 12:21:39,134 [myid:1] - INFO 
[QuorumPeer[myid=1]/0.0.0.0:2181:QuorumCnxManager@193] - Have smaller server 
identifier, so dropping the connection: (2, 1)
2019-02-01 12:21:39,136 [myid:1] - INFO 
[QuorumPeer[myid=1]/0.0.0.0:2181:QuorumCnxManager@193] - Have smaller server 
identifier, so dropping the connection: (3, 1)
2019-02-01 12:21:39,136 [myid:1] - INFO 
[QuorumPeer[myid=1]/0.0.0.0:2181:FastLeaderElection@849] - Notification time 
out: 1600
2019-02-01 12:21:40,739 [myid:1] - INFO 
[QuorumPeer[myid=1]/0.0.0.0:2181:QuorumCnxManager@193] - Have smaller server 
identifier, so dropping the connection: (2, 1)
2019-02-01 12:21:40,742 [myid:1] - INFO 
[QuorumPeer[myid=1]/0.0.0.0:2181:QuorumCnxManager@193] - Have smaller server 
identifier, so dropping the connection: (3, 1)
2019-02-01 12:21:40,743 [myid:1] - INFO 
[QuorumPeer[myid=1]/0.0.0.0:2181:FastLeaderElection@849] - Notification time 
out: 3200
2019-02-01 12:21:43,946 [myid:1] - INFO 
[QuorumPeer[myid=1]/0.0.0.0:2181:QuorumCnxManager@193] - Have smaller server 
identifier, so dropping the connection: (2, 1)
2019-02-01 12:21:43,948 [myid:1] - INFO 
[QuorumPeer[myid=1]/0.0.0.0:2181:QuorumCnxManager@193] - Have smaller server 
identifier, so dropping the connection: (3, 1)
2019-02-01 12:21:43,949 [myid:1] - INFO 
[QuorumPeer[myid=1]/0.0.0.0:2181:FastLeaderElection@849] - Notification time 
out: 6400
2019-02-01 12:21:50,351 [myid:1] - INFO 
[QuorumPeer[myid=1]/0.0.0.0:2181:QuorumCnxManager@193] - Have smaller server 
identifier, so dropping the connection: (2, 1)
2019-02-01 12:21:50,353 [myid:1] - INFO 
[QuorumPeer[myid=1]/0.0.0.0:2181:QuorumCnxManager@193] - Have smaller server 
identifier, so dropping the connection: (3, 1)
2019-02-01 12:21:50,354 [myid:1] - INFO 
[QuorumPeer[myid=1]/0.0.0.0:2181:FastLeaderElection@849] - Notification time 
out: 12800
2019-02-01 12:22:03,156 [myid:1] - INFO 
[QuorumPeer[myid=1]/0.0.0.0:2181:QuorumCnxManager@193] - Have smaller server 
identifier, so dropping the connection: (2, 1)
2019-02-01 12:22:03,159 [myid:1] - INFO 
[QuorumPeer[myid=1]/0.0.0.0:2181:QuorumCnxManager@193] - Have smaller server 
identifier, so dropping the connection: (3, 1)
2019-02-01 12:22:03,159 [myid:1] - INFO 
[QuorumPeer[myid=1]/0.0.0.0:2181:FastLeaderElection@849] - Notification time 
out: 25600
2019-02-01 12:22:24,202 [myid:1] - INFO 
[NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@197] - Accepted 
socket connection from /127.0.0.1:53713
2019-02-01 12:22:24,211 [myid:1] - INFO 
[NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@827] - Processing srvr 
command from /127.0.0.1:53713
2019-02-01 12:22:24,214 [myid:1] - INFO [Thread-3:NIOServerCnxn@1007] - Closed 
socket connection for client /127.0.0.1:53713 (no session established for 
client)
2019-02-01 12:22:28,763 [myid:1] - INFO 
[QuorumPeer[myid=1]/0.0.0.0:2181:QuorumCnxManager@193] - Have smaller server 
identifier, so dropping the connection: (2, 1)
2019-02-01 12:22:28,766 [myid:1] - INFO 
[QuorumPeer[myid=1]/0.0.0.0:2181:QuorumCnxManager@193] - Have smaller server 
identifier, so dropping the connection: (3, 1)
2019-02-01 12:22:28,766 [myid:1] - INFO 
[QuorumPeer[myid=1]/0.0.0.0:2181:FastLeaderElection@849] - Notification time 
out: 51200
2019-02-01 12:22:36,573 [myid:1] - INFO 
[NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@197] - Accepted 
socket connection from /127.0.0.1:53723
{code}
 

> Server is unable to join quorum after connection broken to other peers
> ----------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-2938
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2938
>             Project: ZooKeeper
>          Issue Type: Bug
>    Affects Versions: 3.4.6
>            Reporter: Abhay Bothra
>            Priority: Major
>
> We see the following logs in the node with {{myid: 1}}
> {code}
> 2017-11-08 15:06:28,375 [myid:1] - INFO  
> [WorkerSender[myid=1]:QuorumCnxManager@193] - Have smaller server identifier, 
> so dropping the connection: (2, 1)
> 2017-11-08 15:06:28,375 [myid:1] - INFO  
> [WorkerSender[myid=1]:QuorumCnxManager@193] - Have smaller server identifier, 
> so dropping the connection: (3, 1)
> 2017-11-08 15:07:28,375 [myid:1] - INFO  
> [WorkerReceiver[myid=1]:FastLeaderElection@597] - Notification: 1 (message 
> format version), 1 (n.leader), 0x28e000a8750 (n.zxid), 0x1 (n.round), LOOKING 
> (n.state), 1 (n.sid), 0x28e (n.peerEpoch) LOOKING (my state)
> 2017-11-08 15:07:28,375 [myid:1] - INFO  
> [WorkerSender[myid=1]:QuorumCnxManager@193] - Have smaller server identifier, 
> so dropping the connection: (2, 1)
> 2017-11-08 15:07:28,376 [myid:1] - INFO  
> [WorkerSender[myid=1]:QuorumCnxManager@193] - Have smaller server identifier, 
> so dropping the connection: (3, 1)
> 2017-11-08 15:08:28,375 [myid:1] - INFO  
> [WorkerReceiver[myid=1]:FastLeaderElection@597] - Notification: 1 (message 
> format version), 1 (n.leader), 0x28e000a8750 (n.zxid), 0x1 (n.round), LOOKING 
> (n.state), 1 (n.sid), 0x28e (n.peerEpoch) LOOKING (my state)
> 2017-11-08 15:08:28,376 [myid:1] - INFO  
> [WorkerSender[myid=1]:QuorumCnxManager@193] - Have smaller server identifier, 
> so dropping the connection: (2, 1)
> 2017-11-08 15:08:28,376 [myid:1] - INFO  
> [WorkerSender[myid=1]:QuorumCnxManager@193] - Have smaller server identifier, 
> so dropping the connection: (3, 1)
> 2017-11-08 15:09:28,376 [myid:1] - INFO  
> [WorkerReceiver[myid=1]:FastLeaderElection@597] - Notification: 1 (message 
> format version), 1 (n.leader), 0x28e000a8750 (n.zxid), 0x1 (n.round), LOOKING 
> (n.state), 1 (n.sid), 0x28e (n.peerEpoch) LOOKING (my state)
> 2017-11-08 15:09:28,376 [myid:1] - INFO  
> [WorkerSender[myid=1]:QuorumCnxManager@193] - Have smaller server identifier, 
> so dropping the connection: (2, 1)
> 2017-11-08 15:09:28,376 [myid:1] - INFO  
> [WorkerSender[myid=1]:QuorumCnxManager@193] - Have smaller server identifier, 
> so dropping the connection: (3, 1)
> 2017-11-08 15:10:28,376 [myid:1] - INFO  
> [WorkerReceiver[myid=1]:FastLeaderElection@597] - Notification: 1 (message 
> format version), 1 (n.leader), 0x28e000a8750 (n.zxid), 0x1 (n.round), LOOKING 
> (n.state), 1 (n.sid), 0x28e (n.peerEpoch) LOOKING (my state)
> 2017-11-08 15:10:28,376 [myid:1] - INFO  
> [WorkerSender[myid=1]:QuorumCnxManager@193] - Have smaller server identifier, 
> so dropping the connection: (2, 1)
> 2017-11-08 15:10:28,377 [myid:1] - INFO  
> [WorkerSender[myid=1]:QuorumCnxManager@193] - Have smaller server identifier, 
> so dropping the connection: (3, 1)
> {code}
> On the nodes with {{myid: 2}} and {{myid: 3}}, we see connection broken 
> events for {{myid: 1}}
> {code}
> 2017-11-07 02:54:32,135 [myid:2] - WARN  
> [RecvWorker:1:QuorumCnxManager$RecvWorker@780] - Connection broken for id 1, 
> my id = 2, error =
> java.net.SocketException: Connection reset
>         at java.net.SocketInputStream.read(SocketInputStream.java:209)
>         at java.net.SocketInputStream.read(SocketInputStream.java:141)
>         at java.net.SocketInputStream.read(SocketInputStream.java:223)
>         at java.io.DataInputStream.readInt(DataInputStream.java:387)
>         at 
> org.apache.zookeeper.server.quorum.QuorumCnxManager$RecvWorker.run(QuorumCnxManager.java:765)
> 2017-11-07 02:54:32,135 [myid:2] - WARN  
> [RecvWorker:1:QuorumCnxManager$RecvWorker@783] - Interrupting SendWorker
> 2017-11-07 02:54:32,135 [myid:2] - WARN  
> [SendWorker:1:QuorumCnxManager$SendWorker@697] - Interrupted while waiting 
> for message on queue
> java.lang.InterruptedException
>         at 
> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:2014)
>         at 
> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2088)
>         at 
> java.util.concurrent.ArrayBlockingQueue.poll(ArrayBlockingQueue.java:418)
>         at 
> org.apache.zookeeper.server.quorum.QuorumCnxManager.pollSendQueue(QuorumCnxManager.java:849)
>         at 
> org.apache.zookeeper.server.quorum.QuorumCnxManager.access$500(QuorumCnxManager.java:64)
>         at 
> org.apache.zookeeper.server.quorum.QuorumCnxManager$SendWorker.run(QuorumCnxManager.java:685)
> 2017-11-07 02:54:32,135 [myid:2] - WARN  
> [SendWorker:1:QuorumCnxManager$SendWorker@706] - Send worker leaving thread
> {code}
> From the reported occurrences, it looks like this is a problem only when the 
> node with the smallest {{myid}} loses connection.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to