Reboot held up by Crowdsec refusing to stop
@mmetc is already working on this.
Since Oct 9, 2024.
- Dominant language
- PHP
- Stars
- 1.2k
- Forks
- 863
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 10
Description
Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
- I have read the contributing guide lines at https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md
- I have searched the existing issues, open and closed, and I'm convinced that mine is new.
- The title contains the plugin to which this issue belongs
Describe the bug
I've lost track of which release this started with (for me). I regret not bringing this up when it began. But the trouble is that rebooting OPNsense is held up by Crowdsec "refusing" to quit. Others have faced this this as well.
Specifically (and for me, most commonly), this occurs for updates requiring reboot. The update log reported to the webUI ends with something like:
[39/48] Upgrading crowdsec from 1.6.2_4 to 1.6.3_1...
[39/48] Extracting crowdsec-1.6.3_1: .......... done
crowdsec is running as pid 84792.
Stopping crowdsec.
Waiting for PIDS: 84792
It will hang there until I ssh in, and kill that PID, resulting in it proceeding with the updates and automated reboot.
To Reproduce
Steps to reproduce the behavior:
- Install an update which requires reboot OR choose: Power -> Reboot -> Yes
- Expect it to reboot: find it is not
- Kill the Crowdsec processes:
pkill -9 -f 'daemon: crowdsec'pkill -9 -f 'crowdsec -c'(this PID may also need to be whacked, but not always)
- Not that the reboot proceeds (if held up for an update, the update log in webUI will resume progressing)
- … though sometimes it still won't and additionally requires a
rebootfrom that same ssh session - OTOH, if a
rebootis attempted prior to killing Crowdsec, that will fail for waiting for Crowdsec to quit nicely, requiring step 3 above
- … though sometimes it still won't and additionally requires a
Expected behavior
That a reboot triggered will have no problem killing/quitting all running processes, and finally resulting in rebooting the system.
Screenshots
n/a
Relevant log files
(none that I could find, aside from update log in webUI pasted above)
Additional context
Once this behavior started, it has been consistently like this, every time.
Environment
OPNsense 24.7.4_1-amd64
FreeBSD 14.1-RELEASE-p4
OpenSSL 3.0.15
System: Supermicro SYS-E302-9D
CPU: Intel(R) Xeon(R) D-2123IT CPU @ 2.20GHz
Network: Intel I350-AM4 & Intel X557
Contributor 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.
Assessment
This issue has not been assessed yet.