# 错误：加载服务配置失败：未找到 "my.service.MyService" 的服务配置

- **ID:** `go/grpc-service-config-not-found`
- **领域:** go
- **类别:** config_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

gRPC 客户端尝试从命名系统或文件加载服务配置，但该配置不存在。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 1.14 | active | — | — |

## 解决方案

1. **Provide the service config in the client dial options** (90% 成功率)
   ```
   grpc.WithDefaultServiceConfig(`{"loadBalancingPolicy":"round_robin"}`)
   ```
2. **Use a resolver that provides the config** (80% 成功率)
   ```
   // Implement a custom resolver or use a DNS resolver with SRV records
   ```

## 无效尝试

- **Ignore the error and use default settings** — The service may rely on specific config for load balancing or timeouts. (60% 失败率)
- **Create a dummy service config** — It may not match the actual service and cause unexpected behavior. (70% 失败率)
