[Bug] SIGHUP complains about ACL errors when no ACL is configured #881

Closed
opened 2025-12-29 02:25:11 +01:00 by adam · 0 comments
Owner

Originally created by @nblock on GitHub (Dec 14, 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

When no ACL is configured and headscale receives a SIGHUP it prints the following error message:

2024-12-14T19:42:19+01:00 INF Received SIGHUP, reloading ACL and Config signal=hangup
2024-12-14T19:42:19+01:00 ERR failed to set new policy error="parsing policy: parsing hujson, err: hujson: line 1, column 1: parsing value: unexpected EOF"

Expected Behavior

Only process and print policy related errors on SIGHUP when a policy is configured.

Steps To Reproduce

  1. Use the following configuration (default):
policy:
  # The mode can be "file" or "database" that defines
  # where the ACL policies are stored and read from.
  mode: file
  # If the mode is set to "file", the path to a
  # HuJSON file containing ACL policies.
  path: ""
  1. Send SIGHUP: kill -HUP $(pidof headscale_0.24.0-beta.1_linux_amd64)
  2. Headscale logs:
024-12-14T19:45:24+01:00 INF Received SIGHUP, reloading ACL and Config signal=hangup
2024-12-14T19:45:24+01:00 ERR failed to set new policy error="parsing policy: parsing hujson, err: hujson: line 1, column 1: parsing value: unexpected EOF"

This works fine on Headscale 0.23.0: kill -HUP $(pidof headscale_0.23.0_linux_amd64):

2024-12-14T19:46:35+01:00 INF Received SIGHUP, reloading ACL and Config signal=hangup

Environment

- OS: Arch
- Headscale version: 0.24.0-beta.1
- Tailscale version: -

Runtime environment

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

Anything else?

No response

Originally created by @nblock on GitHub (Dec 14, 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 When no ACL is configured and headscale receives a SIGHUP it prints the following error message: ``` 2024-12-14T19:42:19+01:00 INF Received SIGHUP, reloading ACL and Config signal=hangup 2024-12-14T19:42:19+01:00 ERR failed to set new policy error="parsing policy: parsing hujson, err: hujson: line 1, column 1: parsing value: unexpected EOF" ``` ### Expected Behavior Only process and print policy related errors on SIGHUP when a policy is configured. ### Steps To Reproduce 1. Use the following configuration (default): ```yaml policy: # The mode can be "file" or "database" that defines # where the ACL policies are stored and read from. mode: file # If the mode is set to "file", the path to a # HuJSON file containing ACL policies. path: "" ``` 2. Send SIGHUP: `kill -HUP $(pidof headscale_0.24.0-beta.1_linux_amd64)` 3. Headscale logs: ``` 024-12-14T19:45:24+01:00 INF Received SIGHUP, reloading ACL and Config signal=hangup 2024-12-14T19:45:24+01:00 ERR failed to set new policy error="parsing policy: parsing hujson, err: hujson: line 1, column 1: parsing value: unexpected EOF" ``` --- This works fine on Headscale 0.23.0: `kill -HUP $(pidof headscale_0.23.0_linux_amd64)`: ``` 2024-12-14T19:46:35+01:00 INF Received SIGHUP, reloading ACL and Config signal=hangup ``` ### Environment ```markdown - OS: Arch - Headscale version: 0.24.0-beta.1 - Tailscale version: - ``` ### Runtime environment - [ ] Headscale is behind a (reverse) proxy - [ ] Headscale runs in a container ### Anything else? _No response_
adam added the bugpolicy 📝 labels 2025-12-29 02:25:11 +01:00
adam closed this issue 2025-12-29 02:25:11 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#881