Machines cannot register again after logging out #311

Closed
opened 2025-12-29 01:26:34 +01:00 by adam · 2 comments
Owner

Originally created by @juanfont on GitHub (Aug 18, 2022).

As described in #744, when logging out a machine and log in again there is an issue on how we handle it that leads to messages that the machine has expired

When logging a user out (windows client) and then logging back in via oidc azure AD, I get the error
Aug 18 09:49:46 headscale[1601506]: 2022-08-17T21:49:46Z DBG Machine registration has expired. Sending a authurl to register machine=

Originally created by @juanfont on GitHub (Aug 18, 2022). As described in #744, when logging out a machine and log in again there is an issue on how we handle it that leads to messages that the machine has expired > When logging a user out (windows client) and then logging back in via oidc azure AD, I get the error > Aug 18 09:49:46 <headscalehost> headscale[1601506]: 2022-08-17T21:49:46Z DBG Machine registration has expired. Sending a authurl to register machine=<machine name>
adam added the bug label 2025-12-29 01:26:34 +01:00
adam closed this issue 2025-12-29 01:26:34 +01:00
Author
Owner

@jcputter commented on GitHub (Aug 19, 2022):

i'm getting a similar issue when logged out and trying to auth again

/headscale/oidc.go:250 > Could not exchange code for token error="Post \"https://oauth2.googleapis.com/token\": dial tcp: lookup oauth2.googleapis.com on 127.0.0.53:53: read udp 127.0.0.1:47198->127.0.0.53:53: i/o timeout"
2022-08-19T16:19:49Z ERR ../home/runner/work/headscale/headscale/oidc.go:613 > could not register machine error="machine not found in registration cache"
2022-08-19T16:20:08Z ERR ../home/runner/work/headscale/headscale/oidc.go:613 > could not register machine error="machine not found in registration cache

deleting the node seems to be the workaround

@jcputter commented on GitHub (Aug 19, 2022): i'm getting a similar issue when logged out and trying to auth again ``` /headscale/oidc.go:250 > Could not exchange code for token error="Post \"https://oauth2.googleapis.com/token\": dial tcp: lookup oauth2.googleapis.com on 127.0.0.53:53: read udp 127.0.0.1:47198->127.0.0.53:53: i/o timeout" 2022-08-19T16:19:49Z ERR ../home/runner/work/headscale/headscale/oidc.go:613 > could not register machine error="machine not found in registration cache" 2022-08-19T16:20:08Z ERR ../home/runner/work/headscale/headscale/oidc.go:613 > could not register machine error="machine not found in registration cache ``` deleting the node seems to be the workaround
Author
Owner

@juanfont commented on GitHub (Aug 20, 2022):

Fixed via https://github.com/juanfont/headscale/pull/754

@juanfont commented on GitHub (Aug 20, 2022): Fixed via https://github.com/juanfont/headscale/pull/754
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#311