T3 Connect stays offline after a VPN connects under a live tunnel: cloudflared reports 4 ready connections but requests time out
What happened
On macOS, with the desktop app's server running and T3 Connect linked, the mobile app (on cellular) showed the Mac as offline and could not reconnect while an L2TP VPN (macOS built-in, full tunnel) was connected on the Mac. It came back only when the VPN was turned off. The managed cloudflared kept reporting itself healthy the whole time, so T3 never restarted it.
Diagnosis
- The managed cloudflared registered 4 QUIC connections before the VPN became the default route. Once the VPN was up, requests to the environment's relay hostname timed out (curl:
000, 15 s), while cloudflared's/readyreturned200withreadyConnections: 4andcloudflared_tunnel_request_errors 0. - In v0.1.7,
apps/server/src/cloud/ManagedEndpointRuntime.ts:486-530restarts the connector only after consecutive explicit503s from/ready. A200resets the counter, so a ready-but-dead connector is never replaced. Nothing inapps/server/src/cloud/reacts to network, interface or route changes. - The relay's status check (
infra/relay/src/environments/EnvironmentConnector.ts:494-550) times out after 10 s and reportsoffline. That result is never fed back into recovery on the server. - Killing only the cloudflared child restored service right away. The supervisor respawned it, it re-registered 4 QUIC connections with the VPN still up, and the relay endpoint answered
200for 20 of 20 probes over 20 minutes. So QUIC through the VPN works; the connections registered before the route change are what stay dead. - #24946 (merged after v0.1.7) recovers stale-ready connectors, but per its description only on Cloudflare error 1033. Here the failure was a timeout with no 1033 response, so I believe it isn't covered. That is not tested against the nightly.
Steps to reproduce
- On macOS, start T3 Code (desktop app) with T3 Connect linked. Wait for 4 "Registered tunnel connection ... protocol=quic" lines in
logs/relay-client.ndjson. - Confirm the mobile app (on cellular) shows the machine online.
- Connect a full-tunnel VPN on the host (here: built-in L2TP/IPsec,
ppp0, MTU 1280, default route viappp0). - Within minutes, the mobile app shows the machine offline / "cannot reach".
curl https://<relay-host>/.well-known/t3/environmenttimes out, while cloudflared's/readystill reports 4 ready connections. pkill -f 'cloudflared tunnel --no-autoupdate'brings it back online without disconnecting the VPN.
Version
T3 Code 0.1.7 (desktop app "T3 Code (Beta)" 0.1.7, server serverVersion 0.1.7). Triage CLI: 0.1.7.
Environment
macOS 26 (Darwin 25.3.0), arm64. cloudflared 2026.10.4 (Homebrew), protocol auto -> quic. Host VPN: macOS built-in L2TP over IPsec, full tunnel. Tailscale is also active (not the default route). Client: T3 mobile app on cellular.
Evidence
# VPN up, before connector restart
curl .../.well-known/t3/environment -> 000 0B 15.002775s (timeout)
GET 127.0.0.1:<metrics>/ready -> {"status":200,"readyConnections":4}
cloudflared_tunnel_ha_connections 4
cloudflared_tunnel_request_errors 0
quic_client_closed_connections 0
# after killing the cloudflared child (VPN still up)
INF Registered tunnel connection connIndex=0..3 ... protocol=quic
20/20 probes over 20 min -> 200 in 0.15-0.28 s, readyConnections 4
Related issues
- #5744: same symptom (tunnel registered/ready, native clients time out), triggered by a host restart.
- #24936 / #24946: stale-ready connector recovery, limited to error 1033.
Fix applied or workaround
Restart T3 Code, or kill just the managed connector (pkill -f 'cloudflared tunnel --no-autoupdate'), after the VPN connects. Possible fixes: treat relay health-check timeouts (not just 1033) as stale-ready in the #24946 recovery path, or restart the connector when the default route or network interfaces change.
Filed by
Claude Code (Claude Opus 5.5, claude-opus-5-5), via t3 triage.
Same failure on the nightly, with a Tailscale exit node as the full-tunnel VPN (default route via Tailscale's interface, MTU 1280). This build already includes #24946, and the tunnel still didn't recover.
What happened
Desktop app (T3 Code Nightly) on macOS, T3 Connect linked. I shared a thread via a guest link. While a Tailscale exit node was enabled on the host, neither my friend (Firefox on Windows) nor I (Chrome on the Mac) could load the /guest page. It just never loaded. When I turned the exit node off, the page loaded within seconds. The exit node is a server on my home network.
Timeline (from relay-client.ndjson and server.trace.ndjson, UTC)
21:16cloudflared registers 4 QUIC connections (akl01/syd08).21:34:19exit node turned on. connIndex=0 drops:Serve tunnel error error="datagram manager error: write udp4 0.0.0.0:60777->198.41.200.53:7844: sendmsg: can't assign requested address".21:34–21:54connIndex=0 never re-registers. 45failed to dial to edge with quic: timeout: handshake did not complete in timeversus a singletimeout: no recent network activity. connIndex=1–3 log nothing; they stay registered the whole time.21:48–21:54GET /guestfrom Discordbot, iOS Safari, Firefox/Windows and Chrome/macOS reach the origin and return200in 2–13 ms. None of those clients ever requests/assets/guest-*.js, so the responses didn't make it back through the tunnel. At21:54:12cloudflared logsRequest failed error="stream 49 canceled by remote with error code 0" dest=https://<relay-host>/guest.21:54:20exit node turned off. connIndex=0 registers on the first try. At21:54:24and21:54:45both browsers fetchguest-*.js, call/api/guest/sessionand/api/guest/redeem(204), and open/api/guest/stream. Everything works.
What this adds to this issue
- Confirmed on the nightly, including #24946. No
Relay client has no tunnel connection; restarting itline was logged during the 20 minutes, so the readiness watchdog (ManagedEndpointRuntime.ts, thewatchConnectorReadinessloop) never saw a503, and nothing else restarted the connector. That fits/readystaying green with 3 half-dead connections. I didn't capture/readylive, so that part is inferred from the missing log line. - The HTTP/2 fallback can't fire for this failure.
noteQuicStallonly countstimeout: no recent network activity(QUIC_STALLS_BEFORE_HTTP2 = 30within 5 min). Here the stalls werehandshake did not complete in time: about 45 in 20 minutes, all ignored. - Requests get in, but responses don't get out, consistent with the MTU explanation in #29004. The Tailscale interface has MTU 1280, and the connections opened before the route change keep their old path MTU.
Steps to reproduce
- On macOS with the desktop app and T3 Connect linked, wait for 4
Registered tunnel connection ... protocol=quiclines. - Share a thread and confirm the guest link loads in a browser on another network.
- Enable a Tailscale exit node on the host.
- Open the guest link again. The server traces log
GET /guest 200, but the browser never loads the page. Within seconds, one connection logscan't assign requested address, followed by an endless stream ofhandshake did not complete in time. - Disable the exit node, or
pkill -f 'cloudflared tunnel --no-autoupdate', and the link loads.
Environment
- T3 Code (Nightly) desktop app, server
0.1.8-nightly.20261105.4234(triage CLI is the same version) - macOS 26 (Darwin 25.6.0), arm64
- Managed cloudflared 2026.10.4,
--protocol auto, so QUIC - Tailscale with an exit node on the home LAN (a Linux server)
- Clients: Firefox 159 on Windows, Chrome 156 on macOS, iOS Safari
Possible fixes
Same as above: restart the connector when the default route or interfaces change, or when a public-hostname probe fails or times out. Also count handshake did not complete in time toward the QUIC→HTTP/2 fallback.
Related: #29004, #16344, #24946
Investigated and drafted by Claude Code (Claude Opus 5.5, claude-opus-5-5) via t3 triage.
Another data point for the "HTTP/2 fallback can't fire for this failure" part of this issue. Here it happened on a fresh connector, with no VPN change, on a network that drops UDP 7844 but passes TCP 7844. It also shows a second problem: the readiness watchdog and cloudflared's own fallback work against each other.
Environment
- T3 Code (Beta) desktop, bundled server 0.1.8, macOS 27.2 (Apple silicon)
- Managed cloudflared 2026.10.4, started with
protocol: "auto".TUNNEL_TRANSPORT_PROTOCOLis not set, and no HTTP/2 fallback was persisted from an earlier run. - Tailscale is running, but no exit node is set. Default route goes through a home or travel router.
What I saw
Settings → Sharing and access showed cloudflared has not connected to Cloudflare yet (cause: connector_not_ready) for about 6 minutes after the app started.
- TCP 7844 to
region1.v2.argotunnel.comconnects (nc -z). - QUIC never completes a handshake. cloudflared metrics on the stuck connector:
quic_client_total_connections 9,quic_client_closed_connections 8, about 90 KB sent and 3 KB received, andquic_client_buffered_packets{packet_type="handshake"} 57./readyreturned{"status":503,"readyConnections":0}. - Earlier in the same session, cloudflared also logged
Failed to refresh DNS local resolver error="lookup region1.v2.argotunnel.com: i/o timeout", so the network was generally flaky.
Timeline from relay-client.ndjson (UTC, tunnel IDs removed):
11:44:08 Relay client process started; waiting for tunnel connection { version: "2026.10.4", protocol: "auto" } # pid A
11:44:18 … 11:47:03 9× ERR Failed to dial a quic connection error="failed to dial to edge with quic: timeout: handshake did not complete in time"
11:47:08 Relay client has no tunnel connection; restarting it { notReadyChecks: 6 }
11:47:08 Relay client process started; waiting for tunnel connection { protocol: "auto" } # pid B
11:47:18 … 11:49:07 8× … timeout: handshake did not complete in time
11:49:23 1× … timeout: no recent network activity
11:49:45 WRN If this log occurs persistently, and cloudflared is unable to connect to Cloudflare Network with `quic` protocol, then most likely your machine/network is getting its egress UDP to port 7844 (or others) blocked or dropped. …
11:49:47 INF Registered tunnel connection connIndex=0 … protocol=http2 (then connIndex 1–3, all http2)
T3's "Relay client keeps losing QUIC connections; switching to HTTP/2" never fired. The tunnel came up only because cloudflared's own fallback in pid B finished.
Problems this shows (checked against main @ 20c3dd3)
-
The stall counter ignores the main QUIC failure.
observeConnectorOutputonly callsnoteQuicStallfortimeout: no recent network activity(ManagedEndpointRuntime.ts~L658). On this network nearly every failure ishandshake did not complete in time: 17 of 18 lines across both processes. Even if both messages were counted, the rate was about one failure every 10–30 s. That is roughly 10–25 in the 5-minute window, soQUIC_STALLS_BEFORE_HTTP2 = 30would still not be reached. The threshold may need to be lower for handshake timeouts, or the trigger could be "no connection ever registered over QUIC within N minutes". -
The readiness watchdog resets cloudflared's own fallback. cloudflared falls back to http2 by itself only after rotating through edge addresses with exponential backoff. Here that took about 2 min 40 s on a fresh process (pid B: 11:47:08 → 11:49:47). The watchdog kills the process after
CONNECTOR_NOT_READY_CHECKS_BEFORE_RESTART = 6× 30 s = 3 min. Each restart starts the new process at the beginning of cloudflared's retry and backoff sequence again. Pid A was killed at 3:00, possibly just before it would have fallen back. Pid B survived only because the threshold doubles after each restart (12 checks = 6 min). On a slightly slower network, or a host that starts up slowly, the first restart could happen every time, and T3 would add ~3 min per cycle without converging. Some options:- When the restart reason is "never connected" and the log shows QUIC dial failures, restart with
--protocol http2instead ofauto. - Or wait for cloudflared's fallback window before the first not-ready restart.
- When the restart reason is "never connected" and the log shows QUIC dial failures, restart with
-
Diagnostics.
ConnectReachabilityalready probes TCP 7844 (edgeReachable). In this case TCP was reachable, so the UI showed the genericconnector_not_ready("Wait a minute…"). When TCP 7844 works but the connector keeps logging QUIC dial failures, a specific cause would help, for example "QUIC (UDP 7844) is blocked on this network; T3 is switching to HTTP/2" with theTUNNEL_TRANSPORT_PROTOCOL=http2workaround from #26513.
Related: #16344 (original fallback request; its logs already include handshake did not complete in time), #20382 (the fallback that only matches no recent network activity), #26513 (persisting the fallback).
Follow-up: I moved the QUIC → HTTP/2 fallback part of this issue (and of my comment above) into its own issue, #33928, so it stays open when #29021 merges and closes this one. #33928 also covers two things not mentioned here: cloudflared's own http2 fallback is never persisted, and the not-ready watchdog restarts the connector before that fallback can finish.