XX-net/XX-Net · warning

check fail:%s except:%r

Error message

check fail:%s except:%r

What it means

A worker thread in the IP checker caught an exception while calling check_ip for an IP/host pair; the IP is skipped. Note the log call passes 'e' into a two-placeholder format ('%s except:%r'), so output is slightly malformed.

Source

Thrown at code/default/x_tunnel/local/cloudflare_front/check_ip.py:109

                    continue

    def write_ip(self, ip, host, handshake):
        with self.lock:
            self.out_fd.write("%s %s gws %s 0 0\n" % (ip, host, handshake))
            self.out_fd.flush()

    def checker(self):
        while True:
            try:
                ip, handshake_time = self.get_ip()
            except Exception as e:
                xlog.info("no ip left")
                return

            try:
                res = self.check_ip.check_ip(ip, sni=host, host=host)
            except Exception as e:
                xlog.warn("check fail:%s except:%r", e)
                continue

            if not res or not res.ok:
                xlog.debug("check fail:%s fail", ip)
                continue

            self.write_ip(ip, res.domain, handshake_time)

    def run(self):
        for i in range(0, 10):
            threading.Thread(target=self.checker).start()


def check_all_ip(check_ip):

    HostManager(config, logger, default_domain_fn, domain_fn, front)
    check = CheckAllIp(check_ip, "scan1.half.autos")
    check.run()

View on GitHub (pinned to cfa5bc17b6)

Solutions

  1. Treat as expected when scanning unverified IPs
  2. Filter candidate IPs before scanning
  3. Fix log format string to ('%s except:%r', ip, e) for clarity

Example fix

// before
xlog.warn("check fail:%s except:%r", e)
// after
xlog.warn("check fail:%s except:%r", ip, e)
Defensive patterns

Strategy: try-catch

Try / catch

try:
    res = check_ip(ip, sni=host, host=host)
except Exception:
    continue  # skip bad IP

Prevention

When it happens

Trigger: checker() loop: check_ip(ip, sni=host, host=host) raises (DNS failure, TLS error, socket timeout).

Common situations: Checking many candidate IPs where some are unreachable or misbehave during TLS handshake.

Related errors


AI-assisted analysis of XX-net/XX-Net@cfa5bc17b6 (2026-08-27). Data as JSON: /api/errors/7bc3a3d515266ee6. Report an issue: GitHub.