{"record":{"id":"928ecabfe15201a5","repo":"XX-net/XX-Net","slug":"front-retry-s-s","errorCode":null,"errorMessage":"front retry %s%s","messagePattern":"front retry (.+?)(.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"code/default/x_tunnel/local/front_dispatcher.py","lineNumber":190,"sourceCode":"        if get_front_time > 0.1:\n            xlog.warn(\"get_front_time: %f for %s %s %s\", get_front_time, method, host, path)\n\n        if host == \"dns.xx-net.org\" and front == cloudflare_front and g.server_host:\n            # share the x-tunnel connection with dns.xx-net.org\n            # x-tunnel server will forward the request to dns.xx-net.org\n            if g.server_host:\n                host = g.server_host\n\n        headers[\"X-Async\"] = \"1\"\n        if len(data) < 84:\n            padding = utils.to_str(utils.generate_random_lowercase(random.randint(8, 64)))\n            headers[\"Padding\"] = padding\n\n        content, status, response = front.request(\n            method, host=host, path=path, headers=dict(headers), data=data, timeout=timeout)\n\n        if status not in [200, 521, 400, 404]:\n            xlog.warn(\"front retry %s%s\", host, path)\n            time.sleep(1)\n            continue\n\n        header_len = int(response.headers.get(b\"Content-Length\", 0))\n        if header_len and len(content) != header_len:\n            xlog.warn(\"response length incorrect, head len:%s, content len:%d retry it\", header_len, len(content))\n            time.sleep(1)\n            continue\n\n        return content, status, response\n\n    return content, status, response\n\n\ndef set_session_host(host):\n    global session_fronts\n    for front in session_fronts:\n        dispatcher = front.get_dispatcher(host)","sourceCodeStart":172,"sourceCodeEnd":208,"githubUrl":"https://github.com/XX-net/XX-Net/blob/cfa5bc17b67676e467f37ec50766127e0ab5f0aa/code/default/x_tunnel/local/front_dispatcher.py#L172-L208","documentation":"The selected front returned an unexpected HTTP status (anything other than 200/521/400/404, e.g. 403, 5xx, 602), so front_dispatcher sleeps 1s and retries with another front. Repeated occurrences mean fronts are systematically failing.","triggerScenarios":"front.request returns 403 (front blocked), 500/502 (worker backend error), 602 (front-level failure) — dispatcher then loops.","commonSituations":"CloudFront/GAE IP fronts blocked by firewall, worker quota exhausted, or upstream xx-net server erroring.","solutions":["Inspect the accompanying per-front warnings (error 220) to see the status/trace","Update/rotate front domains via the front updater","Verify server-side health and account quota if all fronts return 5xx"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Rotate front domains regularly","Watch for 403 waves indicating blocks"],"tags":["x-tunnel","retry","front","http-status"],"backgroundTag":"upstream-http-error","analyzedSha":"cfa5bc17b67676e467f37ec50766127e0ab5f0aa","analyzedAt":"2026-08-27T19:28:28.225Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}