go
auth_error
ai_generated
true
rpc error: code = Unavailable desc = connection closed: tls: failed to verify certificate: x509: certificate has expired or is not yet valid
ID: go/grpc-tls-certificate-expired
80%Fix Rate
84%Confidence
0Evidence
2024-08-05First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 1.2 | active | — | — | — |
Root Cause
The TLS certificate used by the gRPC server has expired or is not yet valid.
generic中文
gRPC服务器使用的TLS证书已过期或尚未生效。
Workarounds
-
95% success Renew the TLS certificate and reload the server.
openssl x509 -req -in server.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out server.crt -days 365
-
90% success Use insecure connection temporarily for debugging.
conn, err := grpc.Dial(address, grpc.WithInsecure())
Dead Ends
Common approaches that don't work:
-
Restart the gRPC server without changing certificates.
100% fail
Expired certificate remains invalid after restart.
-
Set system time back to make certificate valid.
50% fail
Breaks other services and is a security risk.