Problem with Openvas

Hello

Hello

I have a problem with the installation so actually with the start of Openvas. I get the error message: “Job for ospd-openvas.service failed because the control process exited with error code.
See “systemctl status ospd-openvas.service” and “journalctl -xe” for details.”

can you help me with this?

Greetings storbis

Hey man welcome to systemD debugging. Best thing you can do here is turn your brain off and do exactly what the error message tells you to do.

Did you try running systemctl status ospd-openvas.service and journalctl -xe?

Let’s start with that and see if either of those provide some more details.

Side-note: The man (manual) command is your friend. Whenever you see a command you don’t know try running man thecommandyoufoundonstackoverflow to get a printout of usage and background info on whatever that command is. For FREEEEE! For instance here you could run:
man journalctl

Hello
I have looked at both messages, however I can’t find what I did wrong.

for systemctl status ospd-openvas.service comes the following message, which I can not interpret:

░░ The job identifier is 2913.
Aug 31 19:00:49 gloomhaven openvas[4443]: init_openvas: Can not open or create log file or directory. Please check permissions of log files listed in /etc/openvas/op>
Aug 31 19:00:54 gloomhaven openvas[4444]: init_openvas: Can not open or create log file or directory. Please check permissions of log files listed in /etc/openvas/op>
Aug 31 19:00:59 gloomhaven openvas[4450]: init_openvas: Can not open or create log file or directory. Please check permissions of log files listed in /etc/openvas/op>
Aug 31 19:01:04 gloomhaven openvas[4451]: init_openvas: Can not open or create log file or directory. Please check permissions of log files listed in /etc/openvas/op>
Aug 31 19:01:09 gloomhaven openvas[4453]: init_openvas: Can not open or create log file or directory. Please check permissions of log files listed in /etc/openvas/op>
Aug 31 19:01:14 gloomhaven systemd[1]: ospd-openvas.service: Control process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ An ExecStart= process belonging to unit ospd-openvas.service has exited.
░░ 
░░ The process' exit code is 'exited' and its exit status is 1.
Aug 31 19:01:14 gloomhaven systemd[1]: ospd-openvas.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ The unit ospd-openvas.service has entered the 'failed' state with result 'exit-code'.
Aug 31 19:01:14 gloomhaven systemd[1]: Failed to start OpenVAS Wrapper of the Greenbone Vulnerability Management (ospd-openvas).
░░ Subject: A start job for unit ospd-openvas.service has failed
░░ Defined-By: systemd

I have not found anything special for journalctl -xe.

Check out this line
Aug 31 19:00:49 gloomhaven openvas[4443]: init_openvas: Can not open or create log file or directory. Please check permissions of log files listed in /etc/openvas/op>

So we can see that it’s mad about the fact that it cant create a log file because of permissions. Then it tells us to check out those permissions. Let’s do that and see whats up. Check out some basic directory info with:

ls -l /etc/openvas

Also the openvas directory itself with:

ls -l /etc | grep openvas

What do those commands output?

Thanks for your help!
I saw this message after the first installation of openvas and gave the full rights to the folders and files with 777 (which would certainly not be necessary).
This did not change the situation, but it is possible that I did something wrong in the process.

Now the following messages are displayed:

$ls -l /etc/openvas
insgesamt 8
drwxrwxrwx 1 root root    0 29. Jun 10:02 gnupg
-rwxrwxrwx 1 root root  159  2. Feb 2021  openvas.conf
-rwxrwxrwx 1 root root 1016 29. Jun 10:02 openvas_log.conf

$ls -l /etc | grep openvas
drwxrwxrwx 1 root     root         66 31. Aug 19:09 openvas

Yeah I would try reverting those permissions to

drwxr-xr-x 1 root root    0 Feb  2  2021 gnupg
-rw-r--r-- 1 root root  159 Feb  2  2021 openvas.conf
-rw-r--r-- 1 root root 1016 Jun 29 01:02 openvas_log.conf

How are you starting openvas? You may need to use sudo.

1 Like

Hi. I ended up having to reinstall Redis, and GVM and Greenbone packages to start making progress. There are a few tricks that have to be done to get it to work.

I’m planning to install Parrort KDE Plasma tomorrow on my main desktop PC. I’ll take notes on what I had to do. Right now I’m running Parrot on a USB 3.1, 128 GB thumb drive with full persistence and Luks encryption.

Something went wrong scanning Metasploitable2 running in VMware. Hopefully I’ll have better luck running from a hard disk tomorrow.

1 Like

I have now solved this in a radical version. I have reinstalled Parrot and then installed openvas. Now it worked without problems.

I think it was because I installed openvas and then performed a dist-upgrade.
The last time I overlooked the following message:

gvm (21.4.0.0~) unstable; urgency=medium

You have upgraded gvm and all gvm components.
If you had already setup and used gvm you will have to migrate the
database:
sudo gvm-start
sudo runuser -u _gvm -- gvmd --migrate

And you may experiment an issue with display of scan results with
the error "e is undefined". It can be fixed with NVT database rebuild:
sudo runuser -u _gvm -- gvmd --rebuild 

Possibly it was because of that.
I want to thank again for the help here in the forum, sooner or later I end up here again with my questions :wink:

1 Like