gRPC status 14: UNAVAILABLE
UNAVAILABLE is gRPC status code 14. The service cannot be reached right now. It is usually transient, and the most common error when a call never gets through.
Updated
Usual causes
- Nothing is listening at that address: the server is down, restarting, or on another port.
- The name did not resolve, or there is no route to the host (DNS, VPN, firewall).
- A TLS mismatch: a plaintext client dialled a TLS port, or a TLS client dialled a plaintext one.
- The connection was reset or dropped mid-call, often by a load balancer or a server shutting down.
- The server is overloaded or draining and is shedding load.
What to check
- Host and port, then whether the server is running.
- Whether the port expects TLS;
error reading server preface: http2: frame too largeis the classic sign of a plaintext client on a TLS port. - DNS and VPN for internal hostnames.
- Load balancer idle timeouts and keepalive settings, if calls fail after a period of quiet.
Not to be confused with
DEADLINE_EXCEEDED means time ran out; UNAVAILABLE means the transport failed before or during the call.
What it looks like
A typical error, as a Go client prints it: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp 127.0.0.1:50051: connect: connection refused"
Retry, and the HTTP equivalent
| UNAVAILABLE | |
|---|---|
| Code | 14 |
| Name | UNAVAILABLE |
| In istek's status bar | unavailable |
| Retry | Yes, with exponential backoff. It is the code gRPC's own retry policies are designed around. |
| HTTP status | 503 |
istek names the status of every call it makes, unavailable included, and explains transport failures in plain words. See istek.