{"record":{"id":"ca9d8bb97252366c","repo":"XX-net/XX-Net","slug":"s-s-to-s-d-try-loop-fail","errorCode":null,"errorMessage":"%s %s to %s:%d try_loop fail","messagePattern":"(.+?) (.+?) to (.+?):(.+?) try_loop fail","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"code/default/smart_router/local/smart_route.py","lineNumber":477,"sourceCode":"                xlog.info(\"%s %s:%d forward to socks\", scense, host, port)\n                if isinstance(sock, SocketWrap):\n                    _sock = sock._sock\n                else:\n                    _sock = sock\n                do_socks(_sock, host, port, client_address, left_buf)\n                return\n            elif rule == \"black\":\n                xlog.info(\"%s to:%s:%d black\", scense, host, port)\n                sock.close()\n                return\n            else:\n                xlog.error(\"%s %s:%d rule:%s unknown\", scense, host, port, host, rule)\n                sock.close()\n                return\n        except Exception as e:\n            xlog.exception(\"%s %s to %s:%d except:%r\", scense, rule, host, port, e)\n\n    xlog.warn(\"%s %s to %s:%d try_loop fail\", scense, rule_list, host, port)\n    sock.close()\n    return\n\n\ndef handle_ip_proxy(sock, ip, port, client_address):\n    xlog.debug(\"handle_ip_proxy to %s:%d from:%s:%d\", ip, port, client_address[0], client_address[1])\n\n    if not isinstance(sock, SocketWrap):\n        sock = SocketWrap(sock, client_address[0], client_address[1])\n\n    if port == 443:\n        try:\n            host = get_sni(sock)\n            if host and not utils.check_ip_valid(host):\n                xlog.debug(\"ip connect to %s:%d translate to %s\", ip, port, host)\n                return handle_domain_proxy(sock, host, port, client_address)\n        except SniNotExist as e:\n            xlog.debug(\"ip:%s:%d get sni fail\", ip, port)","sourceCodeStart":459,"sourceCodeEnd":495,"githubUrl":"https://github.com/XX-net/XX-Net/blob/cfa5bc17b67676e467f37ec50766127e0ab5f0aa/code/default/smart_router/local/smart_route.py#L459-L495","documentation":"Every rule in rule_list was tried and none succeeded (each either returned, raised, or hit a continue), so try_loop gives up: it logs the failure and closes the client socket.","triggerScenarios":"All candidate transports (direct, proxy, gae, x-tunnel...) for host:port failed — e.g. destination unreachable AND all proxies broken — exhausting rule_list.","commonSituations":"Total network outage, all configured proxies down, destination host blocking all routes, or misconfigured rule list matching nothing usable.","solutions":["Check basic connectivity to the target host:port from this machine","Verify at least one proxy/route in rule_list is healthy","Review routing rules for the domain and add a working fallback","Inspect earlier per-rule error logs to see which transport failed and why"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"if not any(rule_alive(r) for r in rule_list): fail_fast_with_reason()","typeGuard":null,"tryCatchPattern":"Catch per-rule exceptions; after exhaustion, close socket and surface which rules failed.","preventionTips":["Always keep one known-good fallback rule (e.g. direct or a working proxy)","Monitor health of all configured routes"],"tags":["routing","fallback-exhausted","network"],"backgroundTag":"all-routes-exhausted","analyzedSha":"cfa5bc17b67676e467f37ec50766127e0ab5f0aa","analyzedAt":"2026-08-27T19:28:28.225Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}