Gsad cant write pid file after reboot

Hello,
yesterday I installed a fresh version of debian 11 along this manual:

all went fine and finally wotks. After a reboot gsad is not able to write an pid-file:
gsad main:MESSAGE:2022-01-19 13h52.09 utc:3478: Starting GSAD version 21.4.3
gsad main:CRITICAL:2022-01-19 13h52.09 utc:3479: main: Could not write PID file.

But all services seems to be fine and up:
md main:MESSAGE:2022-01-20 10h17.20 utc:680: Greenbone Vulnerability Manager version 21.4.5~dev1~git-680b3265-stable (GIT revision 680b3265-stable) (DB revision 242)
libgvm util:MESSAGE:2022-01-20 10h17.23 utc:681: Setting GnuPG dir to ‘/var/lib/gvm/gvmd/gnupg’
libgvm util:MESSAGE:2022-01-20 10h17.23 utc:681: Using OpenPGP engine version ‘2.2.27’

OSPD[442] 2022-01-20 11:00:49,034: INFO: (ospd.main) Starting OSPd OpenVAS version 21.4.5.dev1.

root@openvas:/opt/gvm# systemctl status gvmd
systemctl status gsad
systemctl status ospd-openvas
● gvmd.service - Greenbone Vulnerability Manager daemon (gvmd)
Loaded: loaded (/lib/systemd/system/gvmd.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2022-01-20 11:17:20 CET; 3min 58s ago
Docs: man:gvmd(8)
Main PID: 681 (gvmd)
Tasks: 1 (limit: 4678)
Memory: 102.7M
CPU: 949ms
CGroup: /system.slice/gvmd.service
└─681 gvmd: Waiting for incoming connections

Jan 20 11:17:20 openvas systemd[1]: Starting Greenbone Vulnerability Manager daemon (gvmd)…
Jan 20 11:17:20 openvas systemd[1]: Started Greenbone Vulnerability Manager daemon (gvmd).
● gsad.service - Greenbone Security Assistant daemon (gsad)
Loaded: loaded (/lib/systemd/system/gsad.service; enabled; vendor preset: enabled)
Active: active (exited) since Thu 2022-01-20 11:18:14 CET; 3min 4s ago
Docs: man:gsad(8)
https://www.greenbone.net
Main PID: 735 (code=exited, status=0/SUCCESS)
Tasks: 0 (limit: 4678)
Memory: 4.0K
CPU: 28ms
CGroup: /system.slice/gsad.service

Jan 20 11:18:14 openvas systemd[1]: Started Greenbone Security Assistant daemon (gsad).
Jan 20 11:18:14 openvas sudo[735]: gvm : PWD=/ ; USER=root ; COMMAND=/usr/local/sbin/gsad -k /var/lib/gvm/private/CA/clientkey.pem -c /var/lib/gvm/CA/clientcert.pem
Jan 20 11:18:14 openvas sudo[735]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=998)
Jan 20 11:18:14 openvas sudo[736]: Oops, secure memory pool already initialized
Jan 20 11:18:14 openvas sudo[735]: pam_unix(sudo:session): session closed for user root
● ospd-openvas.service - OSPd Wrapper for the OpenVAS Scanner (ospd-openvas)
Loaded: loaded (/etc/systemd/system/ospd-openvas.service; enabled; vendor preset: enabled)
Active: active (exited) since Thu 2022-01-20 11:00:46 CET; 20min ago
Main PID: 442 (code=exited, status=0/SUCCESS)
Tasks: 4 (limit: 4678)
Memory: 666.0M
CPU: 1min 49.079s
CGroup: /system.slice/ospd-openvas.service
├─455 /usr/bin/python3 /opt/gvm/.local/bin/ospd-openvas --pid-file /var/run/gvm/ospd-openvas.pid --log-file /var/log/gvm/ospd-openvas.log --lock-file-dir /var/run/gvm> └─457 /usr/bin/python3 /opt/gvm/.local/bin/ospd-openvas --pid-file /var/run/gvm/ospd-openvas.pid --log-file /var/log/gvm/ospd-openvas.log --lock-file-dir /var/run/gvm>
Jan 20 11:00:46 openvas systemd[1]: Starting OSPd Wrapper for the OpenVAS Scanner (ospd-openvas)…
Jan 20 11:00:46 openvas systemd[1]: Started OSPd Wrapper for the OpenVAS Scanner (ospd-openvas).

But also the normal cli-commands dont work:

root@openvas:/opt/gvm# gsad --version
bash: gsad: Kommando nicht gefunden.
root@openvas:/opt/gvm# gvmd --version
bash: gvmd: Kommando nicht gefunden.

I actually dont know whats going wrong here.

Kind regards,

Hi @d4ch5 and welcome to the forum :slight_smile:

There are some things to look at- check the log at /var/log/gvm/gvmd.log for messages.

Compare the install guide you used to the one here: Building GVM 21.04 — Greenbone Documentation documentation

If you still can’t track it down, the recommended way to install from source is by using the guide I linked to, so give that a try.

If the /var/run is a memory filesystem, your startup scripts needs to create the directories and permissions every time you boot your system.

1 Like

Hello,
that was the only thing that were logged since the last successful start.

But anyway I discussed this with some-colleagues. We think that there is an issue in our installation causing of not up to date manual that I linked.

Anyway… I installed all on a fresh rocky-linux from the atomic-repo all went fine.

1 Like

Hi @d4ch5,

Cool! I’m glad it’s working now and thanks for letting us know.

Hello,
sorry for the late reply, currently very busy with work.
A few weeks ago I wrote an article/guide for installing OpenVAS on Red Hat Linux.
The article was published by the security-blog ceos3c.com.

You can find it here.

I hope this helps someone if people searching for this.

1 Like

Hi @d4ch5,

That is very cool!

1 Like