zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hanno Schlichting <ha...@hannosch.eu>
Subject Re: Testing expired sessions bug?
Date Wed, 22 Aug 2012 18:54:56 GMT
On Wed, Aug 22, 2012 at 2:56 AM, Ben Bangert <ben@groovie.org> wrote:
> So the C binding doesn't work when loading a session ID if another process on the same
computer is already using that? How come the tests pass most of the time?

As a bit more info, here's the trace log of such a failed session
reuse using ZK 3.4.3 with a single server:

2012-08-22 20:20:38,548 [myid:] - INFO
[NIOServerCxn.Factory:0.0.0.0/0.0.0.0:20000:NIOServerCnxn$Factory@251][]
- Accepted socket connection from /127.0.0.1:61933
2012-08-22 20:20:38,548 [myid:] - DEBUG
[NIOServerCxn.Factory:0.0.0.0/0.0.0.0:20000:NIOServerCnxn@735][] -
Session establishment request from client /127.0.0.1:61933 client's
lastZxid is 0x0
2012-08-22 20:20:38,549 [myid:] - INFO
[NIOServerCxn.Factory:0.0.0.0/0.0.0.0:20000:NIOServerCnxn@770][] -
Client attempting to renew session 0x1394f908ca00000 at
/127.0.0.1:61933
2012-08-22 20:20:38,549 [myid:] - INFO
[NIOServerCxn.Factory:0.0.0.0/0.0.0.0:20000:NIOServerCnxn@1435][] -
Closed socket connection for client /127.0.0.1:61932 which had
sessionid 0x1394f908ca00000
2012-08-22 20:20:38,552 [myid:] - INFO
[NIOServerCxn.Factory:0.0.0.0/0.0.0.0:20000:NIOServerCnxn@1573][] -
Invalid session 0x1394f908ca00000 for client /127.0.0.1:61933,
probably expired
2012-08-22 20:20:38,552 [myid:] - TRACE
[NIOServerCxn.Factory:0.0.0.0/0.0.0.0:20000:NIOServerCnxn@435][] - Add
a buffer to outgoingBuffers, sk sun.nio.ch.SelectionKeyImpl@6a5f6303
is valid: true
2012-08-22 20:20:38,554 [myid:] - INFO
[NIOServerCxn.Factory:0.0.0.0/0.0.0.0:20000:NIOServerCnxn@1435][] -
Closed socket connection for client /127.0.0.1:61933 which had
sessionid 0x1394f908ca00000
2012-08-22 20:20:38,555 [myid:] - DEBUG
[NIOServerCxn.Factory:0.0.0.0/0.0.0.0:20000:NIOServerCnxn@1459][] -
ignoring exception during input shutdown
java.net.SocketException: Socket is not connected
	at sun.nio.ch.SocketChannelImpl.shutdown(Native Method)
	at sun.nio.ch.SocketChannelImpl.shutdownInput(SocketChannelImpl.java:633)
	at sun.nio.ch.SocketAdaptor.shutdownInput(SocketAdaptor.java:360)
	at org.apache.zookeeper.server.NIOServerCnxn.closeSock(NIOServerCnxn.java:1455)
	at org.apache.zookeeper.server.NIOServerCnxn.close(NIOServerCnxn.java:1412)
	at org.apache.zookeeper.server.NIOServerCnxn.doIO(NIOServerCnxn.java:632)
	at org.apache.zookeeper.server.NIOServerCnxn$Factory.run(NIOServerCnxn.java:262)

Note how there's no ZooTrace entries in here and no "Session 0x... is
valid..." message as logged in ZooKeeperServer.revalidateSession.
Reading the server code it looks like the checkPasswd check fails in
reopenSession. But I have no idea why that would suddenly happen in
some of the cases.

Hanno

Mime
View raw message