I am running cloudflared via docker compose.
cloudflare:
container_name: cloudflare
image: cloudflare/cloudflared
restart: unless-stopped
command: tunnel --loglevel debug run
user: "0:0"
environment:
TUNNEL_TOKEN: "${CLOUDFLARE_TUNNEL}"
As soon as the container is up, I can see in the dashboard that the tunnel is Healthy.
A few seconds later it shows as Degraded. A moment later it is already Down.
And then it comes as Healthy again for a few more seconds, and so on.
I can see a bunch of “Connection terminated” in the logs.
cloudflare | 2024-06-17T02:03:01Z DBG edge discovery: returning same edge address back to pool connIndex=3 event=0 ip=198.41.192.107
cloudflare | 2024-06-17T02:03:01Z DBG edge discovery: returning same edge address back to pool connIndex=1 event=0 ip=198.41.200.73
cloudflare | 2024-06-17T02:03:01Z DBG edge discovery: returning same edge address back to pool connIndex=0 event=0 ip=198.41.192.57
cloudflare | 2024-06-17T02:03:01Z INF Registered tunnel connection connIndex=0 connection=3574a0be-c496-4d77-8ccb-a95fbd4e29da event=0 ip=198.41.192.57 location=poa02 protocol=quic
cloudflare | 2024-06-17T02:03:01Z WRN Failed to serve quic connection error="failed to accept QUIC stream: Application error 0x0 (remote)" connIndex=3 event=0 ip=198.41.192.107
cloudflare | 2024-06-17T02:03:01Z WRN Serve tunnel error error="failed to accept QUIC stream: Application error 0x0 (remote)" connIndex=3 event=0 ip=198.41.192.107
cloudflare | 2024-06-17T02:03:01Z INF Retrying connection in up to 16s connIndex=3 event=0 ip=198.41.192.107
cloudflare | 2024-06-17T02:03:01Z INF Registered tunnel connection connIndex=1 connection=8d61853e-b354-4756-8142-f21185a492ed event=0 ip=198.41.200.73 location=gru08 protocol=quic
cloudflare | 2024-06-17T02:03:04Z DBG Current version is equal or newer than received version current_version=24 received_version=24
cloudflare | 2024-06-17T02:03:12Z WRN Connection terminated error="failed to accept QUIC stream: Application error 0x0 (remote)" connIndex=3
cloudflare | 2024-06-17T02:03:13Z INF Unregistered tunnel connection connIndex=1 event=0 ip=198.41.200.73
cloudflare | 2024-06-17T02:03:13Z WRN Failed to serve quic connection error="timeout: no recent network activity" connIndex=1 event=0 ip=198.41.200.73
cloudflare | 2024-06-17T02:03:13Z WRN Serve tunnel error error="timeout: no recent network activity" connIndex=1 event=0 ip=198.41.200.73
cloudflare | 2024-06-17T02:03:13Z DBG edge discovery: giving new address to connection available=16 connIndex=1 event=0 ip=198.41.200.233
cloudflare | 2024-06-17T02:03:13Z INF Retrying connection in up to 1s connIndex=1 event=0 ip=198.41.200.73
cloudflare | 2024-06-17T02:03:13Z INF Unregistered tunnel connection connIndex=2 event=0 ip=198.41.200.193
cloudflare | 2024-06-17T02:03:13Z WRN Failed to serve quic connection error="timeout: no recent network activity" connIndex=2 event=0 ip=198.41.200.193
cloudflare | 2024-06-17T02:03:13Z WRN Serve tunnel error error="timeout: no recent network activity" connIndex=2 event=0 ip=198.41.200.193
cloudflare | 2024-06-17T02:03:13Z DBG edge discovery: giving new address to connection available=16 connIndex=2 event=0 ip=198.41.200.13
cloudflare | 2024-06-17T02:03:13Z INF Retrying connection in up to 1s connIndex=2 event=0 ip=198.41.200.193
cloudflare | 2024-06-17T02:03:14Z INF Unregistered tunnel connection connIndex=0 event=0 ip=198.41.192.57
cloudflare | 2024-06-17T02:03:14Z ERR Failed to serve quic connection error="timeout: no recent network activity" connIndex=0 event=0 ip=198.41.192.57
cloudflare | 2024-06-17T02:03:14Z ERR Serve tunnel error error="timeout: no recent network activity" connIndex=0 event=0 ip=198.41.192.57
cloudflare | 2024-06-17T02:03:14Z DBG edge discovery: giving new address to connection available=16 connIndex=0 event=0 ip=198.41.192.77
cloudflare | 2024-06-17T02:03:14Z INF Retrying connection in up to 1s connIndex=0 event=0 ip=198.41.192.57
cloudflare | 2024-06-17T02:03:14Z ERR Connection terminated error="timeout: no recent network activity" connIndex=1
cloudflare | 2024-06-17T02:03:15Z ERR Connection terminated error="timeout: no recent network activity" connIndex=2
cloudflare | 2024-06-17T02:03:16Z ERR Connection terminated error="timeout: no recent network activity" connIndex=0
cloudflare | 2024-06-17T02:04:31Z DBG edge discovery: returning same edge address back to pool connIndex=3 event=0 ip=198.41.192.107
cloudflare | 2024-06-17T02:04:31Z DBG edge discovery: returning same edge address back to pool connIndex=0 event=0 ip=198.41.192.77
cloudflare | 2024-06-17T02:04:31Z DBG edge discovery: returning same edge address back to pool connIndex=2 event=0 ip=198.41.200.13
cloudflare | 2024-06-17T02:04:31Z DBG edge discovery: returning same edge address back to pool connIndex=1 event=0 ip=198.41.200.233
cloudflare | 2024-06-17T02:04:31Z ERR Failed to serve quic connection error="already connected to this server, trying another address" connIndex=0 event=0 ip=198.41.192.77
cloudflare | 2024-06-17T02:04:31Z ERR Unable to establish connection. error="already connected to this server, trying another address" connIndex=0 event=0 ip=198.41.192.77
cloudflare | 2024-06-17T02:04:31Z DBG edge discovery: giving new address to connection available=16 connIndex=0 event=0 ip=198.41.192.57
cloudflare | 2024-06-17T02:04:31Z INF Retrying connection in up to 4s connIndex=0 event=0 ip=198.41.192.77
cloudflare | 2024-06-17T02:04:31Z INF Registered tunnel connection connIndex=3 connection=6a23fdbf-0669-4280-adba-d137dbab9e8d event=0 ip=198.41.192.107 location=poa02 protocol=quic
cloudflare | 2024-06-17T02:04:32Z INF Registered tunnel connection connIndex=1 connection=e4f9ae74-7650-4203-a92f-fb622c354750 event=0 ip=198.41.200.233 location=gru17 protocol=quic
cloudflare | 2024-06-17T02:04:32Z INF Registered tunnel connection connIndex=2 connection=8ad0e27e-7ddd-4982-aa88-76319a3e3028 event=0 ip=198.41.200.13 location=gru17 protocol=quic
cloudflare | 2024-06-17T02:04:34Z WRN Connection terminated error="already connected to this server, trying another address" connIndex=0