{"record":{"id":"a4bfd71b8244f03c","repo":"XX-net/XX-Net","slug":"req-s-get-response-timeout-a4bfd7","errorCode":null,"errorMessage":"req %s get response timeout","messagePattern":"req (.+?) get response timeout","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"code/default/x_tunnel/local/seley_front/front.py","lineNumber":76,"sourceCode":"        self.logger.debug(\"set_hosts:%s\", hosts)\n\n        self.http_dispatcher.start_connect_all_ips()\n\n    def get_dispatcher(self, host=None):\n        if len(self.ip_manager.hosts) == 0:\n            return None\n\n        return self.http_dispatcher\n\n    def request(self, method, host, path=\"/\", headers={}, data=\"\", timeout=120):\n        headers = dict(headers)\n        headers[\"XX-Account\"] = self.account\n        headers[\"X-Host\"] = host\n        headers[\"X-Path\"] = path\n\n        response = self.http_dispatcher.request(method, host, \"/\", dict(headers), data, timeout=timeout)\n        if not response:\n            logger.warn(\"req %s get response timeout\", path)\n            return \"\", 602, {}\n\n        status = response.status\n        content = response.task.read_all()\n        if status == 200:\n            logger.debug(\"%s %s%s send:%d recv:%d trace:%s\", method, host, path, len(data), len(content),\n                       response.task.get_trace())\n        else:\n            logger.warn(\"%s %s%s status:%d trace:%s\", method, host, path, status,\n                       response.task.get_trace())\n        return content, status, response\n\n    def stop(self):\n        logger.info(\"terminate\")\n        self.connect_manager.set_ssl_created_cb(None)\n        self.http_dispatcher.stop()\n        self.connect_manager.stop()\n","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/XX-net/XX-Net/blob/cfa5bc17b67676e467f37ec50766127e0ab5f0aa/code/default/x_tunnel/local/seley_front/front.py#L58-L94","documentation":"Logged by the seley_front HTTP front-end request() when http_dispatcher.request() returns a falsy response within the given timeout — i.e. no HTTP response object came back at all. The method then returns a synthetic ('', 602, {}) result. 602 here is a client-side pseudo-status meaning 'no response / dispatcher timeout', not a real HTTP status.","triggerScenarios":"Calling SeleyFront.request(method, host, path, ...) (or .get) when the underlying dispatcher cannot deliver the request within `timeout`: connection to the relay cannot be established, all connections busy/dead, or the relay never answers. `response` comes back None/empty.","commonSituations":"Relay server down or unreachable, SSL connection pool exhausted, timeouts set too low for slow targets, or GFW/firewall blocking the tunnel endpoints.","solutions":["Check that the target host and the seley relay endpoints are reachable (test with curl/ping from the same machine).","Increase the `timeout` argument passed to request() for slow endpoints.","Inspect connect_manager/connection pool state; restart the front-end if connections are stuck. The 602 return value lets callers implement fallback routing."],"exampleFix":"// before\ncontent, status, res = front.request('GET', host, path, timeout=10)\nif status == 602:\n    raise RuntimeError('no response')\n\n// after\ncontent, status, res = front.request('GET', host, path, timeout=30)\nif status == 602:\n    content, status, res = front.request('GET', host, path, timeout=30)  # one retry\nif status == 602:\n    raise RuntimeError('relay unreachable for %s%s' % (host, path))","handlingStrategy":"retry","validationCode":"# probe relay reachability before the real request\ncontent, status, resp = front.get(relay_health_host, '/health', timeout=5)\nif status == 602:\n    use_seley = False  # fall back to direct/other front-end","typeGuard":null,"tryCatchPattern":"# treat 602 as retryable, others as final\nfor attempt in range(2):\n    content, status, resp = front.request(method, host, path, timeout=timeout)\n    if status != 602:\n        break\n    time.sleep(1 * (attempt + 1))","preventionTips":["Handle the synthetic 602 return explicitly — it is not a real HTTP status.","Set realistic timeouts for slow upstreams.","Health-check the relay periodically and rotate endpoints."],"tags":["seley","http","timeout","no-response","relay"],"backgroundTag":"upstream-timeout","analyzedSha":"cfa5bc17b67676e467f37ec50766127e0ab5f0aa","analyzedAt":"2026-08-27T19:28:28.225Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}