[Bug]: T3 Connect stays on "Reconnecting" after the tunnel re-registers following a network drop; requests die on one tunnel connection until the server is restarted #46936
Before submitting#
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area#
apps/server
Steps to reproduce#
- Run the T3 server as a user systemd service on a Linux host with T3 Connect turned on (wired connection, the machine never sleeps).
- Leave it running overnight. A short internet drop happens on the host.
- cloudflared notices the drop (
failed to dial to edge with quic: timeout: no recent network activity) and registers its four tunnel connections again within about 20 seconds. - Try to open the environment from another device through T3 Connect.
Expected behavior#
Once cloudflared has registered its connections again, the environment is reachable through T3 Connect, as it was before the drop.
Actual behavior#
The client shows Reconnecting: Remote environment endpoint https://prod-….t3coderelay.com… and never connects. It stayed like that for about 3.5 hours, until the T3 server was restarted.
During that time:
- Every client request reaches the host's cloudflared but fails with
Incoming request ended abruptly: context canceled, for both/.well-known/t3/environmentand/oauth/token. - All 38 failed requests were on the same tunnel connection (
connIndex=0). That is the connection registered last, 4 seconds after the other three. No other connection logged a failure. - The T3 server itself was healthy:
curl http://127.0.0.1:3773/.well-known/t3/environmentreturned 200 in about 1 ms on the host. - A
curlto the public relay URL from a different machine returned 200 in 0.2 s. - T3 didn't notice anything was wrong, so it never rebuilt the tunnel.
It looks as if the relay keeps sending the client's requests to a connection that is registered but no longer passes replies back, and nothing on the T3 side detects it. This has happened on several mornings in a row. Each time, only a restart brought it back.
Impact#
Major degradation or frequent failure
Version or commit#
T3 runtime 0.1.0, cloudflared 2026.10.0 (the managed copy)
Environment#
Host: Ubuntu (GNOME), x86_64, wired Ethernet, sleep turned off, T3 server running as a user systemd service (t3code.service, lingering on). Client: T3 desktop app on Windows, connecting through T3 Connect. Another environment of the same client on another machine stayed connected the whole time.
Logs or stack traces#
# times in UTC; tunnel and connection ids removed
15:27:16Z ERR Connection terminated error="failed to dial to edge with quic: timeout: no recent network activity" connIndex=3
15:27:24Z ERR Connection terminated error="failed to dial to edge with quic: timeout: no recent network activity" connIndex=1
15:27:33Z INF Registered tunnel connection connIndex=3 protocol=quic
15:27:33Z INF Registered tunnel connection connIndex=1 protocol=quic
15:27:34Z INF Registered tunnel connection connIndex=2 protocol=quic
15:27:38Z INF Registered tunnel connection connIndex=0 protocol=quic
16:28:25Z ERR error="Incoming request ended abruptly: context canceled" connIndex=0 event=1 ingressRule=0 originService=http://127.0.0.1:3773
... (same error repeated, always connIndex=0) ...
17:37:51Z ERR Request failed error="Incoming request ended abruptly: context canceled" connIndex=0 dest=https://prod-….t3coderelay.com/.well-known/t3/environment event=0 type=http
17:50:37Z ERR Request failed error="Incoming request ended abruptly: context canceled" connIndex=0 dest=https://prod-….t3coderelay.com/oauth/token event=0 type=http
17:59:06Z ERR Request failed error="Incoming request ended abruptly: context canceled" connIndex=0 dest=https://prod-….t3coderelay.com/.well-known/t3/environment event=0 type=http
# after `systemctl --user restart t3code.service` at 17:59Z the client connected again
Workaround#
systemctl --user restart t3code.service on the host fixes it straight away. As a stopgap I run a daily systemd timer that restarts the service while no agents are running.
Possibly related: #46899 (endpoint times out from one Cloudflare location while the same tunnels answer from others) and #29004 (tunnel breaks silently after a network change).
tanstack-source added labelsbug
Sign in to join this conversation.
Follow-up with more detail from the same Linux host (headless
t3 serve, wired, managed cloudflared 2026.10.0,protocol: autoso QUIC).It recurred on 2026-12-04 between 16:34Z and 19:36Z. A scheduled
systemctl --user restart t3code.serviceat 16:00Z did not prevent it: the tunnel registered 4 QUIC connections cleanly and the failures began about 30 minutes later.All of the failures in that window were on one tunnel connection. Every
Request failed error="Incoming request ended abruptly: context canceled"line wasconnIndex=2. That connection was registered at 16:00:10Z to 198.41.200.53 (akl01). The other three connections (akl02, syd08 ×2) kept serving requests normally.The failed requests never reached the origin. I matched each cloudflared failure against the server's own trace spans (
server.trace.ndjson,url.fullon the relay hostname). For the failedGET /.well-known/t3/environmentandPOST /oauth/tokenrequests onconnIndex=2, there is no corresponding server span. In the same seconds,OPTIONSpreflights andPOST /api/t3-connect/mint-credentialrequests that went over the other connections were served in under 30 ms. Locally,curl http://127.0.0.1:3773/.well-known/t3/environmentreturns 200 in about 2 ms. The host had no load (load average 0.3, 26 GB of memory available) and the network link stayed up throughout.So it looks like one QUIC connection becomes a black hole: the edge keeps routing requests to it, cloudflared accepts them, and they are cancelled before they reach the origin. Nothing on the T3 side notices. The process stays "ready" with 4 connections, so the watchdog never restarts it. Restarting the server fixed it immediately.
For context, cloudflared's log on this host also shows occasional
Failed to refresh DNS local resolver ... i/o timeoutand onetimeout: no recent network activity/failed to accept QUIC streamepisode, so the upstream line has brief blips. A UDP flow being dropped mid-path during one of these would fit.This looks related to #31468, #33928 and #46899.
Workaround being tried: a systemd drop-in for
t3code.servicethat setsEnvironment=TUNNEL_TRANSPORT_PROTOCOL=http2. All 4 connections now register withprotocol=http2. I'll report back on whether the dead-connection failures stop.Suggestions:
connIndexproduces repeatedcontext canceledfailures while the others succeed, treat the connector as unhealthy and restart it, or switch it to HTTP/2./readyreports 4 connections throughout this failure.