grpcurl icon indicating copy to clipboard operation
grpcurl copied to clipboard

Reflection not detected

Open hrpath opened this issue 5 years ago • 5 comments
trafficstars

Hi !

Here's an extract from the same shell on the same local server

❯ grpcurl -plaintext localhost:50051 list Failed to list services: server does not support the reflection API

❯ grpc_cli ls localhost:50051 metal.grpc.ExecutionService metal.grpc.CoreExecutionService metal.grpc.PayExecutionService grpc.reflection.v1alpha.ServerReflection

I've just started using grpcurl maybe I missed a parameter ?

Thank you !

hrpath avatar Feb 06 '20 16:02 hrpath

@hrpath, can you see what happens on the server? Is the server getting the request to the ServerReflection service and then returning an error code?

Also, can you provide more details about the server -- what language it is written in and what version of gRPC it uses?

jhump avatar Feb 06 '20 17:02 jhump

Hi,

We use micronaut with grpc 1.25.0

Implementation is the official java https://github.com/grpc/grpc-java/blob/master/documentation/server-reflection-tutorial.md#enable-server-reflection

Can I get some more logs from grpc_cli ls ?

hrpath avatar Feb 06 '20 17:02 hrpath

Hi, I have the same problem with grpc v1.33.2 and protobuf v1.4.3. Programming Language is Go.

shibumi avatar Nov 18 '20 11:11 shibumi

@shibumi, and what do you see happening server-side? Do you see a failed request? The grpcurl client will try to use the reflection service and will only print this message if the RPC fails with an "unimplemented" error.

Perhaps your server is registering this service using a different fully-qualified service name? The expected service name is grpc.reflection.v1alpha.ServerReflection and the method used is called ServerReflectionInfo.

jhump avatar Nov 18 '20 15:11 jhump

@jhump I should have read your README more carefully. It wasn't working because I did not register a reflection service via reflection.Register(s). With this line it works as expected. Thanks and sorry for the issue hijacking.

shibumi avatar Nov 18 '20 18:11 shibumi