and then I use rust-zookeeper to connect with zetcd and create data:
// Connect to the test cluster
let zk = ZooKeeper::connect("127.0.0.1:2181",
Duration::from_secs(5),
move |event: WatchedEvent| {
info!("{:?}", event);
if event.keeper_state == KeeperState::Disconnected {
disconnects_watcher.fetch_add(1, Ordering::Relaxed);
}
})
.unwrap();
// Do the tests
let create = zk.create("/test",
vec![8, 8],
Acl::open_unsafe().clone(),
CreateMode::Ephemeral);
it can connect to the zetcd, but when it send a create data request to zetcd, rust-zookeeper got error when parse the response:
2021-08-23T03:07:16Z ERROR zookeeper::zookeeper] error closing zookeeper connection in drop: ConnectionLoss
test zk_test ... FAILED
failures:
---- zk_test stdout ----
thread 'io' panicked at 'Failed to parse ConnectResponse Error { kind: UnexpectedEof, message: "failed to fill whole buffer" }', src/io.rs:225:21
stack backtrace:
0: rust_begin_unwind
at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/panicking.rs:515:5
1: std::panicking::begin_panic_fmt
at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/panicking.rs:457:5
2: zookeeper::io::ZkIo::handle_chunk
at ./src/io.rs:225:21
3: zookeeper::io::ZkIo::handle_response
at ./src/io.rs:164:17
4: zookeeper::io::ZkIo::ready_zk
at ./src/io.rs:417:21
5: zookeeper::io::ZkIo::ready
at ./src/io.rs:366:19
6: zookeeper::io::ZkIo::run
at ./src/io.rs:569:17
7: zookeeper::zookeeper::ZooKeeper::connect::{{closure}}
at ./src/zookeeper.rs:78:44
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
I run an etcd cluster and use
zetcd
to to dispatch the zookeeper operations on an etcd cluster.and then I use rust-zookeeper to connect with zetcd and create data:
it can connect to the
zetcd
, but when it send a create data request tozetcd
, rust-zookeeper got error when parse the response:and here is
zetcd
's log: