curator-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Imesha Sudasingha <imesha...@cse.mrt.ac.lk>
Subject Re: Unable to re-establish a session once the session is lost
Date Mon, 05 Dec 2016 13:38:06 GMT
Sorry, the question is,
"Can anyone explain why doesn't my CuratorFramework instance recreate a
session and establish connection again?"

On 5 December 2016 at 18:58, Imesha Sudasingha <imesha.13@cse.mrt.ac.lk>
wrote:

> Hi all,
>
> I'm using CuratorFramework to connect to ZooKeeper and I also use
> authorization with ACL, CREATOR_ALL_ACL.
>
> In order to test the functionality I deliberately disconnect my client
> machine from the network. Then I see the connection state being changed to
> SUSPENDED. Then after some time I see connection state change to LOST. (I'm
> using connection timeout of 15 seconds and session timeout of 60 seconds).
>
> Then, I reconnect the client machine to the network. Then I see the
> following logs in my zookeeper logs which shows that the client is trying
> to re-establish the previous connection.
>
> INFO MBeanRegistry [ConnnectionExpirer] Unregister MBean
> [org.apache.ZooKeeperService:name0=ReplicatedServer_id2,
> name1=replica.2,name2=Leader,name3=Connections,name4=192.168.1.230,name5=
> 0x20001dbe1940001]
>  INFO NIOServerCnxn [ConnnectionExpirer] Closed socket connection for
> client /192.168.1.230:56178 which had sessionid 0x20001dbe1940001
>  INFO ZooKeeperServer [SessionTracker] Expiring session 0x20001dbe1940001,
> timeout of 60000ms exceeded
>  INFO ZooKeeperServer [SessionTracker] Submitting global closeSession
> request for session 0x20001dbe1940001
>  INFO PrepRequestProcessor [ProcessThread(sid:2 cport:-1):] Processed
> session termination for sessionid: 0x20001dbe1940001
>  INFO NIOServerCnxnFactory [NIOServerCxnFactory.AcceptThread:
> 0.0.0.0/0.0.0.0:30155] Accepted socket connection from /
> 192.168.1.230:57834
>  INFO ZooKeeperServer [NIOWorkerThread-1] Client attempting to renew
> session 0x20001dbe1940001 at /192.168.1.230:57834
>  INFO Learner [NIOWorkerThread-1] Revalidating client: 0x20001dbe1940001
>  INFO ZooKeeperServer [QuorumPeer[myid=0](plain=/0:
> 0:0:0:0:0:0:0:30155)(secure=disabled)] Invalid session 0x20001dbe1940001
> for client /192.168.1.230:57834, probably expired
>  INFO NIOServerCnxn [NIOWorkerThread-2] Closed socket connection for
> client /192.168.1.230:57834 which had sessionid 0x20001dbe1940001
>
> As expected, resuming the session fails. But, there after nothing happens
> in the client's side. No connection state changes, no retry attempts. When
> I shutdown my application where I delete some ZNodes, I only see errors
> saying "Keeper Error Code = ConnectionLoss" after sometime (which is due to
> my retry policy, RetryNTimes(200,1000)).
>
> Can anyone explain why does my CuratorFramework instance recreate a
> session and establish connection again?
>
> Thanks in advance!
>
> - Imesha Sudasingha
>
> --
> *Imesha Sudasingha*
> Undergraduate of Department of Computer Science and  Engineering,
> University of Moratuwa.
>

Mime
View raw message