grpc
network_error
ai_generated
true
UNAVAILABLE: grpc: Envoy UDS connection failed: /tmp/envoy.sock
ID: grpc/grpc-envoy-uds-connection-failed
85%Fix Rate
88%Confidence
1Evidence
2024-04-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| envoy 1.29.0 | active | — | — | — |
| grpc-go 1.63.0 | active | — | — | — |
| grpc-python 1.61.0 | active | — | — | — |
| Istio 1.20.0 | active | — | — | — |
Root Cause
gRPC client cannot connect to Envoy via Unix Domain Socket due to socket file missing, permissions issues, or Envoy not listening.
generic中文
gRPC 客户端无法通过 Unix Domain Socket 连接到 Envoy,原因是套接字文件缺失、权限问题或 Envoy 未监听。
Official Documentation
https://www.envoyproxy.io/docs/envoy/latest/configuration/listeners/listenersWorkarounds
-
90% success 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: ...
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: ... -
80% success 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.
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.
中文步骤
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.
Dead Ends
Common approaches that don't work:
-
90% fail
Envoy is configured to listen on a specific socket path; changing client path without updating Envoy causes mismatch.
-
75% fail
This bypasses UDS but may introduce network overhead and requires Envoy to be configured for TCP as well.