etcdv3/etcd-client

Unable to run examples

frostyplanet opened this issue · 6 comments

I have my local etcd container running, but almost all the examples and tests fail:


$ cargo run --example lock
   Compiling etcd-client v0.6.5 (/home/plan/projects/qingcloud/etcd-client)
    Finished dev [unoptimized + debuginfo] target(s) in 5.18s
     Running `target/debug/examples/lock`
try to lock with name 'lock-test'
Error: GRpcStatus(Status { code: Unimplemented, message: "unknown service v3lockpb.Lock", metadata: MetadataMap { headers: {"content-type": "application/grpc"} } })

what's the version of your etcd server?

docker running etcd 3.1.4.
I previously use luncj/etcd-rs and I'd like to try this project out, it seams have more throughout unit test.

The proto files are copied from etcd 3.4, and we test this library with etcd 3.4.

Diff between proto in luncj/etcd-rs , I don't see much difference aside from comment and intention.
I suspect the failure in example is related to tonic the grpc library (but I don't know alot about it)

You can upgrade your etcd to 3.4 and try again.

Check your endpoints.
You should connect to port 2379, not 2380!