go auth_error ai_generated true

rpc 错误:代码 = 不可用,描述 = 连接错误:描述 = "传输:认证握手失败:x509:由未知机构签名的证书"

rpc error: code = Unavailable desc = connection error: desc = "transport: authentication handshake failed: x509: certificate signed by unknown authority"

ID: go/grpc-tls-certificate-error

其他格式: JSON · Markdown 中文 · English
80%修复率
87%置信度
0证据数
2024-02-15首次发现

版本兼容性

版本状态引入弃用备注
1.60.0 active

根因分析

客户端无法验证服务器的 TLS 证书,因为 CA 不受信任。

English

The client cannot verify the server's TLS certificate because the CA is not trusted.

generic

解决方案

  1. 95% 成功率
    Add the server's CA certificate to the client's trust pool using credentials.NewClientTLSFromFile.
  2. 90% 成功率
    Use the system root CA pool by ensuring the server uses a publicly trusted certificate.

无效尝试

常见但无效的做法:

  1. 90% 失败

  2. 80% 失败