mirror of
https://github.com/juanfont/headscale.git
synced 2026-01-11 20:00:28 +01:00
[Bug] Unsolicited node logout #1120
Closed
opened 2025-12-29 02:28:22 +01:00 by adam
·
21 comments
No Branch/Tag Specified
main
update_flake_lock_action
gh-pages
kradalby/release-v0.27.2
dependabot/go_modules/golang.org/x/crypto-0.45.0
dependabot/go_modules/github.com/opencontainers/runc-1.3.3
copilot/investigate-headscale-issue-2788
copilot/investigate-visibility-issue-2788
copilot/investigate-issue-2833
copilot/debug-issue-2846
copilot/fix-issue-2847
dependabot/go_modules/github.com/go-viper/mapstructure/v2-2.4.0
dependabot/go_modules/github.com/docker/docker-28.3.3incompatible
kradalby/cli-experiement3
doc/0.26.1
doc/0.25.1
doc/0.25.0
doc/0.24.3
doc/0.24.2
doc/0.24.1
doc/0.24.0
kradalby/build-docker-on-pr
topic/docu-versioning
topic/docker-kos
juanfont/fix-crash-node-id
juanfont/better-disclaimer
update-contributors
topic/prettier
revert-1893-add-test-stage-to-docs
add-test-stage-to-docs
remove-node-check-interval
fix-empty-prefix
fix-ephemeral-reusable
bug_report-debuginfo
autogroups
logs-to-stderr
revert-1414-topic/fix_unix_socket
rename-machine-node
port-embedded-derp-tests-v2
port-derp-tests
duplicate-word-linter
update-tailscale-1.36
warn-against-apache
ko-fi-link
more-acl-tests
fix-typo-standalone
parallel-nolint
tparallel-fix
rerouting
ssh-changelog-docs
oidc-cleanup
web-auth-flow-tests
kradalby-gh-runner
fix-proto-lint
remove-funding-links
go-1.19
enable-1.30-in-tests
0.16.x
cosmetic-changes-integration
tmp-fix-integration-docker
fix-integration-docker
configurable-update-interval
show-nodes-online
hs2021
acl-syntax-fixes
ts2021-implementation
fix-spurious-updates
unstable-integration-tests
mandatory-stun
embedded-derp
prtemplate-fix
v0.28.0-beta.1
v0.27.2-rc.1
v0.27.1
v0.27.0
v0.27.0-beta.2
v0.27.0-beta.1
v0.26.1
v0.26.0
v0.26.0-beta.2
v0.26.0-beta.1
v0.25.1
v0.25.0
v0.25.0-beta.2
v0.24.3
v0.25.0-beta.1
v0.24.2
v0.24.1
v0.24.0
v0.24.0-beta.2
v0.24.0-beta.1
v0.23.0
v0.23.0-rc.1
v0.23.0-beta.5
v0.23.0-beta.4
v0.23.0-beta3
v0.23.0-beta2
v0.23.0-beta1
v0.23.0-alpha12
v0.23.0-alpha11
v0.23.0-alpha10
v0.23.0-alpha9
v0.23.0-alpha8
v0.23.0-alpha7
v0.23.0-alpha6
v0.23.0-alpha5
v0.23.0-alpha4
v0.23.0-alpha4-docker-ko-test9
v0.23.0-alpha4-docker-ko-test8
v0.23.0-alpha4-docker-ko-test7
v0.23.0-alpha4-docker-ko-test6
v0.23.0-alpha4-docker-ko-test5
v0.23.0-alpha-docker-release-test-debug2
v0.23.0-alpha-docker-release-test-debug
v0.23.0-alpha4-docker-ko-test4
v0.23.0-alpha4-docker-ko-test3
v0.23.0-alpha4-docker-ko-test2
v0.23.0-alpha4-docker-ko-test
v0.23.0-alpha3
v0.23.0-alpha2
v0.23.0-alpha1
v0.22.3
v0.22.2
v0.23.0-alpha-docker-release-test
v0.22.1
v0.22.0
v0.22.0-alpha3
v0.22.0-alpha2
v0.22.0-alpha1
v0.22.0-nfpmtest
v0.21.0
v0.20.0
v0.19.0
v0.19.0-beta2
v0.19.0-beta1
v0.18.0
v0.18.0-beta4
v0.18.0-beta3
v0.18.0-beta2
v0.18.0-beta1
v0.17.1
v0.17.0
v0.17.0-beta5
v0.17.0-beta4
v0.17.0-beta3
v0.17.0-beta2
v0.17.0-beta1
v0.17.0-alpha4
v0.17.0-alpha3
v0.17.0-alpha2
v0.17.0-alpha1
v0.16.4
v0.16.3
v0.16.2
v0.16.1
v0.16.0
v0.16.0-beta7
v0.16.0-beta6
v0.16.0-beta5
v0.16.0-beta4
v0.16.0-beta3
v0.16.0-beta2
v0.16.0-beta1
v0.15.0
v0.15.0-beta6
v0.15.0-beta5
v0.15.0-beta4
v0.15.0-beta3
v0.15.0-beta2
v0.15.0-beta1
v0.14.0
v0.14.0-beta2
v0.14.0-beta1
v0.13.0
v0.13.0-beta3
v0.13.0-beta2
v0.13.0-beta1
upstream/v0.12.4
v0.12.4
v0.12.3
v0.12.2
v0.12.2-beta1
v0.12.1
v0.12.0-beta2
v0.12.0-beta1
v0.11.0
v0.10.8
v0.10.7
v0.10.6
v0.10.5
v0.10.4
v0.10.3
v0.10.2
v0.10.1
v0.10.0
v0.9.3
v0.9.2
v0.9.1
v0.9.0
v0.8.1
v0.8.0
v0.7.1
v0.7.0
v0.6.1
v0.6.0
v0.5.2
v0.5.1
v0.5.0
v0.4.0
v0.3.6
v0.3.5
v0.3.4
v0.3.3
v0.3.2
v0.3.1
v0.3.0
v0.2.2
v0.2.1
v0.2.0
v0.1.1
v0.1.0
Labels
Clear labels
CLI
DERP
DNS
Nix
OIDC
SSH
bug
database
documentation
duplicate
enhancement
faq
good first issue
grants
help wanted
might-come
needs design doc
needs investigation
no-stale-bot
out of scope
performance
policy 📝
pull-request
question
regression
routes
stale
tags
tailscale-feature-gap
well described ❤️
wontfix
Mirrored from GitHub Pull Request
No Label
bug
Milestone
No items
No Milestone
Projects
Clear projects
No project
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: starred/headscale#1120
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Haarolean on GitHub (Oct 28, 2025).
Is this a support request?
Is there an existing issue for this?
Current Behavior
After an upgrade from
0.27.0-beta.2to0.27.0my node got yoinked out. It was set up in march and worked fine until now.As you can see, the node is not expired in headscale cli, however it can not connect.
Node info:
Key info (unrelated I guess):
Node logs:
Headscale logs don't show anything suspicious, I got a few "Cleaning up node that has been offline for too long" for the other nodes, but these are a bit weird too — these nodes have been online today
Expected Behavior
expected it to not happen
Steps To Reproduce
no idea
Environment
Runtime environment
Debug information
provided in "current behavior"
@Haarolean commented on GitHub (Oct 28, 2025):
Tried to downgrade, reauth the node and upgrade again — couldn't reproduce this, the node stays online.
@Nathanael-Mtd commented on GitHub (Oct 28, 2025):
Hello, I think I got the same issue on 0.27.0, with Tailscale on container (Docker/Podman), when I rollback to 0.26.x it works fine.
If the connected node was online during upgrade from 0.26.0 to 0.27.0, it keeps connected, but after a restart, auth fails.
If I generate new pre-authkey (not re-usable), login work, but after a restart, I got the same issue.
@Haarolean Can you check if you can reproduce the issue like how I've done ?
@Haarolean commented on GitHub (Oct 28, 2025):
Can confirm, restarting the node results in it being logged out, again.
@aalmenar commented on GitHub (Nov 5, 2025):
Exactly what @Nathanael-Mtd reported here happened to me also.
Maybe its related to the in-memory change that also affects OIDC session expiration as reported here.
@kradalby commented on GitHub (Nov 5, 2025):
Can you guys try https://github.com/juanfont/headscale/pull/2859?
@jerkovicl commented on GitHub (Nov 12, 2025):
i still see this error in logs even with latest version
EDIT:
I am using docker setup on ubuntu with keycloak as oidc for headscale and headplane with tailscale container as exit node.
Everything is working except agent integration since it throws the error mentioned above on startup
@kradalby do you need headplane config?
Docker compose :
Headscale config:
@kradalby commented on GitHub (Nov 12, 2025):
We need a bit more info, description of your setup, config etc, see https://headscale.net/stable/ref/debug/
@Haarolean commented on GitHub (Nov 22, 2025):
@kradalby I can confirm this is NOT fixed. What kind of details do you need? I don't use a db, my ACLs are boring, config is kinda standard
client:
server (running 0.27.1):
Also, please note that the other user experiencing this has replied with their config details above.
Could we reopen this?
@kradalby commented on GitHub (Nov 24, 2025):
@Haarolean, can you give me the output of list of the pre auth keys you have? Does this happen to hosts where the authkey still exists? still valid? not valid but exists?
Same info is interesting from other people seeing this issue.
It is not helpful to not give more information and referring to other people posting info. If we didnt manage to resolve it the first time, then we likely need more.
@Haarolean commented on GitHub (Nov 24, 2025):
@kradalby while preparing a list of keys for you, I remembered that I've previously moved a node to a different user. Moving it back now made the node re-auth successfully.
So, the question is, how is that supposed to work? Should the preauthkeys be retained and not deleted even after they've been used? Should we also be able to move the keys between the users, like nodes?
This is the key used by that problematic node:
178156d4f23618:/# headscale preauthkeys list -u 1
I believe I'm providing everything related without withholding :)
@kradalby commented on GitHub (Nov 24, 2025):
I think this is the bug. Some variant of a check I wrote seem to wrongly check if either:
Which is not relevant after the first auth.
But I wanted to confirm it as I am finding it hard to reproduce outside of this theory.
@Haarolean commented on GitHub (Nov 24, 2025):
Yeah it seems that's it. Moving the node back and forth reproduces the issue. Is there anything else I could provide?
@kradalby commented on GitHub (Nov 25, 2025):
@Haarolean can you try: https://github.com/juanfont/headscale/pull/2917
@Haarolean commented on GitHub (Nov 25, 2025):
@kradalby sorry I wasn't able to build your branch — spent an hour trying to fix, build, and publish my fork, got stuck on the token missing some permissions: https://github.com/Haarolean/headscale/actions/runs/19682568607/job/56379983390
@kradalby commented on GitHub (Nov 30, 2025):
I've made a rc.1 release for 0.27.2 with fixes, would be great if you can test this and then close this (or give feedback so I can).
@Haarolean commented on GitHub (Dec 1, 2025):
@kradalby didn't help it seems. Moving the node back to the original user, the owner of the preauthkey, fixes the "expired" key, but that's it. I see some ACL changes in the changelog. Do you want me to upload my ACLs to take a look? Idk if that's related anyhow.
@kradalby commented on GitHub (Dec 2, 2025):
hmm, interesting, is this pre auth key in use? can you delete it and see what happens?
@kradalby commented on GitHub (Dec 2, 2025):
In general, I would advise against using the
movefeature, it is broken, and it will be removed in the next release.edit: for people seeing this, the correct way to change user is to re-authenticate with the correct user or auth key
@Haarolean commented on GitHub (Dec 13, 2025):
@kradalby is there a bug at all then? given
moveis deprecated, it shouldn't be possible to move a node between users and expect it to work with the key of a previous user. I think we should close the issue if that's the case.@kradalby commented on GitHub (Dec 14, 2025):
Yes, I think that is reasonable, it will be "resolved" in 0.28 as move is removed.
@Haarolean commented on GitHub (Dec 14, 2025):
@kradalby thank you very much for your help and maintaining headscale ❤️