{
  "id": "dotnet/grpc-unavailable-connectivity",
  "signature": "Grpc.Core.RpcException: Status(StatusCode=\"Unavailable\", Detail=\"failed to connect to all addresses; last error: UNKNOWN: ipv4:192.168.1.1:443: No connection could be made because the target machine actively refused it.\")",
  "signature_zh": "Grpc.Core.RpcException: Status(StatusCode=\"Unavailable\", Detail=\"无法连接到所有地址；最后一个错误：UNKNOWN: ipv4:192.168.1.1:443: 无法建立连接，因为目标计算机主动拒绝了连接。\")",
  "regex": "StatusCode=\"Unavailable\".*actively refused it",
  "domain": "dotnet",
  "category": "network_error",
  "subcategory": null,
  "root_cause": "The gRPC client cannot reach the server because the server is not running, the port is blocked by a firewall, or the endpoint address is incorrect.",
  "root_cause_type": "generic",
  "root_cause_zh": "gRPC 客户端无法到达服务器，因为服务器未运行、端口被防火墙阻止或端点地址不正确。",
  "versions": [
    {
      "version": "net6.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "net7.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "net8.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "net9.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Increasing the deadline or timeout in the gRPC call",
      "why_fails": "The server is not responding at all; a longer timeout only delays the failure but does not establish a connection.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "Disabling SSL/TLS on the client side",
      "why_fails": "If the server requires HTTPS, disabling TLS will cause a different error (e.g., protocol mismatch), not fix the connection refusal.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "Changing the port number arbitrarily",
      "why_fails": "Unless the correct port is used, the connection will still be refused; this is a guess rather than a fix.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Verify the server is running and listening on the expected port. Use 'netstat -an | findstr :443' (Windows) or 'ss -tuln | grep 443' (Linux) to check. Restart the gRPC server service if needed.",
      "success_rate": 0.9,
      "how": "Verify the server is running and listening on the expected port. Use 'netstat -an | findstr :443' (Windows) or 'ss -tuln | grep 443' (Linux) to check. Restart the gRPC server service if needed.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Check firewall rules. For Windows, run 'netsh advfirewall firewall add rule name=\"gRPC\" dir=in action=allow protocol=TCP localport=443'. For Linux, use 'ufw allow 443/tcp' or adjust iptables.",
      "success_rate": 0.85,
      "how": "Check firewall rules. For Windows, run 'netsh advfirewall firewall add rule name=\"gRPC\" dir=in action=allow protocol=TCP localport=443'. For Linux, use 'ufw allow 443/tcp' or adjust iptables.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Ensure the client endpoint URL matches the server's listening address. For example, if the server uses 'https://localhost:5001', the client should set 'new GrpcChannel.ForAddress(\"https://localhost:5001\")'. Use DNS resolution with 'nslookup server.example.com' to verify IP.",
      "success_rate": 0.8,
      "how": "Ensure the client endpoint URL matches the server's listening address. For example, if the server uses 'https://localhost:5001', the client should set 'new GrpcChannel.ForAddress(\"https://localhost:5001\")'. Use DNS resolution with 'nslookup server.example.com' to verify IP.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Verify the server is running and listening on the expected port. Use 'netstat -an | findstr :443' (Windows) or 'ss -tuln | grep 443' (Linux) to check. Restart the gRPC server service if needed.",
    "Check firewall rules. For Windows, run 'netsh advfirewall firewall add rule name=\"gRPC\" dir=in action=allow protocol=TCP localport=443'. For Linux, use 'ufw allow 443/tcp' or adjust iptables.",
    "Ensure the client endpoint URL matches the server's listening address. For example, if the server uses 'https://localhost:5001', the client should set 'new GrpcChannel.ForAddress(\"https://localhost:5001\")'. Use DNS resolution with 'nslookup server.example.com' to verify IP."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://learn.microsoft.com/en-us/aspnet/core/grpc/troubleshoot?view=aspnetcore-8.0",
  "official_doc_section": null,
  "error_code": "Unavailable",
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.85,
  "resolvable": "true",
  "first_seen": "2023-04-01",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}