Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

helloworld example report unimplemented error #724

Closed
davidli2010 opened this issue Jul 15, 2021 · 1 comment
Closed

helloworld example report unimplemented error #724

davidli2010 opened this issue Jul 15, 2021 · 1 comment

Comments

@davidli2010
Copy link

Bug Report

Version

cargo tree | grep tonic     
hello-tonic v0.1.0 (/home/david/rust/hello-tonic)
└── tonic v0.5.0
└── tonic-build v0.5.1

Platform

Linux david-VirtualBox 5.8.0-59-generic #66~20.04.1-Ubuntu SMP Thu Jun 17 11:14:10 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Description

I copied helloworld example from tonic, the project is here: https://github.com/davidli2010/hello-tonic.

When I start server and run client, the client report an error:

 cargo run --bin hello-server
    Finished dev [unoptimized + debuginfo] target(s) in 0.05s
     Running `target/debug/hello-server`
GreeterServer listening on 127.0.0.1:5000
cargo run --bin hello-client
   Compiling hello-tonic v0.1.0 (/home/david/rust/hello-tonic)
    Finished dev [unoptimized + debuginfo] target(s) in 2.02s
     Running `target/debug/hello-client`
Error: Status { code: Unimplemented, metadata: MetadataMap { headers: {"date": "Thu, 15 Jul 2021 02:51:19 GMT", "content-type": "application/grpc"} }, source: None }
@davidli2010
Copy link
Author

Sorry, it's my fault. I have solved the problem.

I disabled tonic-build's default feature transport, and implemented NamedService for GreeterServer by myself. Because I didn't understand what NamedService was doing, I gave a wrong Name.

To fix this problem, change the Name to "hello.Greeter", or just enable default feature of tonic-build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant