Agent fails to reconnect with 401 Invalid access token after being offline for long periods of time
- Dominant language
- Go
- Stars
- 1.1k
- Forks
- 378
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 74
Description
One of my Buildkite agents spends a lot of time asleep. Often when I wake it after several days of sleeping, the agent process fails to reconnect and the log fills up with entries like this:
```
...
2020-07-14 21:53:04 WARN Desktop PC Failed to ping: GET https://agent.buildkite.com/v3/ping: 401 Invalid access token (Last successful was 116h25m52.6913959s ago)
2020-07-14 21:53:05 WARN Desktop PC POST https://agent.buildkite.com/v3/heartbeat: 401 Invalid access token (Attempt 2/5 Retrying in 5s)
...
```
Restarting the agent process fixes the issue, but I think the agent should be able to recover from this condition instead of simply retrying the invalid access token indefinitely.
Buildkite agent v3.22.1, Windows 10 build 19041.329
Contributor guide
Assessment
This issue has not been assessed yet.