ðcloudflared tunnel connection fails after network disconnection or router reboot
Describe the bug cloudflared tunnel connection fails after network disconnection or router reboot
To Reproduce Steps to reproduce the behavior: I installed cloudflared on my truenas,and the nas dns and gateway point to bypassing openwrt through my bypass route.I only have dnsmasq-full and passwall2 installed in my openwrt,and I noticed that when I reboot cloudflared,everything works fine.
2024-12-28 09:04:14.031446+00:002024-12-28T09:04:14Z INF Starting tunnel tunnelID=3bce0798-0bc1-49b3-a679-d9137cda4fed
2024-12-28 09:04:14.031491+00:002024-12-28T09:04:14Z INF Version 2024.12.2 (Checksum cb61fcb41380efff4e2ef0a1eeea23bcddff360e8703f99dbb5c24da1de937b9)
2024-12-28 09:04:14.031498+00:002024-12-28T09:04:14Z INF GOOS: linux, GOVersion: go1.22.5-devel-cf, GoArch: amd64
2024-12-28 09:04:14.031503+00:002024-12-28T09:04:14Z INF Settings: map[no-autoupdate:true]
2024-12-28 09:04:14.031512+00:002024-12-28T09:04:14Z INF Environmental variables map[TUNNEL_TOKEN:*****]
2024-12-28 09:04:14.031746+00:002024-12-28T09:04:14Z INF Generated Connector ID: 19dfd5eb-87fc-4f30-ad94-bc189e47f0bc
2024-12-28 09:04:15.042497+00:002024-12-28T09:04:15Z INF Initial protocol quic
2024-12-28 09:04:15.052367+00:002024-12-28T09:04:15Z INF ICMP proxy will use 10.0.0.100 as source for IPv4
2024-12-28 09:04:15.053304+00:002024-12-28T09:04:15Z INF ICMP proxy will use fe80::872:3aff:fec1:7a39 in zone br0 as source for IPv6
2024-12-28 09:04:15.053436+00:002024-12-28T09:04:15Z WRN The user running cloudflared process has a GID (group ID) that is not within ping_group_range. You might need to add that user to a group within that range, or instead update the range to encompass a group the user is already in by modifying /proc/sys/net/ipv4/ping_group_range. Otherwise cloudflared will not be able to ping this network error="Group ID 568 is not between ping group 1 to 0"
2024-12-28 09:04:15.053504+00:002024-12-28T09:04:15Z WRN ICMP proxy feature is disabled error="cannot create ICMPv4 proxy: Group ID 568 is not between ping group 1 to 0 nor ICMPv6 proxy: socket: permission denied"
2024-12-28 09:04:15.544965+00:002024-12-28T09:04:15Z INF ICMP proxy will use 10.0.0.100 as source for IPv4
2024-12-28 09:04:15.545952+00:002024-12-28T09:04:15Z INF ICMP proxy will use fe80::872:3aff:fec1:7a39 in zone br0 as source for IPv6
2024-12-28 09:04:15.546232+00:002024-12-28T09:04:15Z INF Starting metrics server on 127.0.0.1:20241/metrics
2024-12-28 09:04:15.550373+00:002024-12-28T09:04:15Z INF You requested 4 HA connections but I can give you at most 2.
2024-12-28 09:04:15.550637+00:002024/12/28 09:04:15 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-12-28 09:04:17.092830+00:002024-12-28T09:04:17Z INF Registered tunnel connection connIndex=0 connection=6a022e19-7bda-456f-81fb-eac3de7c1d83 event=0 ip=198.18.160.94 location=sjc08 protocol=quic
2024-12-28 09:04:18.580504+00:002024-12-28T09:04:18Z INF Registered tunnel connection connIndex=1 connection=292c6541-85de-4e97-9235-b7184e74f3a4 event=0 ip=198.18.160.89 location=sjc06 protocol=quic
But when openwrt is restarted or paswall2 is restarted, cloudflared will error and will not re-establish the link.
2024-12-28 09:10:32.466290+00:002024-12-28T09:10:32Z WRN Failed to serve tunnel connection error="timeout: no recent network activity" connIndex=1 event=0 ip=198.18.160.89
2024-12-28 09:10:32.466425+00:002024-12-28T09:10:32Z WRN Serve tunnel error error="timeout: no recent network activity" connIndex=1 event=0 ip=198.18.160.89
2024-12-28 09:10:32.466441+00:002024-12-28T09:10:32Z WRN Connection terminated error="there are no free edge addresses left to resolve to" connIndex=1
2024-12-28 09:10:33.263362+00:002024-12-28T09:10:33Z WRN Failed to serve tunnel connection error="timeout: no recent network activity" connIndex=0 event=0 ip=198.18.160.94
2024-12-28 09:10:33.263454+00:002024-12-28T09:10:33Z ERR Serve tunnel error error="timeout: no recent network activity" connIndex=0 event=0 ip=198.18.160.94
2024-12-28 09:10:33.263470+00:002024-12-28T09:10:33Z INF Retrying connection in up to 1s connIndex=0 event=0 ip=198.18.160.94
2024-12-28 09:10:39.351748+00:002024-12-28T09:10:39Z ERR Failed to dial a quic connection error="failed to dial to edge with quic: timeout: no recent network activity" connIndex=0 event=0 ip=198.18.160.89
2024-12-28 09:10:39.351790+00:002024-12-28T09:10:39Z INF Retrying connection in up to 4s connIndex=0 event=0 ip=198.18.160.89
2024-12-28 09:10:47.190288+00:002024-12-28T09:10:47Z ERR Failed to dial a quic connection error="failed to dial to edge with quic: timeout: no recent network activity" connIndex=0 event=0 ip=198.18.160.94
If it's an issue with Cloudflare Tunnel: 4. Tunnel ID : 3bce0798-0bc1-49b3-a679-d9137cda4fed 5. cloudflared config: docker
Expected behavior It should keep trying to reconnect and resume working once the network is restored
Environment and versions
- OS: turnas scale 24.10
- Architecture: amd x86_64
- Version: cloudflare/cloudflared:2024.12.2
Logs and errors If applicable, add logs or errors to help explain your problem.
Additional context Add any other context about the problem here.
Having the same problem