Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
3.4.5
-
None
-
None
-
linux zookeeper 3.4.5
-
Important
Description
We can create zk node with null data as given bellow.
ZkConnect connector = new ZkConnect();
ZooKeeper zk = connector.connect("host:port");
String newNode = "/nayeemDate3";
String strdata = String.valueOf('\u0000');
connector.createNode(newNode, strdata.getBytes());
When we get the data for the zknode
2016-11-17 23:55:48,926 [myid:] - WARN [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:5181:NIOServerCnxn@349] - caught end of stream exception
EndOfStreamException: Unable to read additional data from client sessionid 0x1585061acbd0613, likely client has closed socket
at org.apache.zookeeper.server.NIOServerCnxn.doIO(NIOServerCnxn.java:220)
at org.apache.zookeeper.server.NIOServerCnxnFactory.run(NIOServerCnxnFactory.java:208)
at java.lang.Thread.run(Thread.java:745)
2016-11-17 23:55:48,926 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:5181:NIOServerCnxn@1001] - Closed socket connection for client /10.10.72.93:48005 which had sessionid 0x1585061acbd0613
To resolve the issue workaround is to delete the zknode,
is it the right behaviour or is this a bug.
data from zkcli
[zk: 10.10.72.93:5181(CONNECTED) 1] ls /nayeemDate3
[]
[zk: 10.10.72.93:5181(CONNECTED) 2] get /nayeemDate3
null
cZxid = 0xdc47
ctime = Fri Nov 18 13:29:43 IST 2016
mZxid = 0xdc47
mtime = Fri Nov 18 13:29:43 IST 2016
pZxid = 0xdc47
cversion = 0
dataVersion = 0
aclVersion = 0
ephemeralOwner = 0x0
dataLength = 0
numChildren = 0
[zk: 10.10.72.93:5181(CONNECTED) 3] stat /nayeemDate3
cZxid = 0xdc47
ctime = Fri Nov 18 13:29:43 IST 2016
mZxid = 0xdc47
mtime = Fri Nov 18 13:29:43 IST 2016
pZxid = 0xdc47
cversion = 0
dataVersion = 0
aclVersion = 0
ephemeralOwner = 0x0
dataLength = 0
numChildren = 0