{
  "id": "grpc/tls-certificate-expiration",
  "signature": "UNAVAILABLE: grpc: TLS handshake failed: certificate has expired",
  "signature_zh": "不可用：gRPC TLS 握手失败：证书已过期",
  "regex": "UNAVAILABLE: grpc: TLS handshake failed: certificate has expired",
  "domain": "grpc",
  "category": "auth_error",
  "subcategory": null,
  "root_cause": "The TLS certificate used by the gRPC server (or client in mutual TLS) has passed its expiry date, causing the handshake to fail.",
  "root_cause_type": "generic",
  "root_cause_zh": "gRPC 服务器（或双向 TLS 中的客户端）使用的 TLS 证书已过有效期，导致握手失败。",
  "versions": [
    {
      "version": "gRPC v1.48.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "gRPC v1.58.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "gRPC v1.64.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "This bypasses hostname verification but not certificate expiration; the handshake still fails because the certificate itself is invalid.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "SSL session caching affects performance, not certificate validation; expiration is checked during full handshake.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The expired certificate remains the same; restarting does not fix the expiration date.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Renew the TLS certificate: generate a new certificate with `openssl req -x509 -newkey rsa:4096 -keyout server_key.pem -out server_cert.pem -days 365 -nodes`, then restart the gRPC server with the new files.",
      "success_rate": 0.96,
      "how": "Renew the TLS certificate: generate a new certificate with `openssl req -x509 -newkey rsa:4096 -keyout server_key.pem -out server_cert.pem -days 365 -nodes`, then restart the gRPC server with the new files.",
      "condition": "",
      "sources": []
    },
    {
      "action": "If using Let's Encrypt, run `certbot renew` to automatically renew certificates, then reload the gRPC server (e.g., `kill -HUP <pid>` or restart the process).",
      "success_rate": 0.9,
      "how": "If using Let's Encrypt, run `certbot renew` to automatically renew certificates, then reload the gRPC server (e.g., `kill -HUP <pid>` or restart the process).",
      "condition": "",
      "sources": []
    },
    {
      "action": "As a temporary emergency fix, set the system clock back to within the certificate's validity period (not recommended for production), then restart the server.",
      "success_rate": 0.6,
      "how": "As a temporary emergency fix, set the system clock back to within the certificate's validity period (not recommended for production), then restart the server.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "续期 TLS 证书：使用 `openssl req -x509 -newkey rsa:4096 -keyout server_key.pem -out server_cert.pem -days 365 -nodes` 生成新证书，然后重启 gRPC 服务器。",
    "如果使用 Let's Encrypt，运行 `certbot renew` 自动续期证书，然后重新加载 gRPC 服务器（如 `kill -HUP <pid>` 或重启进程）。",
    "作为临时紧急修复，将系统时钟调回证书有效期范围内（不推荐用于生产），然后重启服务器。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://grpc.io/docs/guides/auth/#tls",
  "official_doc_section": null,
  "error_code": "GRPC_TLS_CERT_EXPIRED",
  "verification_tier": "ai_generated",
  "confidence": 0.92,
  "fix_success_rate": 0.96,
  "resolvable": "true",
  "first_seen": "2024-08-12",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}