hey Imesha,
Does this only happen when you have the ACL set?
cheers

On Tue, Dec 6, 2016 at 12:38 AM, Imesha Sudasingha <[email protected]>
wrote:

> 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 <[email protected]>
> 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,name
>> 1=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.
>>
>
>

Reply via email to