{
  "id": "python/requests-connectionerror-connection-refused",
  "signature": "requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8080): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x...>: Failed to establish a new connection: [Errno 111] Connection refused'))",
  "signature_zh": "requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8080): 超过最大重试次数 (由NewConnectionError('<urllib3.connection.HTTPConnection object at 0x...>: 无法建立新连接：[Errno 111] 连接被拒绝')引起)",
  "regex": "requests\\.exceptions\\.ConnectionError:\\ HTTPConnectionPool\\(host='localhost',\\ port=8080\\):\\ Max\\ retries\\ exceeded\\ with\\ url:\\ /\\ \\(Caused\\ by\\ NewConnectionError\\('<urllib3\\.connection\\.HTTPConnection\\ object\\ at\\ 0x\\.\\.\\.>:\\ Failed\\ to\\ establish\\ a\\ new\\ connection:\\ \\[Errno\\ 111\\]\\ Connection\\ refused'\\)\\)",
  "domain": "python",
  "category": "network_error",
  "subcategory": null,
  "root_cause": "No service is listening on the specified host and port.",
  "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 the timeout value",
      "why_fails": "The connection is refused immediately, so timeout does not matter.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "Using a different protocol (e.g., HTTPS instead of HTTP)",
      "why_fails": "The port is not open for any protocol.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Start the server or ensure it is running on the correct port",
      "success_rate": 0.95,
      "how": "Check if the server is running: netstat -tulpn | grep 8080\n# Start the server if needed",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use a different port that the server is actually listening on",
      "success_rate": 0.8,
      "how": "requests.get('http://localhost:3000')  # if server runs on port 3000",
      "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.88,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2025-07-30",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}