stepancheg / grpc-rust

Rust implementation of gRPC
MIT License
1.38k stars 125 forks source link

greeter example gives unhelpful error message #182

Open hxw opened 4 years ago

hxw commented 4 years ago

It terminates with Err(Http(ClientDied(None))). though after some debugging (see: https://github.com/stepancheg/rust-http2/issues/40 ) it turns out to be simple an expire cert.

% cargo run --bin greeter_client -- --tls                
warning: field is never read: `conf`                                          
  --> grpc/src/server/mod.rs:81:5
   |
81 |     conf: ServerConf,
   |     ^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

warning: field is never read: `sender`
  --> grpc/src/req.rs:77:5
   |
77 |     sender: Option<mpsc::Sender<T>>,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

   Compiling grpc_examples_greeter v0.0.0 (/projects/stepancheg/grpc-rust/grpc-examples/greeter)
    Finished dev [unoptimized + debuginfo] target(s) in 1.74s
     Running `target/debug/greeter_client --tls`
Err(Http(ClientDied(None)))

running grpc-examples/greeter/src/gen-certs.sh then restarting server, will allow the client to work.

agentydragon commented 3 years ago

I'm getting the same error when running a grpc-rust gRPC server as a Google Cloud Run function. I also got the "address resolved to multiple addresses" error, and then a Err(Http(ClientDied(None))). I could also use a better error message and some way to disable whatever check is failing (I have not figured that out yet).

stepancheg commented 3 years ago

Good news is that I fixed this issue just yesterday in rust-http2. I'm planning to upgrade grpc-rust to the latest rust-http2 soon.

stepancheg commented 3 years ago

(FYI, this commit is the fix https://github.com/stepancheg/rust-http2/commit/1543b89d67d5d23b912e6fe4ea50b596b5dee61a#diff-80f2bef63a80fb356dc8a121b79d2c79b704716d84f66b641475b354a3438cbd)

agentydragon commented 3 years ago

Cool. By the way, I came upon grpc-rust via Bazel's Rust rules (https://github.com/bazelbuild/rules_rust). Might be also nice to update the grpc version there when the updates propagate.