After digging out the docs directory in the source installation of ospd-openvas, I actually foud out there is no longer an option to specify where the redis socket is. However, the source code read:
> def _parse_openvas_db_address(result):
> """ Return the path to the redis socket.
> result (bytes) Output of `openvas -s`
> Return redis unix socket path.
> path = None;
> result = result.decode('ascii')
> for conf in result.split('\n'):
> if conf.find('db_address') == 0:
> path = conf.split('=')
> if not path:
> raise OspdOpenvasError(
> 'Redis Error: Not possible to '
> 'find the path to the redis socket.'
> return path.strip()
So there is no longer an hard coded option, but according to the ospd-openvas/db.py source file, the process looks for db_address line and return out the value if found. So that should work.
That’s not the config file for ospd-openvas. That’s the config for openvas.
Some background: ospd-openvas is a daemon providing an osp protocol interface for openvas. openvas is not a daemon anymore. It is just an executable for running scans against a target. ospd-openvas and openvas a communicating via redis server for the scan data.
To be able to communicate with the same redis server ospd-openvas reads the socket setting from the output of openvas -s.
I’m confused; as I explained originally that’s the file I modified in the first place. And in this file I have the right redis path, but still openvas continue using the default value. The file is owned by the gvm user and has the right permissions. And If I remove the header [OSPD-Openvas] ospd-openvas won’t start complaining the file is missing that header…
I really don’t know what you are doing. I’ve pasted the content of my personal openvas.conf file. Maybe you are trying to use the openvas.conf as config file for ospd-openvas? That wont work. You need to use two different files. The one for openvas must only contain key = value pairs. No section.
My bad ! The openvas.conf file actually contained the OSPD header, since it was being used by OSPD too, so it didn’t work as expected. I was actually very confused between OSPD and OpenVAS, so thanks to your explaination everything works fine now. Thank you !