# rpc error: code = Unavailable desc = connection error: dial tcp: lookup host on 127.0.0.11:53: no such host

- **ID:** `go/grpc-unavailable-connection-error`
- **Domain:** go
- **Category:** network_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

DNS resolution fails for the target gRPC server hostname, often due to misconfigured DNS or incorrect hostname in the client connection string.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 1.22 | active | — | — |
| 1.23 | active | — | — |

## Workarounds

1. **Use IP address instead of hostname in the gRPC target.** (90% success)
   ```
   conn, err := grpc.Dial("192.168.1.100:50051", grpc.WithInsecure())
   ```
2. **Configure custom DNS resolver in Go net package.** (85% success)
   ```
   net.DefaultResolver = &net.Resolver{PreferGo: true, Dial: func(ctx context.Context, network, address string) (net.Conn, error) { d := net.Dialer{}; return d.DialContext(ctx, "udp", "8.8.8.8:53") }}
   ```

## Dead Ends

- **Retrying the same connection with backoff but not fixing DNS.** — DNS resolution remains broken; retries never succeed. (95% fail)
- **Changing port number in the dial string.** — The issue is hostname resolution, not port; changing port doesn't help. (98% fail)
