tsnet: control accepts node key (machineAuthorized=true) but serves a netmap with no addresses, client hangs in Starting forever
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- go
- Domain
- networking
Research direction
Start from the logs attached to the report, looking for the netmap: self line and the active login: <missing-profile> line that follow a registration with machineAuthorized=true. The payload does not name the source files, so trace the path from Server.Up() through the state transition from NoState to Starting. Done means either that copied state with an expired or mismatched key ends in NeedsLogin with a visible error, or that the netmap includes addresses and the client reaches Running.
Written by the indexing model from the issue text.
Description
What is the issue?
tsnet: node key accepted (machineAuthorized=true) but control returns a netmap with no addresses, client stuck in Starting forever
What I did
- I have a tsnet app that ran on my Mac for about 2 weeks. It was last online Oct 28.
- I stopped it, copied its tsnet state dir (
tailscaled.state,profile-data/,certs/) over to a Linux box, and started the same app there with the sameHostnameandDir. tailscale.com v1.104.2.
What happened
RegisterReq: onode= node=[hFfst]got backnodeKeyExpired=false,machineAuthorized=true,authURL=false, so control accepted the key.- The netmap that came back had nothing in it for me:
netmap: self: [hFfst] auth=machine-authorized u=userid:… [], thenactive login: <missing-profile>andnetmap: suggested exit node: no preferred DERP. - State went
NoState -> Startingand stayed there. Never hit Running, soServer.Up()just blocks forever. - The admin console kept showing the device as last seen Oct 28 and "Machine not connected", even though the node key it listed was the same one my client was sending.
- I tried this 3 times over about 15 minutes, same thing every time.
Workaround
TSNET_FORCE_LOGIN=1with a reusable auth key fixed it right away:RegisterReq: onode=[hFfst] node=[xh+EY], the map came back with addresses,Starting -> Runningin about a second, and the console updated the same device with the same IP.
What I'd expect
- Either reject the old key so the client lands in NeedsLogin and I can actually see something is wrong, or send the full map. Accepting the registration and then sending an empty map just leaves tsnet apps hanging in
Up()with no error anywhere.
Logs attached (tsnet Logf output) for the stuck run and the forced-login run.
relayd-debug.log
relayd-debug2.log
Steps to reproduce
- Run a tsnet app with a fixed
HostnameandDiron machine A (mine was a Mac, tailscale.com v1.104.2). Let it join the tailnet and run for a while. Mine ran about 2 weeks and was last online Oct 28. - Stop it.
- Copy the state dir (
tailscaled.state,profile-data/,certs/) to machine B (mine was Arch Linux). - Start the same app on machine B with the same
HostnameandDir, andTS_AUTHKEYset to a reusable key.
What happens:
- tsnet logs
Authkey is set; but state is NoState. Ignoring authkeyand uses the copied state. RegisterReq: onode= node=[hFfst]comes backnodeKeyExpired=false,machineAuthorized=true,authURL=false.- The netmap has nothing for me:
netmap: self: [hFfst] auth=machine-authorized u=userid:… [], thenactive login: <missing-profile>andnetmap: suggested exit node: no preferred DERP. - State goes
NoState -> Startingand stays there. Never Running, soServer.Up()blocks forever. - The admin console keeps showing the device as last seen Oct 28, "Machine not connected", even though the node key it lists is the one my client is sending.
- Tried 3 times over about 15 minutes, same every time.
Are there any recent changes that introduced the issue?
All I did was move from a Mac to a Linux box.
OS
Linux
OS version
Arch Linux, kernel 7.2.2-arch1-1
Tailscale version
tailscale.com v1.104.2 via tsnet (Go 1.27.3)
Other software
This was found on Linux but the state came from macOS 26.6.2.
Bug report
No tailscale CLI (tsnet). BackendLogID from the tsnet log: 76bd57ac7c85a9644f4ffd673b43fe99d6ccc88c6aace6ca41f86eb73cfcfccb
- Dominant language
- Go
- Stars
- 38.8k
- Forks
- 3.4k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 194
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from tailscale/tailscale
-
FR: update golang.org/x/sys to v0.50.0Possibly taken @wrenix claimed this today. Openfr needs-triage
Difficulty 2/5 Under an hour Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
fr
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
bug kubernetes
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Maintainers usually reply within 1 day
-
Document using Docker Compose secrets support for TS_AUTHKEYPossibly taken @Marouane-elfadli claimed this 6 days ago. OpenDocumentation
Difficulty 1/5 1-3 hours Newbie friendliness 84/100
tailscale/tailscale#22214 · 1 reaction ·
Maintainers usually reply within 1 day
-
fr OS-linux
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
All issues in tailscale/tailscale
Similar issues
-
area: interop area: sip-core v3
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
fonoster/routr#705 · 1 comment ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
-
kind/bug require/reproduce require/severity
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
oxc-project/tsgolint#1362 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
hashicorp/terraform-provider-google#30703 ·
Maintainers usually reply within 1 day