Problems with connectivity of cloudflare tunnel

What is the name of the domain?

Hershey.cloud

What is the error number?

None

What is the error message?

Connection terminated error=“failed to dial to edge with quic: timeout: no recent network activity”, Connection terminated error=“context canceled”, Failed to serve tunnel connection error=“context canceled”, Retrying connection in up to 2s

What is the issue you’re encountering

I’m using a cloudflare tunnel to forward my webserver from my PC to my domain, but every time I start my tunnel, which is correctly configured and does technically work, it is very spotty and constantly spits out those errors at me (failed to dial to edge with quec: timeout: no recent network activity, etc). When trying to have multiple people connect to the web server, it sometimes just stops working altogether, and I have no idea why. It’s very slow and unreliable. I’m running on Fedora Linux and have the most recent version of cloud flared, a correct config file for the tunnel, and I know how to start it, but I haven’t been able to get these annoying errors to go away. I just want a stable connection, and It’s actually a very simple and lightweight server, so I don’t see why it isn’t stable.

What steps have you taken to resolve the issue?

Haven’t been able to resolve anything.

What are the steps to reproduce the issue?

Starting the tunnel using “cloudflared tunnel --config tunnel.yml run”, the same errors come every time

Screenshot of the error

Maybe your ISP doesn’t support QUIC at some point or restricted connections on ports? :thinking:

Could you select other protocol e.g. http2, using the command and retry again as follows on the instructions from below article? :thinking:

Hey, thanks for responding. Before I go through with your suggestions, I want to clarify a few things. Firstly, I am very new to cloudflare tunnels, so apologies if I seem clueless. Also, I encountered a different error when running my tunnel that I didn’t include in my original post:

"Failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 7168 kiB, got: 416 kiB) "

In terms of using a different protocol, I tried running my tunnel with the --protocol http2 option included in the command. The output is provided at the bottom of this message. When I used Control+C to quit the tunnel, I noticed that it unregistered two connections, which means that it was able to establish them at some point, which didn’t happen with quic, but the connectivity is still very unstable.

It might also be worth noting that when I run the same Cloudflare Tunnel on Windows 10, it works without any of these issues. Even though I do see a few errors, the connectivity is much more reliable compared to the connection I see on Fedora Linux, which is starting to lead me to believe that the problem is with my system, not my ISP.

I’d appreciate any help with troubleshooting so we can get this working.

Here’s the output of the command with HTTP/2:

2025-01-27T14:45:35Z INF Starting metrics server on 127.0.0.1:20241/metrics
2025-01-27T14:45:35Z INF Registered tunnel connection connIndex=0 connection=4967cda7-d04d-4e0f-bfad-045b9d34c0f7 event=0 ip=198.41.200.13 location=dfw06 protocol=http2
2025-01-27T14:45:37Z ERR  error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: dial tcp 127.0.0.1:3000: connect: connection refused" connIndex=0 event=1 ingressRule=0 originService=http://localhost:3000
2025-01-27T14:45:37Z ERR failed to serve incoming request error="Failed to proxy HTTP: Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: dial tcp 127.0.0.1:3000: connect: connection refused"
2025-01-27T14:45:37Z INF Registered tunnel connection connIndex=2 connection=2a0eba05-bfe5-408c-9c59-b9d90188404a event=0 ip=198.41.200.33 location=dfw06 protocol=http2
2025-01-27T14:45:37Z ERR  error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: dial tcp 127.0.0.1:3000: connect: connection refused" connIndex=0 event=1 ingressRule=0 originService=http://localhost:3000
2025-01-27T14:45:37Z ERR failed to serve incoming request error="Failed to proxy HTTP: Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: dial tcp 127.0.0.1:3000: connect: connection refused"
2025-01-27T14:45:50Z WRN Unable to establish connection with Cloudflare edge error="DialContext error: dial tcp 198.41.192.67:7844: i/o timeout" connIndex=1 event=0 ip=198.41.192.67
2025-01-27T14:45:50Z WRN Serve tunnel error error="DialContext error: dial tcp 198.41.192.67:7844: i/o timeout" connIndex=1 event=0 ip=198.41.192.67
2025-01-27T14:45:50Z INF Retrying connection in up to 2s connIndex=1 event=0 ip=198.41.192.67
2025-01-27T14:45:52Z WRN Connection terminated error="DialContext error: dial tcp 198.41.192.67:7844: i/o timeout" connIndex=1
2025-01-27T14:45:52Z WRN Unable to establish connection with Cloudflare edge error="DialContext error: dial tcp 198.41.192.57:7844: i/o timeout" connIndex=3 event=0 ip=198.41.192.57
2025-01-27T14:45:52Z WRN Serve tunnel error error="DialContext error: dial tcp 198.41.192.57:7844: i/o timeout" connIndex=3 event=0 ip=198.41.192.57
2025-01-27T14:45:52Z INF Retrying connection in up to 2s connIndex=3 event=0 ip=198.41.192.57
2025-01-27T14:45:54Z WRN Connection terminated error="DialContext error: dial tcp 198.41.192.57:7844: i/o timeout" connIndex=3
2025-01-27T14:46:23Z WRN Unable to establish connection with Cloudflare edge error="DialContext error: dial tcp 198.41.192.107:7844: i/o timeout" connIndex=3 event=0 ip=198.41.192.107
2025-01-27T14:46:23Z WRN Serve tunnel error error="DialContext error: dial tcp 198.41.192.107:7844: i/o timeout" connIndex=3 event=0 ip=198.41.192.107
2025-01-27T14:46:23Z WRN Unable to establish connection with Cloudflare edge error="DialContext error: dial tcp 198.41.192.27:7844: i/o timeout" connIndex=1 event=0 ip=198.41.192.27
2025-01-27T14:46:23Z INF Retrying connection in up to 4s connIndex=3 event=0 ip=198.41.192.107
2025-01-27T14:46:23Z WRN Serve tunnel error error="DialContext error: dial tcp 198.41.192.27:7844: i/o timeout" connIndex=1 event=0 ip=198.41.192.27
2025-01-27T14:46:23Z INF Retrying connection in up to 4s connIndex=1 event=0 ip=198.41.192.27
2025-01-27T14:46:25Z WRN Connection terminated error="DialContext error: dial tcp 198.41.192.107:7844: i/o timeout" connIndex=3
2025-01-27T14:46:25Z WRN Connection terminated error="DialContext error: dial tcp 198.41.192.27

I’m seeing similar issues. Is there any resolution?