cloudflare / cloudflare/cloudflared

🐛 context canceled error on TrueNAS causes cloudflared not to start

Open
#1,343 4 comments 4 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**
cloudflared will not start on the TrueNAS platform after a not so recent upgrade

**To Reproduce**
Steps to reproduce the behavior:
1. Download an older version of `cloudflared` from the TrueNAS app store. Most likely in the June / August era.
2. Update to `2024.9.1` or greater
3. Restart the truenas app

If it's an issue with Cloudflare Tunnel:
4. Tunnel ID : 4c12433b-bc15-40d4-81da-c9a3a77790a4
5. cloudflared config:
UserID = 3000
GroupID = 3000
[ ] Host Network
Storage Configuration
Additional Storage
Type: IX Volume
[ ] Read Only
Mount Path
/cloudflared
IX Volume Configuration
[ ] Enable ACL
Dataset Entry
storage entry

**Expected behavior**
cloudflared successfully starts on Truenas

**Environment and versions**
- OS: Truenas SCALE Dragonfish
- Architecture: x86
- Version: 24.04

**Logs and errors**

```
2024-11-01 22:31:09.550757-05:002024-11-02T03:31:09Z INF Starting tunnel tunnelID=4c12433b-bc15-40d4-81da-c9a3a77790a4
2024-11-01 22:31:09.550924-05:002024-11-02T03:31:09Z INF Version 2024.10.1 (Checksum b32e729d43adb66d22abf6539e287b436b1c312742c2488514ef6ea0a2d37adf)
2024-11-01 22:31:09.550981-05:002024-11-02T03:31:09Z INF GOOS: linux, GOVersion: go1.22.2-devel-cf, GoArch: amd64
2024-11-01 22:31:09.551016-05:002024-11-02T03:31:09Z INF Settings: map[no-autoupdate:true]
2024-11-01 22:31:09.551058-05:002024-11-02T03:31:09Z INF Environmental variables map[TUNNEL_TOKEN:*****]
2024-11-01 22:31:09.551520-05:002024-11-02T03:31:09Z INF Generated Connector ID: c28fcf15-43f2-46d9-af35-58d9899ba21a
2024-11-01 22:31:09.558107-05:002024-11-02T03:31:09Z INF Initial protocol quic
2024-11-01 22:31:09.570422-05:002024-11-02T03:31:09Z INF ICMP proxy will use 172.16.5.4 as source for IPv4
2024-11-01 22:31:09.570647-05:002024-11-02T03:31:09Z INF ICMP proxy will use fe80::4440:93ff:fe01:c130 in zone eth0 as source for IPv6
2024-11-01 22:31:09.578983-05:002024-11-02T03:31:09Z INF Starting metrics server on 127.0.0.1:46825/metrics
2024-11-01 22:31:09.581785-05:002024/11/02 03:31:09 failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 7168 kiB, got: 416 kiB). See https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes for details.
2024-11-01 22:31:09.610363-05:002024-11-02T03:31:09Z ERR Failed to serve quic connection error="context canceled" connIndex=0 event=0 ip=198.41.192.167
2024-11-01 22:31:09.610417-05:002024-11-02T03:31:09Z INF Retrying connection in up to 2s connIndex=0 event=0 ip=198.41.192.167
2024-11-01 22:31:10.074263-05:002024-11-02T03:31:10Z INF Tunnel server stopped
2024-11-01 22:31:10.074344-05:002024-11-02T03:31:10Z ERR Initiating shutdown error="context canceled"
2024-11-01 22:31:10.074391-05:002024-11-02T03:31:10Z ERR icmp router terminated error="context canceled"
2024-11-01 22:31:10.079701-05:002024-11-02T03:31:10Z INF Metrics server stopped
2024-11-01 22:31:10.079772-05:00context canceled
```

**Additional context**
I was running cloudflared successfully on TrueNAS for a while and after upgrading either TrueNAS or cloudflared it is now refusing to start. Unfortunately I don't know which update has broken it - either TrueNAS or cloudflared.

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.