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

Include more output while connecting and reflecting with verbose mode #467

Open
dimo414 opened this issue Jun 7, 2024 · 0 comments
Open

Comments

@dimo414
Copy link
Contributor

dimo414 commented Jun 7, 2024

Trying to use grpcurl against a proxy server (therefore hitting all sorts of unusual edge cases) has been a bit of a pain for debugging because it doesn't generally provide any diagnostics, even with -v/-vv. I would have expected one or the other to include details about the connection state and reflection queries, but instead the output is generally minimal / confusing. Some examples:

  • Hit an Envoy proxy incorrectly routing /grpc.reflection.v1alpha.ServerReflection to an HTTP server

    $ grpcurl -vv -plaintext -d '{}' my_proxy:8080 my.CoolService.Endpoint
    # no output, just hangs, I suspect because the HTTP server doesn't correctly close the streaming reflection request
    ^C
    
  • Passing -max-time helps but you need to look closely to realize it's reporting that reflection is what timed out

    $ grpcurl -vv -plaintext -max-time 10 -d '{}' my_proxy:8080 my.CoolService.Endpoint
    Error invoking method "my_server my.CoolService.Endpoint": rpc error: code = DeadlineExceeded desc = failed to query for service descriptor "my_server my.CoolService": context deadline exceeded
    
  • Hit that same HTTP server directly (this is a particularly odd failure as the server is up, and curl my_server:8080 responds):

    $ grpcurl -vv -plaintext -d '{}' my_server:8080 my.CoolService.Endpoint
    Failed to dial target host "my_server:8080": context deadline exceeded
    

Obviously these are all cases were I would expect grpcurl to fail, but the output, especially with -vv, is IMO lacking. It would be great if more information could be surfaced in -v or -vv mode about the connection status and what data is being requested for reflection.

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