{"record":{"id":"64d43bb9d477aa4c","repo":"XX-net/XX-Net","slug":"connect-fail","errorCode":null,"errorMessage":"connect fail","messagePattern":"connect fail","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"code/default/x_tunnel/local/cloudflare_front/check_ip.py","lineNumber":180,"sourceCode":"    # print(\"Usage: check_ip.py [ip] [top_domain] [wait_time=0]\")\n    xlog.info(\"test ip:%s\", ip)\n    xlog.info(\"host:%s\", host)\n    xlog.info(\"sni:%s\", sni)\n\n    wait_time = 0\n\n    ca_certs = os.path.join(current_path, \"cacert.pem\")\n    openssl_context = SSLContext(logger, ca_certs=ca_certs)\n    host_manager = HostManagerBase()\n    connect_creator = ConnectCreator(logger, config, openssl_context, host_manager, debug=True)\n    check_ip = CheckIp(logger, config, connect_creator)\n\n    #check_all_domain(check_ip)\n    #check_all_ip(check_ip)\n\n    res = check_ip.check_ip(ip, sni=sni, host=host, wait_time=wait_time)\n    if not res:\n        xlog.warn(\"connect fail\")\n    elif res.ok:\n        xlog.info(\"success, domain:%s handshake:%d\", res.host, res.handshake_time)\n    else:\n        xlog.warn(\"not support\")\n\n    front.stop()\n    sys.exit(0)\n","sourceCodeStart":162,"sourceCodeEnd":188,"githubUrl":"https://github.com/XX-net/XX-Net/blob/cfa5bc17b67676e467f37ec50766127e0ab5f0aa/code/default/x_tunnel/local/cloudflare_front/check_ip.py#L162-L188","documentation":"CLI main of the cloudflare check_ip tool: check_ip(...) returned None, meaning no connection result was produced within the wait time (connect attempt failed outright).","triggerScenarios":"Running check_ip.py as a script with an ip/sni/host that cannot be reached or handshake never completes within wait_time.","commonSituations":"Testing a dead IP, wrong port blocked by firewall, or wait_time too short.","solutions":["Increase wait_time","Verify the IP/port are reachable (ping/telnet)","Confirm SNI/domain is served by that IP"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"import socket\nsocket.setdefaulttimeout(10)\nassert socket.gethostbyname(ip)  # IP resolvable/reachable baseline","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Increase wait_time for slow links","Pre-verify IP reachability before full handshake check"],"tags":["cloudflare","ip-check","connect-failed","tooling"],"backgroundTag":"ip-health-check-failed","analyzedSha":"cfa5bc17b67676e467f37ec50766127e0ab5f0aa","analyzedAt":"2026-08-27T19:28:28.225Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}