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

Patrick Hunt commented on ZOOKEEPER-733:
----------------------------------------

Ben that fixes SessionTest for me, but not QuorumTest. I modified QT to use 
that same mechanism but it still fails.

For some reason the new session (using existing sessionid/pass) gets a moved 
exception. Note that these clients are connecting to diff servers. Perhaps 
that's the issue (timing)?

{noformat}
2010-05-28 11:10:25,419 - INFO  [main:junit4zktestrunner$loggedinvokemet...@49] 
- RUNNING TEST METHOD testSessionMoved
2010-05-28 11:10:25,420 - INFO  [main:zookee...@375] - Initiating client 
connection, connectString=127.0.0.1:11354 sessionTimeout=30000 
watcher=org.apache.zookeeper.test.quorumtes...@5c1d29c1
2010-05-28 11:10:25,421 - INFO  [main-SendThread():clientcnxn$sendthr...@1007] 
- Opening socket connection to server /127.0.0.1:11354
2010-05-28 11:10:25,442 - INFO  
[main-SendThread(localhost:11354):clientcnxn$sendthr...@915] - Socket 
connection established to localhost/127.0.0.1:11354, initiating session
2010-05-28 11:10:25,443 - INFO  [New I/O server worker 
#51-1:zookeeperser...@795] - Client attempting to establish new session at 
/127.0.0.1:41741
2010-05-28 11:10:25,463 - WARN  [QuorumPeer:0.0.0.0/0.0.0.0:11354:follo...@120] 
- Got zxid 0x100000001 expected 0x1
2010-05-28 11:10:25,465 - WARN  [QuorumPeer:0.0.0.0/0.0.0.0:11357:follo...@120] 
- Got zxid 0x100000001 expected 0x1
2010-05-28 11:10:25,492 - WARN  [QuorumPeer:0.0.0.0/0.0.0.0:11355:follo...@120] 
- Got zxid 0x100000001 expected 0x1
2010-05-28 11:10:25,493 - WARN  [QuorumPeer:0.0.0.0/0.0.0.0:11356:follo...@120] 
- Got zxid 0x100000001 expected 0x1
2010-05-28 11:10:25,625 - INFO  [CommitProcessor:1:zookeeperser...@571] - 
Established session 0x128e01b97ab0000 with negotiated timeout 30000 for client 
/127.0.0.1:41741
2010-05-28 11:10:25,625 - INFO  
[main-SendThread(localhost:11354):clientcnxn$sendthr...@685] - 
readConnectRestult 36 
0x[0,0,0,0,0,0,75,30,1,28,ffffffe0,1b,ffffff97,ffffffab,0,0,0,0,0,10,ffffffd7,ffffffe2,ffffffd1,39,18,fffffff1,fffffff3,ffffff8c,d,3,ffffff9a,ffffffe8,21,43,ffffffef,13,]
2010-05-28 11:10:25,625 - INFO  
[main-SendThread(localhost:11354):clientcnxn$sendthr...@708] - Session 
establishment complete on server localhost/127.0.0.1:11354, sessionid = 
0x128e01b97ab0000, negotiated timeout = 30000
2010-05-28 11:10:25,647 - INFO  [main:zookee...@438] - Initiating client 
connection, connectString=127.0.0.1:11355 sessionTimeout=30000 
watcher=org.apache.zookeeper.test.quorumtes...@1cacd5d4 
sessionId=128e01b97ab0000 sessionPasswd=<hidden>
2010-05-28 11:10:25,648 - INFO  [main-SendThread():clientcnxn$sendthr...@1007] 
- Opening socket connection to server /127.0.0.1:11355
2010-05-28 11:10:25,649 - INFO  
[main-SendThread(localhost:11355):clientcnxn$sendthr...@915] - Socket 
connection established to localhost/127.0.0.1:11355, initiating session
2010-05-28 11:10:25,650 - INFO  [New I/O server worker 
#52-2:zookeeperser...@788] - Client attempting to renew session 
0x128e01b97ab0000 at /127.0.0.1:45500
2010-05-28 11:10:25,654 - INFO  [ProcessThread:-1:preprequestproces...@405] - 
Got user-level KeeperException when processing sessionid:0x128e01b97ab0000 
type:setData cxid:0x1 zxid:0xfffffffffffffffe txntype:unknown reqpath:/ Error 
Path:null Error:KeeperErrorCode = Session moved
2010-05-28 11:10:25,691 - INFO  
[main-SendThread(localhost:11355):clientcnxn$sendthr...@1125] - Unable to read 
additional data from server sessionid 0x128e01b97ab0000, likely server has 
closed socket, closing socket connection and attempting reconnect
2010-05-28 11:10:25,692 - INFO  [CommitProcessor:2:nettyserverc...@73] - close 
128e01b97ab0000
2010-05-28 11:10:25,692 - INFO  [CommitProcessor:2:nettyserverc...@80] - close 
in progress 128e01b97ab0000
2010-05-28 11:10:25,794 - INFO  [main:junit4zktestrunner$loggedinvokemet...@53] 
- TEST METHOD FAILED testSessionMoved
org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = 
ConnectionLoss for /
        at org.apache.zookeeper.KeeperException.create(KeeperException.java:90)
        at org.apache.zookeeper.KeeperException.create(KeeperException.java:42)
        at org.apache.zookeeper.ZooKeeper.setData(ZooKeeper.java:1127)
        at 
org.apache.zookeeper.test.QuorumTest.testSessionMoved(QuorumTest.java:204)
{noformat}

line 204 for me is 

            zknew.setData("/", new byte[1], -1);



> use netty to handle client connections
> --------------------------------------
>
>                 Key: ZOOKEEPER-733
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-733
>             Project: Zookeeper
>          Issue Type: Improvement
>            Reporter: Benjamin Reed
>         Attachments: accessive.jar, moved.zip, ZOOKEEPER-733.patch, 
> ZOOKEEPER-733.patch
>
>
> we currently have our own asynchronous NIO socket engine to be able to handle 
> lots of clients with a single thread. over time the engine has become more 
> complicated. we would also like the engine to use multiple threads on 
> machines with lots of cores. plus, we would like to be able to support things 
> like SSL. if we switch to netty, we can simplify our code and get the 
> previously mentioned benefits.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to