{
  "id": "python/requests-connectionerror-dns-failure",
  "signature": "requests.exceptions.ConnectionError: HTTPConnectionPool(host='nonexistent.example.com', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x...>: Failed to establish a new connection: [Errno -2] Name or service not known'))",
  "signature_zh": "requests.exceptions.ConnectionError: HTTPConnectionPool(host='nonexistent.example.com', port=80): 超过最大重试次数 (由NewConnectionError('<urllib3.connection.HTTPConnection object at 0x...>: 无法建立新连接：[Errno -2] 名称或服务未知')引起)",
  "regex": "requests\\.exceptions\\.ConnectionError:\\ HTTPConnectionPool\\(host='nonexistent\\.example\\.com',\\ port=80\\):\\ Max\\ retries\\ exceeded\\ with\\ url:\\ /\\ \\(Caused\\ by\\ NewConnectionError\\('<urllib3\\.connection\\.HTTPConnection\\ object\\ at\\ 0x\\.\\.\\.>:\\ Failed\\ to\\ establish\\ a\\ new\\ connection:\\ \\[Errno\\ \\-2\\]\\ Name\\ or\\ service\\ not\\ known'\\)\\)",
  "domain": "python",
  "category": "network_error",
  "subcategory": null,
  "root_cause": "The hostname cannot be resolved to an IP address because it does not exist or DNS is misconfigured.",
  "root_cause_type": "generic",
  "root_cause_zh": "主机名无法解析为IP地址，因为它不存在或DNS配置错误。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Increasing the retry count",
      "why_fails": "Retrying does not fix DNS resolution; the hostname remains unresolved.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "Using a VPN or proxy without checking DNS",
      "why_fails": "A VPN may change DNS servers, but if the hostname is invalid, it still fails.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Verify the hostname spelling and domain existence",
      "success_rate": 0.9,
      "how": "Check the URL for typos, e.g., requests.get('https://example.com') instead of 'exampl.com'",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use a public DNS server like 8.8.8.8",
      "success_rate": 0.8,
      "how": "Configure system DNS to 8.8.8.8 or use socket.setdefaulttimeout(10) with a custom resolver",
      "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.84,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-05-12",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}