Wrong API call will cause headscaled down #591

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

Originally created by @ChowDPa02k on GitHub (Dec 8, 2023).

Bug description

I guess the API has changed in the new version https://github.com/juanfont/headscale/pull/1553

Currently, the community web-UIs haven't updated to adapt the alpha version, e.g. Im using https://github.com/simcu/headscale-ui, it will request api like /api/v1/machines (Im not able to reproduce now, cuz every time I access this webui headscale will down, so i disabled webui temporarily), which returns some JSON of error info.

Some logic issue exists behind this webui: when it failed to get correct respond from API, it will retry fast, at about 4 times per sec.

Then Headscale deamon will down, every command from shell returns:

FTL ../runner/work/headscale/headscale/cmd/headscale/cli/utils.go:141 > Could not connect: context deadline exceeded error="context deadline exceeded"
# or
Cannot get nodes: context deadline exceeded

Clients will show:

# Health check:
#     - not in map poll

But it won't exit or restart, just hanging there, taking up and listing specific ports. systemctl status headscale will show running, and logs wouldn't tell anything about the deamon are actually down.

I must maunally restart by systemctl restart headscale.

Environment

  • OS: Ubuntu 20.04 LTS x86_64
  • Headscale version: v0.23.0-alpha1
  • Tailscale version: unrelated
  • [Y] Headscale is behind a (reverse) proxy
  • [N] Headscale runs in a container

To Reproduce

  1. deploy headscale v0.23.0-alpha1
  2. deploy https://github.com/simcu/headscale-ui
  3. generate an api key
  4. access webui, login with api key
  5. webui will show error rapidly
  6. headscale down
Originally created by @ChowDPa02k on GitHub (Dec 8, 2023). <!-- Before posting a bug report, discuss the behaviour you are expecting with the Discord community to make sure that it is truly a bug. The issue tracker is not the place to ask for support or how to set up Headscale. Bug reports without the sufficient information will be closed. Headscale is a multinational community across the globe. Our language is English. All bug reports needs to be in English. --> ## Bug description I guess the API has changed in the new version https://github.com/juanfont/headscale/pull/1553 Currently, the community web-UIs haven't updated to adapt the alpha version, e.g. Im using https://github.com/simcu/headscale-ui, it will request api like `/api/v1/machines` (Im not able to reproduce now, cuz every time I access this webui headscale will down, so i disabled webui temporarily), which returns some JSON of error info. Some logic issue exists behind this webui: when it failed to get correct respond from API, it will retry fast, at about 4 times per sec. Then Headscale deamon will down, every command from shell returns: ```sh FTL ../runner/work/headscale/headscale/cmd/headscale/cli/utils.go:141 > Could not connect: context deadline exceeded error="context deadline exceeded" # or Cannot get nodes: context deadline exceeded ``` Clients will show: ``` # Health check: # - not in map poll ``` But **it won't exit or restart, just hanging there, taking up and listing specific ports.** `systemctl status headscale` will show running, and logs wouldn't tell anything about the deamon are actually down. I must maunally restart by `systemctl restart headscale`. ## Environment <!-- Please add relevant information about your system. For example: - Version of headscale used - Version of tailscale client - OS (e.g. Linux, Mac, Cygwin, WSL, etc.) and version - Kernel version - The relevant config parameters you used - Log output --> - OS: Ubuntu 20.04 LTS x86_64 - Headscale version: [v0.23.0-alpha1](https://github.com/juanfont/headscale/releases/tag/v0.23.0-alpha1) - Tailscale version: unrelated <!-- We do not support running Headscale in a container nor behind a (reverse) proxy. If either of these are true for your environment, ask the community in Discord instead of filing a bug report. --> - [Y] Headscale is behind a (reverse) proxy - [N] Headscale runs in a container ## To Reproduce 1. deploy headscale v0.23.0-alpha1 2. deploy https://github.com/simcu/headscale-ui 3. generate an api key 4. access webui, login with api key 5. webui will show error rapidly 6. headscale down
adam added the stalebug labels 2025-12-29 02:20:54 +01:00
adam closed this issue 2025-12-29 02:20:54 +01:00
Author
Owner

@github-actions[bot] commented on GitHub (Mar 8, 2024):

This issue is stale because it has been open for 90 days with no activity.

@github-actions[bot] commented on GitHub (Mar 8, 2024): This issue is stale because it has been open for 90 days with no activity.
Author
Owner

@github-actions[bot] commented on GitHub (Mar 15, 2024):

This issue was closed because it has been inactive for 14 days since being marked as stale.

@github-actions[bot] commented on GitHub (Mar 15, 2024): This issue was closed because it has been inactive for 14 days since being marked as stale.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#591