grpc-go: grpc.Dial does not return an error on bad certificates
When using mutual-TLS with mismatched certificates, calling grpc.Dial(..., grpc.WithBlock())
never returns. The client connection is happily banging its head against bad certificate errors and never reports an error to the caller.
Worse, it seems that WithBlock()
is extremely unreliable. It blocks until the connection is connected, but rarely returns a non-nil error to the caller in the error case (connection refused is one case where it does the right thing).
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 25 (22 by maintainers)
There are some cases (like ours) where there is no load balancer in the picture. There should be some way of treating this error as non transient, even if it’s not the default behaviour.
On Thu, Mar 31, 2016 at 10:03 PM, Qi Zhao notifications@github.com wrote:
It’s not true that the problem is typically on the server. If the server rejects the client’s certificate, it is almost certainly true that the client is at fault, and the RPC will never succeed.
On Jul 18, 2016 14:36, “Qi Zhao” notifications@github.com wrote: