Skip to content
Source
Sign inSign up
pingdotgg/t3code

T3 Connect tunnel rejected ("Tunnel not found"), then recovery fails with upstream_unavailable and relink fails with managed_endpoint_provisioning_failed / 504 #48204

Openjoshyorko(GitHub profile, opens in a new tab) opened this issue 4 comments

What happened

After a nightly update/restart on a Linux host running T3 Code as a systemd user service, the host's T3 Connect relay went offline and another machine on the same account could no longer reach it (while the other machine's own T3 Connect tunnel remained healthy and connected).

Unlinking (t3 connect unlink), signing out (t3 connect logout), re-linking (t3 connect link), and restarting the service all succeeded locally, but the server remains stuck at Environment link: pending server startup / Relay: not provisioned.

Diagnosis

  1. Prior to 2026-12-03T10:42:02Z, the host's managed tunnel (2eaa2a89-1745-4b12-9a13-d3065d77a250, name t3coderelay-managedendpoint-prod-c23077f183cb6d6b, environment ID a3539d75-f6c4-4c0e-8e3e-28ee12826ef8) had 4 active QUIC connections and POST /v1/environments/.../tunnel/recovery returned 200 at 10:18:14Z.
  2. At 10:42:02Z the service stopped during an update restart to 0.1.14-nightly.20261203.5651 (pruning 0.1.14-nightly.20261202.5597 and 0.1.14-nightly.20261202.5624).
  3. At 10:43:46Z, cloudflared restarted with the existing tunnel ID and Cloudflare immediately rejected it with Unauthorized: Tunnel not found.
  4. Between 10:43:47Z and 10:57:10Z, every recovery attempt (POST /v1/environments/a3539d75-f6c4-4c0e-8e3e-28ee12826ef8/tunnel/recovery and /tunnel) failed in ~8.2 s with HTTP 500 Relay internal error: upstream_unavailable.
  5. After t3 connect unlink (at 10:57:35Z), t3 connect logout, t3 connect link, and service restarts, every reconciliation cycle gets 200 from POST /v1/client/environment-link-challenges (~160 ms), then fails on POST /v1/client/environment-links with either:
    • HTTP 503 Relay environment link is unavailable: managed_endpoint_provisioning_failed (0.8 s – 6.9 s), or
    • HTTP 504 Gateway Timeout from Cloudflare (~9.1 s).
  6. Network and TLS to https://relay.t3.codes/ succeed (HTTP 302, TLS=0) from both this host and another host on the same network whose already-provisioned tunnel remains healthy.

Steps to reproduce

  1. Run T3 Code 0.1.14-nightly.20261203.5651 as a systemd user service on Linux with T3 Connect enabled.
  2. Restart/update the service so cloudflared reconnects to the existing managed tunnel.
  3. Observe Unauthorized: Tunnel not found in ~/.t3/userdata/logs/relay-client.ndjson, followed by HTTP 500 upstream_unavailable on /tunnel/recovery and /tunnel.
  4. Run t3 connect unlink (and t3 connect logout), then t3 connect link and t3 service restart.
  5. Observe POST /v1/client/environment-link-challenges returning 200, followed by repeated HTTP 503 managed_endpoint_provisioning_failed and HTTP 504 on POST /v1/client/environment-links.

Version

0.1.14-nightly.20261203.5651

Environment

Linux x86_64 (kernel 7.3.7), Node v26.14.0, managed cloudflared 2026.10.4, systemd user service (t3code.service)

Evidence

# ~/.t3/userdata/logs/relay-client.ndjson
2026-12-03T10:18:14.833Z INF Registered tunnel connection connIndex=0..3 (tunnelId=2eaa2a89-1745-4b12-9a13-d3065d77a250)
2026-12-03T10:42:02.545Z INFO Relay client stopped
2026-12-03T10:43:46.884Z INFO Relay client process started; waiting for tunnel connection (tunnelId=2eaa2a89-1745-4b12-9a13-d3065d77a250)
2026-12-03T10:43:47.078Z WARN Register tunnel error from server side error="Unauthorized: Tunnel not found"

# ~/.t3/userdata/logs/server.trace.ndjson (and rotated .1/.3/.6)
Environment ID: a3539d75-f6c4-4c0e-8e3e-28ee12826ef8

10:43:47Z POST /v1/environments/a3539d75-f6c4-4c0e-8e3e-28ee12826ef8/tunnel/recovery -> 500 (8277ms)
  RelayRequestError: T3 Connect: Relay internal error: upstream_unavailable. Trace ID: 330f773447c227f4713abe483f4f1413
10:43:56Z POST /v1/environments/a3539d75-f6c4-4c0e-8e3e-28ee12826ef8/tunnel -> 500 (8277ms)
  RelayRequestError: T3 Connect: Relay internal error: upstream_unavailable. Trace ID: 333c4fb8caae4b8b8efa020ec7d45e38

# After `t3 connect unlink`, `t3 connect logout`, `t3 connect link`, and `t3 service restart`:
10:58:57Z POST /v1/client/environment-link-challenges -> 200 (163ms)
10:58:57Z POST /v1/client/environment-links -> 503 (844ms)
  RelayRequestError: T3 Connect: Relay environment link is unavailable: managed_endpoint_provisioning_failed. Trace ID: 1c1a588e7c19cbc2833a1fcae8ad7e42
11:06:43Z POST /v1/client/environment-links -> 504 (9109ms)
  RelayRequestError: T3 Connect relay returned HTTP 504 without a recognized error response. Cloudflare Ray ID: a6421a85cdb40fae-BOS. (trace 4349763619d054350072499318320da2)
11:06:59Z POST /v1/client/environment-links -> 503 (2931ms)
  RelayRequestError: T3 Connect: Relay environment link is unavailable: managed_endpoint_provisioning_failed. Trace ID: 7ed82d6d662c2b0186ba9b41d244529c
11:09:28Z POST /v1/client/environment-links -> 503 (6915ms)
  RelayRequestError: T3 Connect: Relay environment link is unavailable: managed_endpoint_provisioning_failed. Trace ID: 103b1577d26618f863d6b6446d6d05a4

#43179 and #40210 (both closed 2026-11-30 as fixed by #45637) and #46898 (open, persistence_failed). Not a duplicate: this occurs on 0.1.14-nightly.20261203.5651 after #45637, and began with Unauthorized: Tunnel not found + 500 upstream_unavailable on tunnel recovery before any unlink/relink was attempted.

Fix applied or workaround

None applied yet; t3 connect unlink, t3 connect logout, t3 connect link, and t3 service restart did not unblock provisioning.

Filed by

antigravity (Gemini 4 Neon) via t3 triage

  1. joshyorko(GitHub profile, opens in a new tab) added labelsvia-triage

  2. tanstack-source added labelsbug

  3. Seeing the same relay errors on a second machine, on stable.

    Possibly related: Cloudflare has an open incident, "Cloudflare Tunnel and WARP Registration Issues" (posted 2026-12-03 11:12 UTC): https://www.cloudflarestatus.com/incidents/wmdkamb5j18j. I haven't confirmed it is the cause.

    Environment: T3 Code 0.1.13, desktop app, Linux x86_64 (kernel 7.2.15)

    What happened (2026-12-03, UTC):

    • 10:56–11:04: managed cloudflared repeatedly failed to register (context deadline exceeded, control stream error: rpc: connection closed, Cloudflared reached the Cloudflare edge, but there was an unknown error registering the connection)
    • 11:02–11:03: tunnel recovery calls failed with upstream_unavailable (trace IDs 5ec0980066a5504b076dd8da7bd8fbaa, 33a8b8a51bbd29b88cefcb86c9a22b31, d3fad56a1cc6dbfb939eed65745dbcca)
    • ~11:13: enabling T3 Connect failed on POST /v1/client/environment-links with managed_endpoint_provisioning_failed (trace ID e30a4a6bba3c8c870d10919c974d7e23). The local /api/connect/link-proof request returned 200. The UI showed 1 of 3 tunnels in use.

    Produced by Claude Code (Claude Sonnet 5.5) via t3 triage.

  4. Confirming we're hitting the same outage on t3@0.1.10 (Linux, cloudflared 2026.10.4):

    1. Cloudflare Status (https://www.cloudflarestatus.com/api/v2/summary.json) currently shows Partially Degraded Service with an active incident: Cloudflare Tunnel and WARP Registration Issues (investigating).
    2. Between 11:01Z and 11:08Z, https://relay.t3.codes failed to provision with:
      • HTTP 503 managed_endpoint_provisioning_failed (Trace IDs: d4a2e3a84f5e8a6e805d55f4c24b98db, 9f9986a76657b021227b23b73fd99676, 290f421ac2d322416e318b484377c110)
      • HTTP 504 Gateway Timeout (CF Ray IDs: a642166f8b3f15d7-MRS, a64216cf9812e191-MRS, a6421a522baee284-MRS, a6421da75a511858-MRS, a6421e3dfdd11858-MRS)
    3. Once the tunnel finally provisioned (5bd2c7c7-53a6-4290-8745-c74bb87a75aa), cloudflared failed registration with context deadline exceeded over IPv6 QUIC (2606:4700:a0::*). Forcing TUNNEL_TRANSPORT_PROTOCOL=http2 and TUNNEL_EDGE_IP_VERSION=4 reached the IPv4 edge (198.41.200.43), where Cloudflare's edge rejected registration:
      ERR Register tunnel error from server side error="Cloudflared reached the Cloudflare edge, but there was an unknown error registering the connection" connIndex=0 event=0 ip=198.41.200.43
  5. ok llms made creating issues so much easier 😭

Sign in to join this conversation.