Ospd-openvas.service failed

Has download Kali week ago, trying to install Openvas-GVM. Installation was ok, but check and start not - first was problem with Requirements Postgresql 16. I did lot of commands and finally have postgre16 with main cluster v16. Now is probleme with redis: Job for gvmd.service failed because a timeout was exceeded.
See “systemctl status gvmd.service” and “journalctl -xeu gvmd.service” for details.
Job for ospd-openvas.service failed because the control process exited with error code.
See “systemctl status ospd-openvas.service” and “journalctl -xeu ospd-openvas.service” for details.

┌──(root㉿kali)-[~]
└─# journalctl -xeu ospd-openvas.service
Oct 06 23:16:43 kali ospd-openvas[257596]: File "/usr/lib/python3/dist-pack>
Oct 06 23:16:43 kali ospd-openvas[257596]: self.ctx = OpenvasDB.create_co>
Oct 06 23:16:43 kali ospd-openvas[257596]: ^^^^^^^^^^^^^^^^^^^>
Oct 06 23:16:43 kali ospd-openvas[257596]: File "/usr/lib/python3/dist-pack>
Oct 06 23:16:43 kali ospd-openvas[257596]: ctx = redis.Redis.from_url(
Oct 06 23:16:43 kali ospd-openvas[257596]: ^^^^^^^^^^^^^^^^^^^^^
Oct 06 23:16:43 kali ospd-openvas[257596]: File "/usr/lib/python3/dist-pack>
Oct 06 23:16:43 kali ospd-openvas[257596]: connection_pool = ConnectionPo>
Oct 06 23:16:43 kali ospd-openvas[257596]: ^^^^^^^^^^^^>
Oct 06 23:16:43 kali ospd-openvas[257596]: File "/usr/lib/python3/dist-pack>
Oct 06 23:16:43 kali ospd-openvas[257596]: url_options = parse_url(url)
Oct 06 23:16:43 kali ospd-openvas[257596]: ^^^^^^^^^^^^^^
Oct 06 23:16:43 kali ospd-openvas[257596]: File "/usr/lib/python3/dist-pack>
Oct 06 23:16:43 kali ospd-openvas[257596]: raise ValueError(
Oct 06 23:16:43 kali ospd-openvas[257596]: ValueError: Redis URL must specify>
Oct 06 23:16:43 kali systemd[1]: ospd-openvas.service: Control process exited>

try

sudo systemctl start redis-server

Once i had problem with redis, this worked for me

1. apt-get purge --auto-remove redis*

 2. apt-get install openvas

 3. apt-get install redis

 4. In these files /etc/redis/redis.conf && /etc/redis/redis-openvas.conf, you change et uncheck these parameters : 

    bind 127.0.0.0.1 ::1 => bind 0.0.0.0

    unixsocket run/redis.sock (OR) unixsocket /var/run/redis-openvas/redis-server.sock  => unixsocket /var/run/redis/redis.sock

    unixsocketperm 700 => unixsocketperm 770

 5. In this file /etc/openvas/openvas.conf, you change this parameter :
    
    db_address = /var/run/redis-openvas/redis-server.sock => db_address = /var/run/redis/redis.sock

 6. systemctl daemon-reload

 7. systemctl restart redis-server.service

 8. gvm-setup

 9. gvm-check-setup

For the future, it may be easier to identify the error or get help if you print the whole error line untruncated:

To make the journalctl command print the whole lines instead of truncating them based on screen size, you can use the -o cat option. This option will output the log entries as untruncated lines.

journalctl -xeu ospd-openvas.service -o cat

You really should not do that, this will expose ALL redis data without any authentication to the network via all IPv4 interfaces.

@Hameleon can you double check and make sure that user Redis is in the GVM group.

I believe you have that backwards:
user gvm must be a member of group redis.
sudo usermod -aG redis gvm

should be group _gvm

@Hameleon I’ve added support on how-to build GVM from source on Kali Linux 2023.3. Feel free to try it out. I’ve had no issues so far and done a scan test.

1 Like