fullstorydev / grpcurl

Like cURL, but for gRPC: Command-line tool for interacting with gRPC servers
MIT License
10.96k stars 508 forks source link

`remote reset` error with 1.8.8 and higher #434

Open banool opened 11 months ago

banool commented 11 months ago

This works:

docker run fullstorydev/grpcurl:v1.8.7 -d '{ "starting_version": 0 }'   -max-msg-sz 30000000   -H "authorization:Bearer aptoslabs_ep2o8nuDPuS_529dxW5UWEUY1YZeRWLM6EPCmsLNuz4BE"   grpc.mainnet.aptoslabs.com:443 aptos.indexer.v1.RawData/GetTransactions

You see data stream.

This does not:

docker run fullstorydev/grpcurl:v1.8.8 -d '{ "starting_version": 0 }'   -max-msg-sz 30000000   -H "authorization:Bearer aptoslabs_ep2o8nuDPuS_529dxW5UWEUY1YZeRWLM6EPCmsLNuz4BE"   grpc.mainnet.aptoslabs.com:443 aptos.indexer.v1.RawData/GetTransactions

You get this error instead:

Error invoking method "aptos.indexer.v1.RawData/GetTransactions": rpc error: code = Unavailable desc = failed to query for service descriptor "aptos.indexer.v1.RawData": upstream connect error or disconnect/reset before headers. reset reason: remote reset
foo4u commented 10 months ago

Just ran into this and found the issue. grpcurl 1.8.8 started looking for an endpoint called /grpc.reflection.v1.ServerReflection/ServerReflectionInfo before falling back to /grpc.reflection.v1alpha.ServerReflection/ServerReflectionInfo. However, it doesn't fall back on all error conditions.

dgnemo commented 2 months ago

Hello @jhump, I am running into the same issue in my environment, except that my reverse-proxy is returning 401.

I see grpcreflect.NewClientAuto will fallback from v1 to v1alpha only in case of Unimplemented or Unavailable errors.

What do you think about doing a fallback for any error code, or at least supporting 401 too ?

Thanks!