Skip to content

🐛After fallback to http2 cloudflared never attempts quic again #1534

@james-callahan

Description

@james-callahan

Describe the bug

  • Our networking was down for a bit
  • An instance of cloudflared started, and was unable to connect to quic (as networking was down)
  • cloudflared started trying http2 instead (which failed, as we only allow cloudflared to talk quic in our firewall)
  • Networking came up
  • QUIC was never tried again; and hence cloudflared sat there retrying http2 forever.

To Reproduce
Steps to reproduce the behavior:

  1. See above: Make quic and http2 fail (e.g. by turning off network; or blocking at firewall)
  2. Wait 5 minutes for log message "Switching to fallback protocol http2"
  3. Allow/unblock just quic (not http2)
  4. Observe that quic is never attempted again without a restart

Expected behavior
Keep attempting quic forever

Environment and versions

  • OS: Linux
  • Architecture: x86_64
  • Version: 2025.9.0

Logs and errors

2025-09-23T19:49:03Z ERR Failed to dial a quic connection error="failed to dial to edge with quic: timeout: handshake did not complete in time" connIndex=0 event=0 ip=198.41.192.227
2025-09-23T19:49:03Z INF Retrying connection in up to 2s connIndex=0 event=0 ip=198.41.192.227
2025-09-23T19:49:03Z INF Tunnel connection curve preferences: [X25519MLKEM768 CurveP256] connIndex=0 event=0 ip=198.41.192.47
2025-09-23T19:49:13Z ERR Failed to dial a quic connection error="failed to dial to edge with quic: timeout: handshake did not complete in time" connIndex=0 event=0 ip=198.41.192.47
2025-09-23T19:49:13Z INF Retrying connection in up to 4s connIndex=0 event=0 ip=198.41.192.47
2025-09-23T19:49:14Z INF Tunnel connection curve preferences: [X25519MLKEM768 CurveP256] connIndex=0 event=0 ip=198.41.200.43
2025-09-23T19:49:24Z ERR Failed to dial a quic connection error="failed to dial to edge with quic: timeout: handshake did not complete in time" connIndex=0 event=0 ip=198.41.200.43
2025-09-23T19:49:24Z INF Retrying connection in up to 8s connIndex=0 event=0 ip=198.41.200.43
2025-09-23T19:49:28Z INF Tunnel connection curve preferences: [X25519MLKEM768 CurveP256] connIndex=0 event=0 ip=198.41.192.107
2025-09-23T19:49:38Z ERR Failed to dial a quic connection error="failed to dial to edge with quic: timeout: handshake did not complete in time" connIndex=0 event=0 ip=198.41.192.107
2025-09-23T19:49:38Z INF Retrying connection in up to 16s connIndex=0 event=0 ip=198.41.192.107
2025-09-23T19:49:39Z INF Tunnel connection curve preferences: [X25519MLKEM768 CurveP256] connIndex=0 event=0 ip=198.41.200.43
2025-09-23T19:49:49Z ERR Failed to dial a quic connection error="failed to dial to edge with quic: timeout: handshake did not complete in time" connIndex=0 event=0 ip=198.41.200.43
2025-09-23T19:49:49Z INF Retrying connection in up to 32s connIndex=0 event=0 ip=198.41.200.43
2025-09-23T19:49:54Z INF Tunnel connection curve preferences: [X25519MLKEM768 CurveP256] connIndex=0 event=0 ip=198.41.192.107
2025-09-23T19:50:04Z ERR Failed to dial a quic connection error="failed to dial to edge with quic: timeout: handshake did not complete in time" connIndex=0 event=0 ip=198.41.192.107
2025-09-23T19:50:04Z INF Retrying connection in up to 1m4s connIndex=0 event=0 ip=198.41.192.107
2025-09-23T19:50:05Z INF Tunnel connection curve preferences: [X25519MLKEM768 CurveP256] connIndex=0 event=0 ip=198.41.192.37
2025-09-23T19:50:15Z ERR Failed to dial a quic connection error="failed to dial to edge with quic: timeout: handshake did not complete in time" connIndex=0 event=0 ip=198.41.192.37
2025-09-23T19:50:15Z INF Retrying connection in up to 1m4s connIndex=0 event=0 ip=198.41.192.37
2025-09-23T19:50:41Z INF Tunnel connection curve preferences: [X25519MLKEM768 CurveP256] connIndex=0 event=0 ip=198.41.200.233
2025-09-23T19:50:51Z ERR Failed to dial a quic connection error="failed to dial to edge with quic: timeout: handshake did not complete in time" connIndex=0 event=0 ip=198.41.200.233
2025-09-23T19:50:51Z INF Retrying connection in up to 1m4s connIndex=0 event=0 ip=198.41.200.233
2025-09-23T19:51:07Z INF Tunnel connection curve preferences: [X25519MLKEM768 CurveP256] connIndex=0 event=0 ip=198.41.192.107
2025-09-23T19:51:17Z ERR Failed to dial a quic connection error="failed to dial to edge with quic: timeout: handshake did not complete in time" connIndex=0 event=0 ip=198.41.192.107
2025-09-23T19:51:17Z INF Retrying connection in up to 1m4s connIndex=0 event=0 ip=198.41.192.107
2025-09-23T19:51:31Z INF Switching to fallback protocol http2 connIndex=0 event=0 ip=198.41.192.107
2025-09-23T19:51:46Z ERR Unable to establish connection with Cloudflare edge error="DialContext error: dial tcp 198.41.200.43:7844: i/o timeout" connIndex=0 event=0 ip=198.41.200.43
2025-09-23T19:51:46Z ERR Serve tunnel error error="DialContext error: dial tcp 198.41.200.43:7844: i/o timeout" connIndex=0 event=0 ip=198.41.200.43
2025-09-23T19:51:46Z INF Retrying connection in up to 1s connIndex=0 event=0 ip=198.41.200.43
2025-09-23T19:52:02Z ERR Unable to establish connection with Cloudflare edge error="DialContext error: dial tcp 198.41.200.63:7844: i/o timeout" connIndex=0 event=0 ip=198.41.200.63
2025-09-23T19:52:02Z ERR Serve tunnel error error="DialContext error: dial tcp 198.41.200.63:7844: i/o timeout" connIndex=0 event=0 ip=198.41.200.63
2025-09-23T19:52:02Z INF Retrying connection in up to 4s connIndex=0 event=0 ip=198.41.200.63

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority: NormalMinor issue impacting one or more usersType: BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions