Coder.comC
Coder.com4y ago
108 replies
Skerit

Agent token is invalid inside of workspace container

After finding a good workaround for my issue #3870 (unable open a terminal session, which was because my user inside the workspace containers was wrong), I've got a new problem 😬

My workspace containers are complaining about an invalid agent token:

2022-09-05 16:20:46.013 [INFO]    <./agent/agent.go:450>    (*agent).init    generating host key
2022-09-05 16:20:46.213 [INFO]    <./agent/agent.go:141>    (*agent).run    connecting
2022-09-05 16:20:46.215 [WARN]    <./agent/agent.go:150>    (*agent).run    failed to dial    {"error": "GET https://coder.mydomain.be/api/v2/workspaceagents/me/metadata: unexpected status code 401: Agent token is invalid.: Try logging in using 'coder login \u003curl\u003e'."}


I deleted the existing workspaces & templates, restarted coder & made the templates & workspaces again, but it's still happening.
Any thoughts on what the issue could be?
Was this page helpful?