opnsense / opnsense/plugins

Reboot held up by Crowdsec refusing to stop

Open
#4,262 48 comments 14 reactions 1 assignee View on GitHub

@mmetc is already working on this.

Since Oct 9, 2024.

upstream
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:

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:

  1. Install an update which requires reboot OR choose: Power -> Reboot -> Yes
  2. Expect it to reboot: find it is not
  3. 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)
  4. 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 reboot from that same ssh session
    • OTOH, if a reboot is attempted prior to killing Crowdsec, that will fail for waiting for Crowdsec to quit nicely, requiring step 3 above

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.