Skip to content
This repository has been archived by the owner on Jul 21, 2021. It is now read-only.

Issue related with zookeeper old client #244

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cnutshell
Copy link

In zookeeper 3.4.5, If zookeeper service discover an old client, it would close that connection directly without any response, which would result endless reconnection from client to zookeeper service.
Client binding would get EOF when reading from that connection.
This EOF got by client should be considered as ErrSessionExpired.

…nt, it

would close that connection. EOF should be considered as
ErrSessionExpired.
@cnutshell
Copy link
Author

cnutshell commented Apr 23, 2020

Log of testing client taking use of log extensional binding:

2020/04/18 15:46:00 [20] authenticate: fail to read len data
2020/04/18 15:46:00 [20] loop: After authenticate: LastZxidSeen=30064771079, TimeOut=4000, SessionID=31960860706013185, Passwd='^@¸¡æ^V®ä<80>^HÿðP<83>÷Øø'
2020/04/18 15:46:00 [20] loop: authentication failed: EOF
2020/04/18 15:46:00 [20] loop: exit from send/recv loop
2020/04/18 15:46:00 [20] loop: enter next processing
2020/04/18 15:46:00 [20] connect: Connected to 172.22.136.96:2181
2020/04/18 15:46:00 [20] loop: Before authenticate: LastZxidSeen=30064771079, TimeOut=4000, SessionID=31960860706013185, Passwd='^@¸¡æ^V®ä<80>^HÿðP<83>÷Øø'
2020/04/18 15:46:00 [20] authenticate: fail to read len data
2020/04/18 15:46:00 [20] loop: After authenticate: LastZxidSeen=30064771079, TimeOut=4000, SessionID=31960860706013185, Passwd='^@¸¡æ^V®ä<80>^HÿðP<83>÷Øø'
2020/04/18 15:46:00 [20] loop: authentication failed: EOF
2020/04/18 15:46:00 [20] loop: exit from send/recv loop
2020/04/18 15:46:00 [20] loop: enter next processing
2020/04/18 15:46:00 [20] connect: Connected to 172.22.135.139:2181
2020/04/18 15:46:00 [20] loop: Before authenticate: LastZxidSeen=30064771079, TimeOut=4000, SessionID=31960860706013185, Passwd='^@¸¡æ^V®ä<80>^HÿðP<83>÷Øø'
2020/04/18 15:46:00 [20] authenticate: fail to read len data
2020/04/18 15:46:00 [20] loop: After authenticate: LastZxidSeen=30064771079, TimeOut=4000, SessionID=31960860706013185, Passwd='^@¸¡æ^V®ä<80>^HÿðP<83>÷Øø'
2020/04/18 15:46:00 [20] loop: authentication failed: EOF
2020/04/18 15:46:00 [20] loop: exit from send/recv loop
2020/04/18 15:46:00 [20] loop: enter next processing
2020/04/18 15:46:00 [15] sendLoop: send ping packet
2020/04/18 15:46:01 [20] connect: retryStart triggered
2020/04/18 15:46:01 [20] connect: Connected to 172.22.135.140:2181
2020/04/18 15:46:01 [20] loop: Before authenticate: LastZxidSeen=30064771079, TimeOut=4000, SessionID=31960860706013185, Passwd='^@¸¡æ^V®ä<80>^HÿðP<83>÷Øø'
2020/04/18 15:46:01 [20] authenticate: fail to read len data
2020/04/18 15:46:01 [20] loop: After authenticate: LastZxidSeen=30064771079, TimeOut=4000, SessionID=31960860706013185, Passwd='^@¸¡æ^V®ä<80>^HÿðP<83>÷Øø'
2020/04/18 15:46:01 [20] loop: authentication failed: EOF
2020/04/18 15:46:01 [20] loop: exit from send/recv loop
2020/04/18 15:46:01 [20] loop: enter next processing
2020/04/18 15:46:01 [20] connect: Connected to 172.22.136.96:2181
2020/04/18 15:46:01 [20] loop: Before authenticate: LastZxidSeen=30064771079, TimeOut=4000, SessionID=31960860706013185, Passwd='^@¸¡æ^V®ä<80>^HÿðP<83>÷Øø'
2020/04/18 15:46:01 [20] authenticate: fail to read len data
2020/04/18 15:46:01 [20] loop: After authenticate: LastZxidSeen=30064771079, TimeOut=4000, SessionID=31960860706013185, Passwd='^@¸¡æ^V®ä<80>^HÿðP<83>÷Øø'
2020/04/18 15:46:01 [20] loop: authentication failed: EOF
2020/04/18 15:46:01 [20] loop: exit from send/recv loop
2020/04/18 15:46:01 [20] loop: enter next processing

Zookeeper service log for old client:

2020-04-18 15:45:58,885 [myid:2] - WARN  [NIOServerCxn.Factory:/172.22.136.96:2181:ZooKeeperServer@809] - Connection request from old client /192.168.168.157:65299; will be dropped if server is in r-o mode
2020-04-18 15:46:00,106 [myid:2] - WARN  [NIOServerCxn.Factory:/172.22.136.96:2181:ZooKeeperServer@809] - Connection request from old client /192.168.168.157:65302; will be dropped if server is in r-o mode
2020-04-18 15:46:01,327 [myid:2] - WARN  [NIOServerCxn.Factory:/172.22.136.96:2181:ZooKeeperServer@809] - Connection request from old client /192.168.168.157:65305; will be dropped if server is in r-o mode

Zookeeper Version:

zookeeper 3.4.5

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant