# rpc 错误：code = Unavailable desc = 名称解析器错误：产生了零个地址

- **ID:** `go/grpc-failed-to-exit-idle`
- **领域:** go
- **类别:** network_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

名称解析器（DNS 或自定义）为目标返回了零个地址。通常是目标字符串拼写错误、DNS 失败，或解析器尚未收到更新。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 1.x | active | — | — |

## 解决方案

1. **** (90% 成功率)
   ```
   Verify the target format: use dns:///host:port or passthrough:///host:port explicitly, and check that the hostname resolves with net.LookupHost.
   ```
2. **** (85% 成功率)
   ```
   For custom resolvers, implement the Resolver interface correctly and call cc.UpdateState with a non-empty Addresses slice; add logging in Build to confirm resolution.
   ```

## 无效尝试

- **** — Bypassing the resolver breaks load balancing and service discovery, and the IP may change. (60% 失败率)
- **** — If the resolver genuinely returns zero addresses, waiting longer does not produce addresses. (75% 失败率)
