[Bug] Fatal Error: Did not find expected key #775

Closed
opened 2025-12-29 02:23:53 +01:00 by adam · 2 comments
Owner

Originally created by @xopherKPMG on GitHub (Aug 29, 2024).

Is this a support request?

  • This is not a support request

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I attempted to update my Headscale configuration with a newer version. When I attempted to start headscale I received the error:

● headscale.service - headscale coordination server for Tailscale
     Loaded: loaded (/usr/lib/systemd/system/headscale.service; enabled; preset: enabled)
     Active: activating (auto-restart) (Result: exit-code) since Thu 2024-08-29 13:42:45 UTC; 76ms ago
    Process: 2624 ExecStart=/usr/bin/headscale serve (code=exited, status=1/FAILURE)
   Main PID: 2624 (code=exited, status=1/FAILURE)
        CPU: 43ms
2024-08-29T13:43:20Z WRN Failed to read configuration from disk error="While parsing config: yaml: line 12: did not find expected key"
2024-08-29T13:43:20Z FTL ../runner/work/headscale/headscale/cmd/headscale/cli/root.go:48 > Error loading config error="fatal error reading config file: While parsing config: yaml: line 12: did not find expected key"

I tried to do a fresh install on a different machine. I am seeing the exact same error. This makes no sense to me as I had everything working earlier today.

Expected Behavior

Headscale should start up normally.

Steps To Reproduce

  1. Perform a fresh install of headscale - download latest release from here: https://github.com/juanfont/headscale/releases/download/v0.22.3/headscale_0.22.3_linux_amd64.deb
  2. follow the instructions for configuring and enabling headscale
  3. sudo systemctl start headscale

Environment

- OS:Ubuntu 24.04 LTS 
- Headscale version: v0.22.3

Runtime environment

  • Headscale is behind a (reverse) proxy
  • Headscale runs in a container

Anything else?

No response

Originally created by @xopherKPMG on GitHub (Aug 29, 2024). ### Is this a support request? - [X] This is not a support request ### Is there an existing issue for this? - [X] I have searched the existing issues ### Current Behavior I attempted to update my Headscale configuration with a newer version. When I attempted to start headscale I received the error: ``` ● headscale.service - headscale coordination server for Tailscale Loaded: loaded (/usr/lib/systemd/system/headscale.service; enabled; preset: enabled) Active: activating (auto-restart) (Result: exit-code) since Thu 2024-08-29 13:42:45 UTC; 76ms ago Process: 2624 ExecStart=/usr/bin/headscale serve (code=exited, status=1/FAILURE) Main PID: 2624 (code=exited, status=1/FAILURE) CPU: 43ms ``` ``` 2024-08-29T13:43:20Z WRN Failed to read configuration from disk error="While parsing config: yaml: line 12: did not find expected key" 2024-08-29T13:43:20Z FTL ../runner/work/headscale/headscale/cmd/headscale/cli/root.go:48 > Error loading config error="fatal error reading config file: While parsing config: yaml: line 12: did not find expected key" ``` I tried to do a fresh install on a different machine. I am seeing the exact same error. This makes no sense to me as I had everything working earlier today. ### Expected Behavior Headscale should start up normally. ### Steps To Reproduce 1. Perform a fresh install of headscale - download latest release from here: https://github.com/juanfont/headscale/releases/download/v0.22.3/headscale_0.22.3_linux_amd64.deb 2. follow the instructions for configuring and enabling headscale 3. sudo systemctl start headscale ### Environment ```markdown - OS:Ubuntu 24.04 LTS - Headscale version: v0.22.3 ``` ### Runtime environment - [ ] Headscale is behind a (reverse) proxy - [ ] Headscale runs in a container ### Anything else? _No response_
adam added the bug label 2025-12-29 02:23:53 +01:00
adam closed this issue 2025-12-29 02:23:53 +01:00
Author
Owner

@kradalby commented on GitHub (Aug 30, 2024):

can you please post the failing yaml? I suspect you have a tab character in it or something, 0.22.3 has been out for a while, so this is likely a user error and you should ask in Discord.

@kradalby commented on GitHub (Aug 30, 2024): can you please post the failing yaml? I suspect you have a `tab` character in it or something, 0.22.3 has been out for a while, so this is likely a user error and you should ask in Discord.
Author
Owner

@xopherKPMG commented on GitHub (Aug 30, 2024):

After some debugging it does appear that there was a tab character out of place. After formatting the config file it works as normal

@xopherKPMG commented on GitHub (Aug 30, 2024): After some debugging it does appear that there was a tab character out of place. After formatting the config file it works as normal
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#775