XX-net/XX-Net · warning
req %s get response timeout
Error message
req %s get response timeout
What it means
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.
Source
Thrown at code/default/x_tunnel/local/seley_front/front.py:76
self.logger.debug("set_hosts:%s", hosts)
self.http_dispatcher.start_connect_all_ips()
def get_dispatcher(self, host=None):
if len(self.ip_manager.hosts) == 0:
return None
return self.http_dispatcher
def request(self, method, host, path="/", headers={}, data="", timeout=120):
headers = dict(headers)
headers["XX-Account"] = self.account
headers["X-Host"] = host
headers["X-Path"] = path
response = self.http_dispatcher.request(method, host, "/", dict(headers), data, timeout=timeout)
if not response:
logger.warn("req %s get response timeout", path)
return "", 602, {}
status = response.status
content = response.task.read_all()
if status == 200:
logger.debug("%s %s%s send:%d recv:%d trace:%s", method, host, path, len(data), len(content),
response.task.get_trace())
else:
logger.warn("%s %s%s status:%d trace:%s", method, host, path, status,
response.task.get_trace())
return content, status, response
def stop(self):
logger.info("terminate")
self.connect_manager.set_ssl_created_cb(None)
self.http_dispatcher.stop()
self.connect_manager.stop()
View on GitHub (pinned to cfa5bc17b6)
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.
Example fix
// before
content, status, res = front.request('GET', host, path, timeout=10)
if status == 602:
raise RuntimeError('no response')
// after
content, status, res = front.request('GET', host, path, timeout=30)
if status == 602:
content, status, res = front.request('GET', host, path, timeout=30) # one retry
if status == 602:
raise RuntimeError('relay unreachable for %s%s' % (host, path)) Defensive patterns
Strategy: retry
Validate before calling
# probe relay reachability before the real request
content, status, resp = front.get(relay_health_host, '/health', timeout=5)
if status == 602:
use_seley = False # fall back to direct/other front-end Try / catch
# treat 602 as retryable, others as final
for attempt in range(2):
content, status, resp = front.request(method, host, path, timeout=timeout)
if status != 602:
break
time.sleep(1 * (attempt + 1)) Prevention
- 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.
When it happens
Trigger: 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.
Common situations: Relay server down or unreachable, SSL connection pool exhausted, timeouts set too low for slow targets, or GFW/firewall blocking the tunnel endpoints.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
AI-assisted analysis of XX-net/XX-Net@cfa5bc17b6 (2026-08-27).
Data as JSON: /api/errors/a4bfd71b8244f03c.
Report an issue: GitHub.