go config_error ai_generated true

rpc error: code = Unimplemented desc = unexpected HTTP status code received from server: 404 (Not Found); transport: received unexpected content-type "text/plain"

ID: go/grpc-code-unimplemented-proto-drift

Also available as: JSON · Markdown · 中文
80%Fix Rate
87%Confidence
0Evidence
2025-05-22First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
1.0+ active — — —

Root Cause

The client reached an HTTP server that is not a gRPC server (e.g., a plain HTTP reverse proxy, a misconfigured ingress, or an Envoy route not configured for gRPC). The server returned a text/plain 404 instead of gRPC frames.

generic

中文

客户端到达了一个非 gRPC 的 HTTP 服务端(例如普通 HTTP 反向代理、配置错误的 Ingress,或未配置 gRPC 的 Envoy 路由)。服务端返回了 text/plain 的 404,而非 gRPC 帧。

Workarounds

  1. 90% success
    // Kubernetes ingress-nginx:
    // annotations:
    //   nginx.ingress.kubernetes.io/backend-protocol: "GRPC"
    //   nginx.ingress.kubernetes.io/ssl-redirect: "true"
  2. 92% success
    // Use the gRPC service port (often 50051) rather than 8080/9090
    conn, _ := grpc.Dial("svc:50051", grpc.WithTransportCredentials(insecure.NewCredentials()))

Dead Ends

Common approaches that don't work:

  1. 95% fail

    The routing is misconfigured; retries always hit the same HTTP endpoint

  2. 90% fail

    The problem is HTTP/gRPC protocol mismatch, not TLS