Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: T3 Connect HTTP/2 fallback never triggers when initial cloudflared QUIC registration times out #48208

ClosedShivamChavan01(GitHub profile, opens in a new tab) opened this issue 0 comments

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

(Follow-up to #33928, which was auto-closed by #34167 while leaving registration/handshake timeouts unhandled; also encountered during today's Cloudflare outage in #48204.)

Area

apps/server

Steps to reproduce

  1. Run T3 Code (t3@0.1.10) on Linux with T3 Connect enabled on a network where initial QUIC registration to Cloudflare (2606:4700:* / UDP 7844) times out with context deadline exceeded or rpc: connection closed (while TCP 7844 / HTTP/2 is reachable).
  2. Observe cloudflared crash-looping in ~/.t3/userdata/logs/relay-client.ndjson.

Expected behavior

After repeated initial QUIC registration failures/timeouts, ManagedEndpointRuntime should fall back to --protocol http2 (and persist the fallback) instead of crash-looping with --protocol auto indefinitely.

Actual behavior

observeConnectorOutput in ManagedEndpointRuntime only calls noteQuicStall when a log line matches /\btimeout: no recent network activity\b/u:

  • When cloudflared fails during initial tunnel registration (Register tunnel error from server side error="context deadline exceeded" / initial tunnel connection failed error="control stream error: context deadline exceeded" / rpc: connection closed), cloudflared exits after ~5–6s before noteQuicStall ever fires.
  • As a result, QUIC_STALLS_BEFORE_HTTP2 is never incremented and T3 keeps restarting cloudflared with protocol=auto indefinitely (backoff up to 60s).

(Side note: running t3 service restart && t3 connect status also immediately fails with No running server answered, so reachability was not checked because t3 service restart returns before t3 serve finishes binding.)

Impact

Major degradation or frequent failure

Version or commit

t3@0.1.10 (managed cloudflared 2026.10.4)

Environment

Linux Mint 22.1 (x86_64), systemd user service (t3code.service), dual-stack IPv4/IPv6 network

Logs or stack traces

{"message":["Relay client process started; waiting for tunnel connection",{"pid":7102,"source":"managed","version":"2026.10.4","protocol":"auto","tunnelId":"5bd2c7c7-53a6-4290-8745-c74bb87a75aa","tunnelName":"t3coderelay-managedendpoint-prod-d48219961603dd0e"}],"level":"INFO","timestamp":"2026-12-03T11:10:26.561Z"}
{"message":["Relay client reported a transport warning",{"pid":7102,"output":"2026-12-03T11:10:31Z ERR Register tunnel error from server side error=\"context deadline exceeded\" connIndex=0 event=0 ip=2606:4700:a0::5"}],"level":"WARN","timestamp":"2026-12-03T11:10:31.925Z"}
{"message":["Relay client reported a transport warning",{"pid":7102,"output":"2026-12-03T11:10:33Z ERR initial tunnel connection failed error=\"control stream error: context deadline exceeded\""}],"level":"WARN","timestamp":"2026-12-03T11:10:33.476Z"}
{"message":["Relay client is crash-looping; delaying restart",{"pid":7102,"uptimeMillis":6918,"restartDelayMillis":8000}],"level":"WARN","timestamp":"2026-12-03T11:10:33.482Z"}

Workaround

Add TUNNEL_TRANSPORT_PROTOCOL=http2 (and optionally TUNNEL_EDGE_IP_VERSION=4) to ~/.t3/service.env and restart t3code.service, since ManagedEndpointRuntime forwards env to cloudflared.

  1. tanstack-source added labelsbug

  2. juliusmarminge closed this

Sign in to join this conversation.