grpc
connection_error
ai_generated
true
grpc._channel._InactiveRpcError: StatusCode.UNAVAILABLE: failed to connect to all addresses
ID: grpc/unavailable-connection-failed
88%Fix Rate
90%Confidence
3Evidence
2023-01-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 1 | active | — | — | — |
Root Cause
gRPC client cannot reach the server. Server not running, wrong address/port, or TLS/plaintext mismatch.
genericWorkarounds
-
95% success Verify server is running and listening on expected port
grpcurl -plaintext localhost:50051 list # or ss -tlnp | grep 50051
Sources: https://grpc.io/docs/guides/
-
90% success Check TLS mismatch: plaintext client vs TLS server or vice versa
grpc.insecure_channel() for plaintext; grpc.secure_channel(creds) for TLS
-
85% success Check DNS resolution and firewall rules for remote servers
dig server.example.com; telnet server.example.com 50051
Dead Ends
Common approaches that don't work:
-
Add grpc.enable_http_proxy channel option
78% fail
HTTP proxies do not support gRPC's HTTP/2 framing. This makes connection worse, not better.
-
Switch to REST API as workaround
72% fail
Loses gRPC benefits (streaming, protobuf efficiency, code generation). Fix the connection instead.