error: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: timed out waiting for server handshake

created at 07-27-2021 views: 73

error

When developing a gRPC application, the client kept reporting errors:

error: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: timed out waiting for server handshake

I have encountered this error before, and then I thought of setting GRPC_GO_REQUIRE_HANDSHAKE=off to solve it, and then found it was useless. After some inspection, I found that it was in the version used, even if this environment variable was set, it was useless. :

google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55
google.golang.org/grpc v1.23.0

solution

The solution is to downgrade the version:

google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107
google.golang.org/grpc v1.19.0

Incidentally, the environment variable GRPC_GO_REQUIRE_HANDSHAKE=off must be set.

created at:07-27-2021
edited at: 07-27-2021: