Compiled Install: gsad service will not run

Hello,

I am getting the following errors in the log file:

Apr 14 23:56:12 orangepi5-plus systemd[1]: Starting gsad.service - Greenbone Security Assistant daemon (gsad)...
Apr 14 23:56:12 orangepi5-plus systemd[1]: Started gsad.service - Greenbone Security Assistant daemon (gsad).
Apr 14 23:56:12 orangepi5-plus systemd[1]: gsad.service: Main process exited, code=exited, status=1/FAILURE
Apr 14 23:56:12 orangepi5-plus systemd[1]: gsad.service: Failed with result 'exit-code'.
Apr 14 23:56:13 orangepi5-plus systemd[1]: gsad.service: Scheduled restart job, restart counter is at 1.
Apr 14 23:56:13 orangepi5-plus systemd[1]: Stopped gsad.service - Greenbone Security Assistant daemon (gsad).
Apr 14 23:56:13 orangepi5-plus systemd[1]: Starting gsad.service - Greenbone Security Assistant daemon (gsad)...
Apr 14 23:56:13 orangepi5-plus systemd[1]: Started gsad.service - Greenbone Security Assistant daemon (gsad).
Apr 14 23:56:13 orangepi5-plus systemd[1]: gsad.service: Main process exited, code=exited, status=1/FAILURE
Apr 14 23:56:13 orangepi5-plus systemd[1]: gsad.service: Failed with result 'exit-code'.
Apr 14 23:56:13 orangepi5-plus systemd[1]: gsad.service: Scheduled restart job, restart counter is at 2.
Apr 14 23:56:13 orangepi5-plus systemd[1]: Stopped gsad.service - Greenbone Security Assistant daemon (gsad).
Apr 14 23:56:13 orangepi5-plus systemd[1]: Starting gsad.service - Greenbone Security Assistant daemon (gsad)...
Apr 14 23:56:13 orangepi5-plus systemd[1]: Started gsad.service - Greenbone Security Assistant daemon (gsad).
Apr 14 23:56:13 orangepi5-plus systemd[1]: gsad.service: Main process exited, code=exited, status=1/FAILURE
Apr 14 23:56:13 orangepi5-plus systemd[1]: gsad.service: Failed with result 'exit-code'.
Apr 14 23:56:13 orangepi5-plus systemd[1]: gsad.service: Scheduled restart job, restart counter is at 3.
Apr 14 23:56:13 orangepi5-plus systemd[1]: Stopped gsad.service - Greenbone Security Assistant daemon (gsad).
Apr 14 23:56:13 orangepi5-plus systemd[1]: Starting gsad.service - Greenbone Security Assistant daemon (gsad)...
Apr 14 23:56:13 orangepi5-plus systemd[1]: Started gsad.service - Greenbone Security Assistant daemon (gsad).
Apr 14 23:56:13 orangepi5-plus systemd[1]: gsad.service: Main process exited, code=exited, status=1/FAILURE
Apr 14 23:56:13 orangepi5-plus systemd[1]: gsad.service: Failed with result 'exit-code'.
Apr 14 23:56:13 orangepi5-plus systemd[1]: gsad.service: Scheduled restart job, restart counter is at 4.
Apr 14 23:56:13 orangepi5-plus systemd[1]: Stopped gsad.service - Greenbone Security Assistant daemon (gsad).
Apr 14 23:56:13 orangepi5-plus systemd[1]: Starting gsad.service - Greenbone Security Assistant daemon (gsad)...
Apr 14 23:56:13 orangepi5-plus systemd[1]: Started gsad.service - Greenbone Security Assistant daemon (gsad).
Apr 14 23:56:13 orangepi5-plus systemd[1]: gsad.service: Main process exited, code=exited, status=1/FAILURE
Apr 14 23:56:13 orangepi5-plus systemd[1]: gsad.service: Failed with result 'exit-code'.
Apr 14 23:56:14 orangepi5-plus systemd[1]: gsad.service: Scheduled restart job, restart counter is at 5.
Apr 14 23:56:14 orangepi5-plus systemd[1]: Stopped gsad.service - Greenbone Security Assistant daemon (gsad).
Apr 14 23:56:14 orangepi5-plus systemd[1]: gsad.service: Start request repeated too quickly.
Apr 14 23:56:14 orangepi5-plus systemd[1]: gsad.service: Failed with result 'exit-code'.
Apr 14 23:56:14 orangepi5-plus systemd[1]: Failed to start gsad.service - Greenbone Security Assistant daemon (gsad).

I can run the same command as the unit file as the gvm user and it works, with no issues. I’ve tried to figure out if there was a way to get more information about why the application will not start, such as the verbose option or changing the gsad_log.conf * log level to 127. I cannot seem to get any data to give me an idea what the issue is or why it won’t work, especially since running the same command with the same flags does work with no issue. Below is my unit file:

[Unit]
Description=Greenbone Security Assistant daemon (gsad)
Documentation=man:gsad(8) https://www.greenbone.net
After=network.target gvmd.service
Wants=gvmd.service

[Service]
Type=exec
User=gvm
Group=gvm
RuntimeDirectory=gsad
RuntimeDirectoryMode=2775
PIDFile=/run/gsad/gsad.pid
ExecStart=/usr/local/sbin/gsad --listen=0.0.0.0 -f -v --port=80 --http-only
Restart=always
TimeoutStopSec=10

[Install]
WantedBy=multi-user.target
Alias=greenbone-security-assistant.service

I’ve also tried to change the unit file to use forking, which did not work as well.

Hi,

did you take a look at /var/log/gvm/gsad.log for possible errors?

1 Like

Yes, the log file doesn’t have anything interesting there:

scott@orangepi5-plus:~$ sudo systemctl start gsad
[sudo] password for scott:
Job for gsad.service failed because the control process exited with error code.
See "systemctl status gsad.service" and "journalctl -xeu gsad.service" for details.
scott@orangepi5-plus:~$ cat /var/log/gvm/gsad.log
gsad main:MESSAGE:2024-04-15 06h46.33 utc:73311: Starting GSAD version 22.09.0
gsad main:CRITICAL:2024-04-15 06h46.33 utc:73311: main: start_https_daemon failed!
gsad main:MESSAGE:2024-04-15 06h46.33 utc:73312: Starting GSAD version 22.09.0
gsad main:CRITICAL:2024-04-15 06h46.33 utc:73312: main: start_https_daemon failed!
gsad main:MESSAGE:2024-04-15 06h46.34 utc:73313: Starting GSAD version 22.09.0
gsad main:CRITICAL:2024-04-15 06h46.34 utc:73313: main: start_https_daemon failed!
gsad main:MESSAGE:2024-04-15 06h46.34 utc:73315: Starting GSAD version 22.09.0
gsad main:CRITICAL:2024-04-15 06h46.34 utc:73315: main: start_https_daemon failed!
gsad main:MESSAGE:2024-04-15 06h46.34 utc:73316: Starting GSAD version 22.09.0
gsad main:CRITICAL:2024-04-15 06h46.34 utc:73316: main: start_https_daemon failed!
gsad main:MESSAGE:2024-04-15 06h56.12 utc:73613: Starting GSAD version 22.09.0
gsad main:CRITICAL:2024-04-15 06h56.12 utc:73613: main: start_https_daemon failed!
gsad main:MESSAGE:2024-04-15 06h56.13 utc:73614: Starting GSAD version 22.09.0
gsad main:CRITICAL:2024-04-15 06h56.13 utc:73614: main: start_https_daemon failed!
gsad main:MESSAGE:2024-04-15 06h56.13 utc:73616: Starting GSAD version 22.09.0
gsad main:CRITICAL:2024-04-15 06h56.13 utc:73616: main: start_https_daemon failed!
gsad main:MESSAGE:2024-04-15 06h56.13 utc:73618: Starting GSAD version 22.09.0
gsad main:CRITICAL:2024-04-15 06h56.13 utc:73618: main: start_https_daemon failed!
gsad main:MESSAGE:2024-04-15 06h56.13 utc:73619: Starting GSAD version 22.09.0
gsad main:CRITICAL:2024-04-15 06h56.13 utc:73619: main: start_https_daemon failed!
gsad main:MESSAGE:2024-04-15 07h22.01 utc:113866: Starting GSAD version 22.09.0
gsad main:CRITICAL:2024-04-15 07h22.01 utc:113866: main: start_https_daemon failed!
gsad main:MESSAGE:2024-04-15 07h22.01 utc:113869: Starting GSAD version 22.09.0
gsad main:CRITICAL:2024-04-15 07h22.01 utc:113869: main: start_https_daemon failed!
gsad main:MESSAGE:2024-04-15 07h22.02 utc:113872: Starting GSAD version 22.09.0
gsad main:CRITICAL:2024-04-15 07h22.02 utc:113872: main: start_https_daemon failed!
gsad main:MESSAGE:2024-04-15 07h22.02 utc:113873: Starting GSAD version 22.09.0
gsad main:CRITICAL:2024-04-15 07h22.02 utc:113873: main: start_https_daemon failed!
gsad main:MESSAGE:2024-04-15 07h22.02 utc:113874: Starting GSAD version 22.09.0
gsad main:CRITICAL:2024-04-15 07h22.02 utc:113874: main: start_https_daemon failed!
gsad main:MESSAGE:2024-04-15 16h37.28 utc:126970: Starting GSAD version 22.09.0
gsad main:CRITICAL:2024-04-15 16h37.28 utc:126970: main: start_https_daemon failed!
gsad main:MESSAGE:2024-04-15 16h37.29 utc:126971: Starting GSAD version 22.09.0
gsad main:CRITICAL:2024-04-15 16h37.29 utc:126971: main: start_https_daemon failed!
gsad main:MESSAGE:2024-04-15 16h37.29 utc:126972: Starting GSAD version 22.09.0
gsad main:CRITICAL:2024-04-15 16h37.29 utc:126972: main: start_https_daemon failed!
gsad main:MESSAGE:2024-04-15 16h37.29 utc:126974: Starting GSAD version 22.09.0
gsad main:CRITICAL:2024-04-15 16h37.29 utc:126974: main: start_https_daemon failed!
gsad main:MESSAGE:2024-04-15 16h37.29 utc:126975: Starting GSAD version 22.09.0
gsad main:CRITICAL:2024-04-15 16h37.29 utc:126975: main: start_https_daemon failed!

Hi,

You can´t bind as user below port 1024 … here you try to use port 80. Try it with 8080, if this works fix your permission system.

1 Like

That worked, I had forgot about that detail, I guess I will just have to set up a forwarding for the port or something.
Thanks!