# UNAVAILABLE: grpc: connection refused to backend service at 10.0.0.1:8080

- **ID:** `grpc/client-connection-refused`
- **Domain:** grpc
- **Category:** network_error
- **Verification:** ai_generated
- **Fix Rate:** 85%

## Root Cause

The gRPC client's attempt to connect to the backend service was refused because the service is not listening on the specified port or the port is blocked by a firewall.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| gRPC v1.48.0 | active | — | — |
| gRPC v1.54.0 | active | — | — |
| gRPC v1.60.0 | active | — | — |
| Envoy 1.26.0 | active | — | — |

## Workarounds

1. **Verify that the backend service is running and listening on the expected port: `netstat -tulpn | grep 8080` on the server.** (80% success)
   ```
   Verify that the backend service is running and listening on the expected port: `netstat -tulpn | grep 8080` on the server.
   ```
2. **Check firewall rules to ensure the port is open: `sudo ufw status` or `iptables -L -n` and add a rule if needed: `sudo ufw allow 8080/tcp`.** (85% success)
   ```
   Check firewall rules to ensure the port is open: `sudo ufw status` or `iptables -L -n` and add a rule if needed: `sudo ufw allow 8080/tcp`.
   ```
3. **Update the client's target URI to use a correct host or port if misconfigured, e.g., change from '10.0.0.1:8080' to '10.0.0.1:9090'.** (90% success)
   ```
   Update the client's target URI to use a correct host or port if misconfigured, e.g., change from '10.0.0.1:8080' to '10.0.0.1:9090'.
   ```

## Dead Ends

- **** — Restarting the client application without checking the backend service status does not resolve the connection refusal. (60% fail)
- **** — Increasing gRPC retry intervals in the client config may delay the error but does not fix the underlying service unavailability. (50% fail)
- **** — Clearing the local DNS cache does not help because the error indicates a TCP connection refusal, not a resolution failure. (70% fail)
