cloudflare / cloudflare/cloudflared

🐛ERR Connection terminated error="connection with edge closed" connIndex=0 2025-04-03 20:18:13 2025-04-04T00:18:13Z ERR Connection terminated error="Error shutting down control stream: client disconnected" connIndex=3

Open
#1,440 15 comments 9 reactions 0 assignees View on GitHub
Priority: Normal Type: Bug
Dominant language
Go
Stars
15.6k
Forks
1.4k
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
My Docker instance of Cloudflared will run for about 1-6hrs max, most of the time less than 6hrs. Without any external input, no changes in network, nothing, the tunnel will shutdown, it closes connection with edge and shuts down. I know Im not the only one having this issue because a couple of quick google searches showed that this is a consistent problem for multiple users. There is nothing in my logs that suggest abnormal behavior. No indications of intrusion, DDos, or errors with my server. Everything runs perfectly fine until cloudflared decides to close connection with edge. This is a major problem, why its been happening since March 16 2023 [Old Issue](https://github.com/cloudflare/cloudflared/issues/917#issuecomment-2777292058) and still isn't fixed is absolutely baffling.

**To Reproduce**
Steps to reproduce the behavior:
1. Configure: Run docker container as usual
2. Run: Runs for about 6hrs then closes connection with edge prompting a restart.
3. See error: Always the same error no matter how many settings I change.

If it's an issue with Cloudflare Tunnel:
4. Tunnel ID : 96f03c3c-cb70-4da8-a49f-98baacbcb2f2
5. cloudflared config: Standard config with a --network tunnel --protocol http2

**Expected behavior**
Tunnel should stay connected to origin and Cloud Flare without needing to restart everyday.

**Environment and versions**
- OS: MacOS Docker Desktop
- Architecture: ARM
- Version: latest

**Logs and errors**
If applicable, add logs or errors to help explain your problem.

'ERR Connection terminated error="connection with edge closed" connIndex=2
2025-04-03 20:18:13 2025-04-04T00:18:13Z ERR Connection terminated error="connection with edge closed" connIndex=0
2025-04-03 20:18:13 2025-04-04T00:18:13Z ERR Connection terminated error="Error shutting down control stream: client disconnected" connIndex=3
2025-04-03 20:18:14 2025-04-04T00:18:14Z ERR Connection terminated error="connection with edge closed" connIndex=1'

**Additional context**
My server runs in a docker container in the same network as my tunnel.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.