cloudflare / cloudflare/cloudflared

🐛 Graceful shutdowns shouldn't produce error logs

Open
#1,038 5 comments 0 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**
When i send a `SIGTERM` to my `cloudflared tunnel run` i get like 8-9 error logs.

**To Reproduce**
Steps to reproduce the behavior:
1. Run `cloudflared tunnel run $tunnel_id`
2. Let is start fully
3. Call `kill -15 $pid`

**Expected behavior**
I would expect a graceful shutdown didn't print error logs

**Logs and errors**
```
2023-08-04T09:42:19Z INF Initiating graceful shutdown due to signal terminated ...
2023-08-04T09:42:19Z ERR writing finish: Application error 0x0 (remote)
2023-08-04T09:42:19Z INF Unregistered tunnel connection connIndex=3 event=0 ip=198.41.200.43
2023-08-04T09:42:19Z ERR Failed to serve quic connection error="Application error 0x0 (remote)" connIndex=3 event=0 ip=198.41.200.43
2023-08-04T09:42:19Z ERR Serve tunnel error error="Application error 0x0 (remote)" connIndex=3 event=0 ip=198.41.200.43
2023-08-04T09:42:19Z INF Retrying connection in up to 1s connIndex=3 event=0 ip=198.41.200.43
2023-08-04T09:42:19Z INF Unregistered tunnel connection connIndex=0 event=0 ip=198.41.192.67
2023-08-04T09:42:19Z ERR Failed to serve quic connection error="context canceled" connIndex=0 event=0 ip=198.41.192.67
2023-08-04T09:42:19Z INF Retrying connection in up to 1s connIndex=0 event=0 ip=198.41.192.67
2023-08-04T09:42:19Z INF Unregistered tunnel connection connIndex=1 event=0 ip=198.41.200.33
2023-08-04T09:42:19Z ERR Failed to serve quic connection error="context canceled" connIndex=1 event=0 ip=198.41.200.33
2023-08-04T09:42:19Z INF Retrying connection in up to 1s connIndex=1 event=0 ip=198.41.200.33
2023-08-04T09:42:20Z INF Unregistered tunnel connection connIndex=2 event=0 ip=198.41.192.167
2023-08-04T09:42:20Z ERR Failed to serve quic connection error="Application error 0x0 (remote)" connIndex=2 event=0 ip=198.41.192.167
2023-08-04T09:42:20Z ERR Serve tunnel error error="Application error 0x0 (remote)" connIndex=2 event=0 ip=198.41.192.167
2023-08-04T09:42:20Z INF Retrying connection in up to 1s connIndex=2 event=0 ip=198.41.192.167
2023-08-04T09:42:20Z ERR no more connections active and exiting
2023-08-04T09:42:20Z INF Tunnel server stopped
2023-08-04T09:42:20Z ERR icmp router terminated error="context canceled"
2023-08-04T09:42:20Z INF Metrics server stopped
```

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.