{
  "id": "python/httpx-connecttimeout-firewall-block",
  "signature": "httpx.ConnectTimeout: Connection timed out after 5000ms to host 'api.example.com' (Connection refused)",
  "signature_zh": "httpx.ConnectTimeout: 连接到主机'api.example.com'超时（5000毫秒后），连接被拒绝",
  "regex": "httpx\\.ConnectTimeout:\\ Connection\\ timed\\ out\\ after\\ 5000ms\\ to\\ host\\ 'api\\.example\\.com'\\ \\(Connection\\ refused\\)",
  "domain": "python",
  "category": "network_error",
  "subcategory": null,
  "root_cause": "The remote server is actively refusing the connection, often due to firewall rules or the service not running.",
  "root_cause_type": "generic",
  "root_cause_zh": "远程服务器主动拒绝连接，通常是由于防火墙规则或服务未运行。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Increasing timeout to wait longer",
      "why_fails": "The connection is refused immediately, so a longer timeout does not help.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "Retrying with the same parameters",
      "why_fails": "The server continues to refuse connections until the underlying issue is resolved.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Check if the server is reachable via telnet or ping",
      "success_rate": 0.8,
      "how": "telnet api.example.com 443\n# If refused, contact server administrator or check firewall rules",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use a different port or protocol if available",
      "success_rate": 0.6,
      "how": "httpx.get('http://api.example.com:8080')  # if alternative port exists",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.87,
  "fix_success_rate": 0.8,
  "resolvable": "partial",
  "first_seen": "2024-08-30",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}