Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stopping via systemd leads to kill after timeout #663

Closed
nblock opened this issue Jun 25, 2022 · 3 comments
Closed

Stopping via systemd leads to kill after timeout #663

nblock opened this issue Jun 25, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@nblock
Copy link
Collaborator

nblock commented Jun 25, 2022

Bug description

Invoking: systemctl restart headscale hangs until systemd hits the stop timeout. Afterwards headscale is killed.

To Reproduce

Systemd service file:

[Unit]
Description=Headscale (version: 0.16.0-beta4)
[Service]
Type=simple
User=headscale
Group=headscale
RuntimeDirectory=headscale
Environment=GIN_MODE=release
ExecStart=/usr/local/bin/headscale serve
ExecReload=/usr/bin/kill -HUP $MAINPID
Restart=always
RestartSec=5
ReadWritePaths=/var/lib/headscale/.headscale
ReadWritePaths=/var/run/headscale

[Install]
WantedBy=multi-user.target

Logs:

headscale.service: State 'stop-sigterm' timed out. Killing.                   
headscale.service: Killing process 31565 (headscale) with signal SIGKILL.                                                                                                                                  
headscale.service: Killing process 31566 (headscale) with signal SIGKILL.                                                                                                                                  
headscale.service: Killing process 31567 (headscale) with signal SIGKILL.                                                                                                                                  
headscale.service: Killing process 31568 (n/a) with signal SIGKILL.                                                                                                                                        
headscale.service: Killing process 31569 (headscale) with signal SIGKILL.     
headscale.service: Killing process 31570 (headscale) with signal SIGKILL.                                                                                                                                  
headscale.service: Killing process 31571 (headscale) with signal SIGKILL.                                                                                                                                  
headscale.service: Killing process 31572 (headscale) with signal SIGKILL.      
headscale.service: Main process exited, code=killed, status=9/KILL                                                                                                                                         
headscale.service: Failed with result 'timeout'.                                                                                                                                                           
Stopped Headscale (version: 0.16.0-beta4).  

Context info
Headscale: 0.16.-beta4

@nblock nblock added the bug Something isn't working label Jun 25, 2022
@juanfont
Copy link
Owner

This should be fixed in #656

@juanfont
Copy link
Owner

Can you try https://github.com/juanfont/headscale/releases/tag/v0.16.0-beta5 ?

@nblock
Copy link
Collaborator Author

nblock commented Jun 26, 2022

Can you try https://github.com/juanfont/headscale/releases/tag/v0.16.0-beta5 ?

Looks good: systemctl stop headscale finishes in a few seconds with beta5.

@nblock nblock closed this as completed Jun 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants