buildkite / buildkite/agent

Agent fails to reconnect with 401 Invalid access token after being offline for long periods of time

Open
#1,245 2 comments 0 reactions 0 assignees View on GitHub
bug good-first-issue
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

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.