{
  "id": "grpc/load-balancing-policy-not-found",
  "signature": "UNAVAILABLE: grpc: load balancing policy \"round_robin\" not found",
  "signature_zh": "UNAVAILABLE: grpc: 负载均衡策略 \"round_robin\" 未找到",
  "regex": "UNAVAILABLE: grpc: load balancing policy .* not found",
  "domain": "grpc",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "The specified load balancing policy is not registered in the gRPC client, often because the corresponding resolver plugin is missing or the policy name is misspelled.",
  "root_cause_type": "generic",
  "root_cause_zh": "指定的负载均衡策略未在 gRPC 客户端中注册，通常是因为缺少相应的解析器插件或策略名称拼写错误。",
  "versions": [
    {
      "version": "gRPC v1.57.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "gRPC v1.61.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "gRPC v1.66.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Changing the target URI to use a different scheme like 'dns://'.",
      "why_fails": "The error is about the load balancing policy, not the resolver scheme; changing the scheme does not register the policy.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "Setting the environment variable GRPC_LB_POLICY to a random string.",
      "why_fails": "Environment variables do not register custom policies; they only configure built-in ones.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "Reinstalling the gRPC package without updating the policy registration code.",
      "why_fails": "The policy must be explicitly imported or registered in code; reinstalling does not add missing plugins.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Register the 'round_robin' policy by importing the load balancer plugin: `import grpc.experimental; grpc.experimental.register_load_balancer('round_robin', grpc.experimental.RoundRobinLoadBalancer)`",
      "success_rate": 0.95,
      "how": "Register the 'round_robin' policy by importing the load balancer plugin: `import grpc.experimental; grpc.experimental.register_load_balancer('round_robin', grpc.experimental.RoundRobinLoadBalancer)`",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use a built-in policy like 'pick_first' (default) by removing the custom LB policy from the client configuration: `channel = grpc.insecure_channel(target)`",
      "success_rate": 0.9,
      "how": "Use a built-in policy like 'pick_first' (default) by removing the custom LB policy from the client configuration: `channel = grpc.insecure_channel(target)`",
      "condition": "",
      "sources": []
    },
    {
      "action": "If using a service config, ensure the policy name matches exactly (case-sensitive) and is supported by the gRPC version, e.g., `{\"loadBalancingConfig\": [{\"round_robin\": {}}]}`.",
      "success_rate": 0.85,
      "how": "If using a service config, ensure the policy name matches exactly (case-sensitive) and is supported by the gRPC version, e.g., `{\"loadBalancingConfig\": [{\"round_robin\": {}}]}`.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Register the 'round_robin' policy by importing the load balancer plugin: `import grpc.experimental; grpc.experimental.register_load_balancer('round_robin', grpc.experimental.RoundRobinLoadBalancer)`",
    "Use a built-in policy like 'pick_first' (default) by removing the custom LB policy from the client configuration: `channel = grpc.insecure_channel(target)`",
    "If using a service config, ensure the policy name matches exactly (case-sensitive) and is supported by the gRPC version, e.g., `{\"loadBalancingConfig\": [{\"round_robin\": {}}]}`."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://grpc.io/docs/guides/load-balancing/",
  "official_doc_section": null,
  "error_code": "ELBNOTFOUND",
  "verification_tier": "ai_generated",
  "confidence": 0.9,
  "fix_success_rate": 0.95,
  "resolvable": "true",
  "first_seen": "2024-02-05",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}