grpc
network_error
ai_generated
true
不可用: grpc: Envoy UDS 连接失败: /tmp/envoy.sock
UNAVAILABLE: grpc: Envoy UDS connection failed: /tmp/envoy.sock
ID: grpc/grpc-envoy-uds-connection-failed
85%修复率
88%置信度
1证据数
2024-04-01首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| envoy 1.29.0 | active | — | — | — |
| grpc-go 1.63.0 | active | — | — | — |
| grpc-python 1.61.0 | active | — | — | — |
| Istio 1.20.0 | active | — | — | — |
根因分析
gRPC 客户端无法通过 Unix Domain Socket 连接到 Envoy,原因是套接字文件缺失、权限问题或 Envoy 未监听。
English
gRPC client cannot connect to Envoy via Unix Domain Socket due to socket file missing, permissions issues, or Envoy not listening.
官方文档
https://www.envoyproxy.io/docs/envoy/latest/configuration/listeners/listeners解决方案
-
Verify the UDS socket exists and has correct permissions. Run: ls -la /tmp/envoy.sock If missing, check Envoy logs for startup errors: envoy -c envoy.yaml --log-level debug Ensure the socket path in Envoy config matches the client path. Example Envoy config: listeners: - name: grpc_listener address: pipe: path: /tmp/envoy.sock filter_chains: - filters: - name: envoy.filters.network.http_connection_manager typed_config: ... -
If permissions are wrong, change them: sudo chmod 777 /tmp/envoy.sock Or run Envoy with the same user as the gRPC client to avoid permission issues.
无效尝试
常见但无效的做法:
-
90% 失败
Envoy is configured to listen on a specific socket path; changing client path without updating Envoy causes mismatch.
-
75% 失败
This bypasses UDS but may introduce network overhead and requires Envoy to be configured for TCP as well.