i have a problem. When installing GVM 22.04 on Ubuntu 20.04 gsad doesn’t start, it stops at Active: activating.
Other services status is ok (notus-scanner, ospd-openvas and gvmd) = Active: active (running)
What is supposed to be the problem here?
I’ve seen these problems thanks to the distributed systemd unit file (/lib/systemd/system/gsad.service, generated from gsad.service.in) using Type=forking rather than Type=exec and passing the --foreground flag to gsad.
For some reason, systemd loses track of the gsad process (once it’s double-forked away or something, I haven’t bothered looking in to that) and then is unable to stop it. This means that when you next try to start gsad the old one is actually still running, so it can’t bind a listener or open a new pid file, and fails hard.
My solution is to change the systemd unit to Type=exec so that systemd can actually track the process properly, and then everything works better. I haven’t been bothered submitting a PR against the upstream source (I should probably do that) but rather I just drop this override in place:
/etc/systemd/system/gsad.service.d/override.conf
I’ve never had issues in the past with the systemd service path but this might fix it. I’ll check your PR after my vacation and likely update our docs with this change too.