HelloZeroNet/ZeroNet · error · AnnounceError

No response after %.0fs

Error message

No response after %.0fs

What it means

In the same UDP announce flow, after tracker.connect() succeeded and announce() was sent, tracker.poll_once() is called to await the tracker's announce reply. If nothing comes back within the poll timeout, AnnounceError("No response after %.0fs") is raised with the elapsed time. The connection worked but the tracker never answered the announce request.

Source

Thrown at plugins/AnnounceBitTorrent/AnnounceBitTorrentPlugin.py:65

        s = time.time()
        if config.disable_udp:
            raise AnnounceError("Udp disabled by config")
        if config.trackers_proxy != "disable":
            raise AnnounceError("Udp trackers not available with proxies")

        ip, port = tracker_address.split("/")[0].split(":")
        tracker = UdpTrackerClient(ip, int(port))
        if helper.getIpType(ip) in self.getOpenedServiceTypes():
            tracker.peer_port = self.fileserver_port
        else:
            tracker.peer_port = 0
        tracker.connect()
        if not tracker.poll_once():
            raise AnnounceError("Could not connect")
        tracker.announce(info_hash=self.site.address_sha1, num_want=num_want, left=431102370)
        back = tracker.poll_once()
        if not back:
            raise AnnounceError("No response after %.0fs" % (time.time() - s))
        elif type(back) is dict and "response" in back:
            peers = back["response"]["peers"]
        else:
            raise AnnounceError("Invalid response: %r" % back)

        return peers

    def httpRequest(self, url):
        headers = {
            'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11',
            'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
            'Accept-Charset': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3',
            'Accept-Encoding': 'none',
            'Accept-Language': 'en-US,en;q=0.8',
            'Connection': 'keep-alive'
        }

        req = urllib.request.Request(url, headers=headers)

View on GitHub (pinned to 454c0b2e7e)

Solutions

  1. Increase the poll timeout if possible and retry the announce.
  2. Retry periodically — this plugin announces on a schedule, transient failures self-heal.
  3. Verify tracker supports the announce (num_want, info_hash) — some trackers ignore malformed ones.
  4. Fall back to other announce plugins (AnnounceTrackers/AnnounceLocal) for peer discovery.
  5. Check network stability/NAT keepalive settings.

Example fix

// before
back = tracker.poll_once()
if not back:
    raise AnnounceError("No response after %.0fs" % (time.time() - s))
// after
back = tracker.poll_once()
if not back:
    self.site.log.warning("No UDP announce response after %.0fs, will retry" % (time.time() - s))
    return []
Defensive patterns

Strategy: retry

Try / catch

try:
    peers = announce_plugin.announceTrackerUdp(tracker_address, file_info)
except AnnounceError as e:
    if "No response" in str(e):
        schedule_retry(tracker_address, delay=60)
    else:
        log.warning("Announce failed: %s" % e)

Prevention

When it happens

Trigger: UDP connect handshake succeeded but the announce request was dropped, the tracker is overloaded/rate-limiting, response larger than socket buffer, or the tracker silently ignores unknown info_hashes.

Common situations: Busy public trackers dropping announces under load; NAT timeouts between connect and announce; tracker that accepts connections but filters announces from unusual client ports; high-latency networks exceeding the poll timeout.

Related errors


AI-assisted analysis of HelloZeroNet/ZeroNet@454c0b2e7e (2026-09-02). Data as JSON: /api/errors/0d7c25918e7de3eb. Report an issue: GitHub.