GVM 11 unable to start

Port 443 (https) is a privileged port; it can only be binded with root privileges. That’s the reason why you should run gsad via systemd. The process is then started as root to open the privileged port, and then drop it’s privileges to the normal user. Assuming the user gsad should run as is gvmd, you must have a gsad.service system file in your /etc/systemd/system directory.

The gsad.service should contain this:

[Unit]
Description=Job that runs the gsa daemon
Documentation=man:gsa
After=postgresql.service

[Service]
Type=forking
PIDFile=/opt/gvm/var/run/gsad.pid
WorkingDirectory=/opt/gvm
ExecStart=/opt/gvm/sbin/gsad --drop-privileges=gvm -p 443 -k /opt/gvm/var/lib/gvm/private/CA/serverkey.pem -c /opt/gvm/var/lib/gvm/CA/servercert.pem --timeout=3600 --munix-socket=/opt/gvm/var/run/gvmd.sock
Restart=on-failure
RestartSec=2min
KillMode=process
KillSignal=SIGINT
GuessMainPID=no
PrivateTmp=true

[Install]
WantedBy=multi-user.target

Then enable this service file with:

sudo systemctl enable gsad

Then start gsad with:

sudo systemctl start gsad

Also you should not use /tmp folder to store your ospd socket. Use /opt/gvm/var/run instead, as explained in the documentation. Using /tmp is likely to create you troubles. So you should start gvmd like this:

gvmd -v --listen=192.168.1.100 --port=9390 --osp-vt-update=/opt/gvm/var/run/ospd.sock

Again create a systemd file for this purpose too (see the slashdot tutorial again).

It seems also you did not use the " -DCMAKE_INSTALL_PREFIX=/opt/gvm" flag before building your sources. GSAD should not use /usr/local/var/log/gvm to create it’s logfile, it’s likely to create you permissions problems. Same for gvmd.log file. Again; build everything under the gvm user in /opt/gvm source tree. Failing to do this will take you to permission problems.

1 Like