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

Service not found: grpc.reflection.v1alpha.ServerReflection #298

Closed
mdford opened this issue Jul 25, 2020 · 4 comments · Fixed by #305
Closed

Service not found: grpc.reflection.v1alpha.ServerReflection #298

mdford opened this issue Jul 25, 2020 · 4 comments · Fixed by #305
Labels

Comments

@mdford
Copy link

mdford commented Jul 25, 2020

Hi, I am trying to run evans but I am getting the following error:

evans: failed to run REPL mode: failed to instantiate a new spec: failed to instantiate the spec from proto files: failed to list packages by gRPC reflection: Service not found: grpc.reflection.v1alpha.ServerReflection

But, if I use grpc-cli, it shows grpc.reflection.v1alpha.ServerReflection as available on that server and should be available. Here are both commands to the same server:

$ ./grpc_cli ls localhost:50051 
dnp3.DNP3Service
grpc.reflection.v1alpha.ServerReflection
grpc.health.v1.Health

$ ~/evans  -r --host localhost --port 50051
evans: failed to run REPL mode: failed to instantiate a new spec: failed to instantiate the spec from proto files: 
failed to list packages by gRPC reflection: Service not found: grpc.reflection.v1alpha.ServerReflection

Any thoughts on what to do or check to make it work?

Thanks!

@ktr0731
Copy link
Owner

ktr0731 commented Jul 25, 2020

Can you give me more context such that environment described in bug report template?
Also, what is the gRPC reflection implementation that you using?

## Environment
- OS: 
- Terminal: 
- Evans version: 
- `protoc` version:
- `protoc` plugin version (if you are using):

@mdford
Copy link
Author

mdford commented Jul 25, 2020

Hi, thanks for the reply.

Operating System: Ubuntu 19.10
Kernel: Linux 5.3.0-62-generic
Architecture: x86-64

Evans:  evans 0.9.0
protoc:  libprotoc 3.12.2

Server code instantiation:

    std::string server_address("0.0.0.0:50051");
    DNP3ServiceImpl service;
    grpc::EnableDefaultHealthCheckService(true);
    grpc::reflection::InitProtoReflectionServerBuilderPlugin();
    ServerBuilder builder;

    builder.AddListeningPort(server_address, grpc::InsecureServerCredentials());
    builder.RegisterService(&service);

    std::unique_ptr<Server> server(builder.BuildAndStart());
    std::cout << "Server listening on " << server_address << std::endl;

    server->Wait();

@shooshx
Copy link

shooshx commented Sep 1, 2020

I'm seeing the same error on windows, also with a C++ server
grpc_cli works perfectly, evans shows
failed to instantiate the spec from proto files: failed to list packages by gRPC reflection: Service not found: grpc.reflection.v1alpha.ServerReflection

@MsN-12
Copy link

MsN-12 commented Jul 29, 2023

i had same problem .
i add this code to my sever.

reflection.Register(grpcServer)

and it fixed

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

Successfully merging a pull request may close this issue.

4 participants