{
  "id": "dotnet/grpc-client-ssl-error",
  "signature": "Grpc.Core.RpcException: Status(StatusCode=\"Unavailable\", Detail=\"failed to connect to all addresses; last error: UNKNOWN: No match found for server name\")",
  "signature_zh": "Grpc.Core.RpcException: Status(StatusCode=\"Unavailable\", Detail=\"无法连接到所有地址；最后一个错误：UNKNOWN: 未找到服务器名称匹配\")",
  "regex": "No match found for server name",
  "domain": "dotnet",
  "category": "network_error",
  "subcategory": null,
  "root_cause": "gRPC client SSL/TLS handshake fails because the server certificate's Subject Alternative Name (SAN) does not match the hostname used in the client channel address.",
  "root_cause_type": "generic",
  "root_cause_zh": "gRPC 客户端 SSL/TLS 握手失败，因为服务器证书的主题备用名称 (SAN) 与客户端通道地址中使用的主机名不匹配。",
  "versions": [
    {
      "version": "Grpc.Net.Client 2.49.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Grpc.Net.Client 2.50.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Grpc.Net.Client 2.51.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Grpc.Net.Client 2.52.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Disabling SSL validation entirely (using HttpClientHandler.ServerCertificateCustomValidationCallback) creates security vulnerability and doesn't fix SAN mismatch.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Using IP address instead of hostname in channel address still fails if certificate doesn't have IP SAN.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Setting GRPC_DNS_RESOLVER environment variable doesn't affect SSL certificate validation.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Ensure the server certificate's SAN includes the exact hostname used in the client channel address (e.g., myserver.local).",
      "success_rate": 0.9,
      "how": "Ensure the server certificate's SAN includes the exact hostname used in the client channel address (e.g., myserver.local).",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use the correct hostname in the gRPC channel, matching the certificate SAN, especially when behind a load balancer.",
      "success_rate": 0.85,
      "how": "Use the correct hostname in the gRPC channel, matching the certificate SAN, especially when behind a load balancer.",
      "condition": "",
      "sources": []
    },
    {
      "action": "If using self-signed certificates for development, add the certificate to trusted root store and use matching hostname.",
      "success_rate": 0.7,
      "how": "If using self-signed certificates for development, add the certificate to trusted root store and use matching hostname.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Ensure the server certificate's SAN includes the exact hostname used in the client channel address (e.g., myserver.local).",
    "Use the correct hostname in the gRPC channel, matching the certificate SAN, especially when behind a load balancer.",
    "If using self-signed certificates for development, add the certificate to trusted root store and use matching hostname."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://learn.microsoft.com/en-us/aspnet/core/grpc/troubleshoot?view=aspnetcore-8.0#ssl-errors",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.81,
  "fix_success_rate": 0.8,
  "resolvable": "partial",
  "first_seen": "2024-01-05",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}