#4476·iroh

bug: relay client wedged in 'connecting' indefinitely after re-home — no retry/fallback, published discovery record keeps advertising the unreachable relay

Author: draganmCreated Aug 17, 2026Updated Sep 20, 2026

Summary

A long-running Endpoint (built with presets::N0) re-homed relays and got permanently wedged: home_relay_status() has reported the home relay as connecting for 15+ hours with no state change, no retry and no fallback, while the endpoint's published discovery record still advertises that relay. Every non-LAN peer follows the record to a relay the endpoint is not connected to, so the endpoint is completely unreachable from outside its LAN (peers behind symmetric NAT can't hole-punch without the relay either). The process is still in this state as I file this.

At the socket level, the process's only relay-related TCP connection is a zombie: ESTAB to usw1-1 but fully idle for ~22 hours. There is no socket at all to use1-1, the relay both the endpoint state and the published record point at.

Environment

  • iroh / iroh-relay 1.0.3 (crates.io), latest release at time of filing
  • Linux x86_64, kernel 6.17
  • Endpoint::builder(presets::N0).secret_key(...) + iroh-mdns-address-lookup 0.4, bound once at process start; n0 public relays and n0 discovery (pkarr/DNS)
  • Process uptime at the time of the wedge: ~4 days
  • App: https://github.com/fables-for-robots/secret-bunker-iroh (server binds in main.rs, watchdog in relayhealth.rs)

The app runs two watchdogs built on public API, which is how this was caught:

  • a task that logs every home_relay_status() transition;
  • a 5-minute self-check that resolves the endpoint's own record via DnsResolver::lookup_endpoint_by_id(id, N0_DNS_ENDPOINT_ORIGIN_PROD) and compares the advertised relays against home_relay_status().

Timeline (all UTC, 2026-08-17; endpoint id c2a0400ecc…)

For hours before the wedge, the home relay was unstable (this may be an environmental trigger — see "Possible trigger" below): euc1-1 dropped and reconnected every few minutes, aps1-1 failed hard:

03:51:02.442 WARN no home relay connected relays=https://aps1-1.relay.n0.iroh.link./ (connecting)
03:51:03.944 WARN no home relay connected relays=https://aps1-1.relay.n0.iroh.link./ (down: Failed to connect to relay server)
   [... aps1-1 connect/fail loop repeats 8x over ~15s ...]
03:51:30.265 INFO home relay status relays=https://euc1-1.relay.n0.iroh.link./ (connected)
   [... euc1-1 drops to (connecting) and recovers every ~2-15 min for the next 3 hours ...]

Then the wedge:

07:04:20.978 INFO home relay status relays=https://euc1-1.relay.n0.iroh.link./ (connected)   <- last healthy state ever
07:08:13.674 WARN no home relay connected relays=https://use1-1.relay.n0.iroh.link./ (connecting)  <- last transition ever
07:10:28.939 WARN published discovery record advertises relay(s) [https://use1-1.relay.n0.iroh.link./]
             but connected relay(s) are [] — remote peers following the record cannot reach us

The home_relay_status() watcher has produced no transition since 07:08:13 — the status has sat in use1-1 (connecting) ever since (15+ hours at time of filing). The record self-check has fired the same warning every 5 minutes since 07:10. The last successful contact from a remote (non-LAN) peer was 07:07:46.

Socket-level evidence (taken 22:07 UTC, 15 h into the wedge)

The process's only relay TCP connection (relay IPs: use1-1 = 87.99.151.110, usw1-1 = 5.78.69.43, euc1-1 = 91.99.237.97):

$ ss -tie state established '( dport = 443 )'   # filtered to this pid
192.168.1.61:37310  5.78.69.43:https            <- usw1-1, NOT the advertised/current relay
   ... bytes_sent:1058 bytes_retrans:120 bytes_acked:939 bytes_received:4626
       lastsnd:79211577 lastrcv:79242636 lastack:79211388 ...

lastsnd/lastrcv ≈ 79,200,000 ms ≈ 22 hours of total silence — a handful of handshake-sized payloads, then nothing, yet the socket is still open and held by the endpoint. Meanwhile:

  • no TCP connection to use1-1 exists, even though home_relay_status() says use1-1 (connecting) — the "connecting" state has no live connection attempt behind it;
  • no connection to euc1-1 (the relay that had been working all morning) — no fallback was attempted.

Published record (publicly verifiable while the process stays up)

$ dig +short TXT _iroh.akorydsc5itshnbi5y6jdstfsetkgckp6e3tfbf58tgygoryndno.dns.iroh.link
"relay=https://use1-1.relay.n0.iroh.link./"

Expected behavior

  • A relay connection attempt that makes no progress should time out, retry, and/or fall back to another relay from the map — connecting should never be a terminal state.
  • A TCP connection to a relay that has been idle past any reasonable keepalive should be torn down, not held for 22 hours.
  • Ideally the endpoint should not keep (re)publishing a discovery record advertising a relay it has not actually connected to, since that actively misdirects every dialing peer.

Possible trigger

The relay connections had been flapping for hours before the wedge (see 03:51 excerpt) — possibly a middlebox on this network killing long-lived TLS connections, and aps1-1/usw1-1 being consistently unreachable from here. That instability is plausibly environmental; the bug being reported is that the relay client can end up in a state it never recovers from, with no error surfaced (last_error() is None — status renders as connecting, not down).

We have hit this failure class twice: an earlier occurrence (early Aug 2026) had the record advertising use1-1 while the endpoint had silently re-homed to aps1-1; this occurrence wedged with no relay at all. Possibly related (but distinct — that one recovers after ~30 s): #4319.

Repro / diagnostics

No deterministic repro — it needs the relay instability above plus a re-home at the wrong moment. The wedged process is still alive; I can pull more state off it for a short while before I have to restart it to restore service, so ask quickly if you want anything (RUST_LOG was app-only, so no iroh-internal logs from the incident, unfortunately).