ospd.errors.RequiredArgument: set_redisctx: Argument ctx is required

GVM versions

gsa: Greenbone Security Assistant 9.0.0~git-c6b0b9ed3-gsa-9.0
gvm: Greenbone Vulnerability Manager 9.0.1~git-7518695a-gvmd-9.0
openvas-scanner: OpenVAS 7.0.0
gvm-libs: gvm-libs 11.0.1
ospd-openvas: OSP Server for openvas: 1.0.0 / OSP: 1.2 / OSPd: 2.0.0


Operating system: Ubuntu 18.0.14
Kernel: 4.15.0-91-generic x86_64
Installation method / source: Specific branches of the git repositories.

Redis is configured for the UNIX socket, and so the ospd-openvas. When starting the ospd-openvas, it complains about the redis ctx isnt provided. The NVT’s are successfully loaded and are correctly into redis. Resetting the nvt’s and restarting ospd-openvas loads the NVT’s correctly, but after a few minutes the same error arises.

ospd-openvas -s /usr/local/etc/openvas/ospd.conf -f -L DEBUG

2020-03-25 15:00:20,980 OSPD - openvas: DEBUG: (ospd_openvas.daemon) Loading NVTs in Redis DB
Traceback (most recent call last):
  File "/home/administrator/.local/bin/ospd-openvas", line 8, in <module>
  File "/home/administrator/.local/lib/python3.6/site-packages/ospd_openvas/daemon.py", line 1454, in main
    daemon_main('OSPD - openvas', OSPDopenvas)
  File "/home/administrator/.local/lib/python3.6/site-packages/ospd/main.py", line 159, in main
  File "/home/administrator/.local/lib/python3.6/site-packages/ospd_openvas/daemon.py", line 291, in init
  File "/home/administrator/.local/lib/python3.6/site-packages/ospd_openvas/db.py", line 133, in set_redisctx
    raise RequiredArgument('set_redisctx', 'ctx')
ospd.errors.RequiredArgument: set_redisctx: Argument ctx is required
2020-03-25 15:00:25,366 OSPD - openvas: DEBUG: (ospd.misc) Finishing daemon process

What could be the cause of this error?

I had a similar issue with gvmd installed alongside of openvasmd, while redis db wasn’t flushed properly. Stop gvmd & ospd-openvas completely, then flush redis database with “redis-cli flushall” then restart everything.

In my case that fixed the issue.

Unfortunately, in my case this doesnt solve the issue. Meanwhile I’ve build a second VM and followed someone else’es manual, and I’ve got this up and running. So I will mark your anwser as the correct one.

The new install does however have a problem which until now I’m unable to solve. Gvmd stuck at 100% with no CVE's and CPE's

It is very likely that this an redis issue. Please check your redis config.

Hi Bricks,

For someone who is completely new to Greenbone systems / OpenVAS, what would your recommendation be for redis config (or redis-openvas.conf, I have both) as I am having the same issue even though my config is stock standard?


An example redis config can be found here https://github.com/greenbone/openvas/blob/master/config/redis-openvas.conf

This config should work in most cases for SOHO networks.


Thank you so kindly Björn, much appreciated!

Check also you’re using strictly the same gvmd / ospd / openvas git version. Having different git revision talking to each other may produce this issue also.