Unable to run scans due to status code 503

I have been running OpenVAS for some time on Kali Linux and yesterday when trying to run a new scan task is started and got to 33% and failed. When I tried to resume or start the task anew it failed with the status code 503 service temporarily unavailable message. I restarted OpenVAS and still the same issue. I also tried restarting the KALI box and still have the same problem.

I found some posts related to certificate issues but couldn’t find any of the same log messages others were seeing so it doesn’t appear to be related to certificates.

The scanner service will simply fail due to timing out when I manually try to start it.

Here is what the execution of “openvas start” shows:

[] Please wait for the OpenVAS services to start.
[
]
[] You might need to refresh your browser once it opens.
[
]
[*] Web UI (Greenbone Security Assistant): xxxx

Job for openvas-scanner.service failed because a timeout was exceeded.
See “systemctl status openvas-scanner.service” and “journalctl -xe” for details.
● greenbone-security-assistant.service - Greenbone Security Assistant
Loaded: loaded (/lib/systemd/system/greenbone-security-assistant.service; disabled; vendor preset: disabled)
Active: active (running) since Wed 2019-06-19 10:23:28 MDT; 1min 35s ago
Docs: man:gsad(8)
xxxxx
Main PID: 2199 (gsad)
Tasks: 4 (limit: 2291)
Memory: 4.1M
CGroup: /system.slice/greenbone-security-assistant.service
├─2199 /usr/sbin/gsad --foreground --listen=127.0.0.1 --port=9392 --mlisten=127.0.0.1 --mport=9390
└─2201 /usr/sbin/gsad --foreground --listen=127.0.0.1 --port=9392 --mlisten=127.0.0.1 --mport=9390

Jun 19 10:23:28 Corp-Kali systemd[1]: Started Greenbone Security Assistant.
Jun 19 10:23:28 Corp-Kali gsad[2199]: Warning: MHD_USE_THREAD_PER_CONNECTION must be used only with MHD_USE_INTERNAL_POLLING_THREAD. Flag MHD_USE_INTERNAL_POLLING_THREAD was added. Consider setting MHD_USE_INTERNAL_POLLING_THREAD explicitly.
Jun 19 10:23:28 Corp-Kali gsad[2199]: Warning: MHD_USE_THREAD_PER_CONNECTION must be used only with MHD_USE_INTERNAL_POLLING_THREAD. Flag MHD_USE_INTERNAL_POLLING_THREAD was added. Consider setting MHD_USE_INTERNAL_POLLING_THREAD explicitly.

● openvas-scanner.service - Open Vulnerability Assessment System Scanner Daemon
Loaded: loaded (/lib/systemd/system/openvas-scanner.service; disabled; vendor preset: disabled)
Active: failed (Result: timeout) since Wed 2019-06-19 10:24:58 MDT; 5s ago
Docs: man:openvassd(8)
xxxx
Process: 2198 ExecStart=/usr/sbin/openvassd --unix-socket=/var/run/openvassd.sock (code=killed, signal=TERM)

Jun 19 10:23:28 Corp-Kali systemd[1]: Starting Open Vulnerability Assessment System Scanner Daemon…
Jun 19 10:24:58 Corp-Kali systemd[1]: openvas-scanner.service: Start operation timed out. Terminating.
Jun 19 10:24:58 Corp-Kali systemd[1]: openvas-scanner.service: Control process exited, code=killed, status=15/TERM
Jun 19 10:24:58 Corp-Kali systemd[1]: openvas-scanner.service: Failed with result ‘timeout’.
Jun 19 10:24:58 Corp-Kali systemd[1]: Failed to start Open Vulnerability Assessment System Scanner Daemon.

● openvas-manager.service - Open Vulnerability Assessment System Manager Daemon
Loaded: loaded (/lib/systemd/system/openvas-manager.service; disabled; vendor preset: disabled)
Active: active (running) since Wed 2019-06-19 10:23:37 MDT; 1min 25s ago
Docs: man:openvasmd(8)
xxxx
Process: 2200 ExecStart=/usr/sbin/openvasmd --listen=127.0.0.1 --port=9390 --database=/var/lib/openvas/mgr/tasks.db (code=exited, status=0/SUCCESS)
Main PID: 2203 (openvasmd)
Tasks: 1 (limit: 2291)
Memory: 155.7M
CGroup: /system.slice/openvas-manager.service
└─2203 openvasmd

Jun 19 10:23:28 Corp-Kali systemd[1]: Starting Open Vulnerability Assessment System Manager Daemon…
Jun 19 10:23:28 Corp-Kali systemd[1]: openvas-manager.service: Can’t open PID file /run/openvasmd.pid (yet?) after start: No such file or directory
Jun 19 10:23:37 Corp-Kali systemd[1]: Started Open Vulnerability Assessment System Manager Daemon.

[*] Opening Web UI (https://127.0.0.1:9392) in: 5… 4… 3… 2… 1…

GVM versions

gsa: (‘gsad --version’) = 7.0.3
openvas-scanner: (‘openvassd --version’) = 5.1.3

Environment

Operating system: = KALI 2019.2
Kernel: (‘uname -a’) = Linux 4.19.0-kali5-amd64 #1 SMP Debian 4.19.37-2kali1 (2019-05-15) x86_64 GNU/Linux

I was able to get the scanner to start again after finding this article. Hint: Redis setup / configuration for GSE/GVM/OpenVAS. I performed the steps under the section titled “Scanner / openvassd startup is timing out”. It only worked by doing the optional step of “Flush your redis database (Depending on your setup, e.g. redis-cli -s /var/run/redis/redis.sock flushall )”, however.

1 Like