go
network_error
ai_generated
partial
rpc error: code = Internal desc = transport: received unexpected HTTP/2 frame of type HEADERS on stream 3
ID: go/grpc-internal-http2-frame-error
80%Fix Rate
82%Confidence
0Evidence
2024-07-03First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 1.50+ | active | — | — | — |
Root Cause
A proxy or load balancer between client and server is corrupting or reordering HTTP/2 frames, often an L7 proxy that does not speak HTTP/2 correctly or is terminating TLS and downgrading to HTTP/1.1.
generic中文
客户端与服务端之间的代理或负载均衡器破坏或重排了 HTTP/2 帧,通常是 L7 代理未正确支持 HTTP/2,或终止 TLS 后降级为 HTTP/1.1。
Workarounds
-
85% success
// nginx example // listen 50051 http2; // proxy_http_version 1.1; // WRONG for gRPC // proxy_set_header Connection ""; // use grpc_pass grpc://backend:50051;
-
80% success
conn, err := grpc.Dial("backend:50051", grpc.WithTransportCredentials(insecure.NewCredentials())) // if direct works, replace L7 proxy with Envoy/Linkerd or gRPC-native LB
Dead Ends
Common approaches that don't work:
-
85% fail
The error is about frame ordering, not message size; the limit has no effect on frame parsing.
-
80% fail
Blocking dial only affects connection establishment, not post-connect frame handling.