Gvmd could not connect to Scanner

Hi,

My scan won’t start. Between the start and interrupt message the log says:

gvmd.log:md manage:WARNING:2021-12-28 08h35.05 UTC:8579: Could not connect to Scanner at /opt/gvm/var/run/ospd.sock

which seems correct, the scanner seems to use socket:

**#systemctl status ospd-openvas**
? ospd-openvas.service - OSPd Wrapper for the OpenVAS Scanner (ospd-openvas)
   Loaded: loaded (/etc/systemd/system/ospd-openvas.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2021-12-28 09:48:44 CET; 8h ago
     Docs: man:ospd-openvas(8)
           man:openvas(8)
  Process: 657 ExecStart=/usr/local/bin/ospd-openvas --unix-socket /run/ospd/ospd-openvas.sock --pid-file /run/ospd/ospd-openvas.pid --log-file /var/lo
 Main PID: 676 (ospd-openvas)
    Tasks: 4 (limit: 4915)
   Memory: 651.7M
   CGroup: /system.slice/ospd-openvas.service
           ├─676 /usr/bin/python3 /usr/local/bin/ospd-openvas --unix-socket /run/ospd/ospd-openvas.sock --pid-file /run/ospd/ospd-openvas.pid --log-fil
           └─679 /usr/bin/python3 /usr/local/bin/ospd-openvas --unix-socket /run/ospd/ospd-openvas.sock --pid-file /run/ospd/ospd-openvas.pid --log-fil

which really is there

**# ls -lrt /run/ospd/ospd-openvas.sock**
srwxrwx--- 1 gvm gvm 0 Dec 28 09:48 /run/ospd/ospd-openvas.sock

In the gvmd status i see the same socket as in the scanner

**# systemctl status gvmd**
? gvmd.service - Greenbone Vulnerability Manager daemon (gvmd)
   Loaded: loaded (/etc/systemd/system/gvmd.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2021-12-28 09:48:55 CET; 8h ago
     Docs: man:gvmd(8)
  Process: 691 ExecStart=/usr/local/sbin/gvmd --osp-vt-update=/run/ospd/ospd-openvas.sock --listen-group=gvm (code=exited, status=0/SUCCESS)
 Main PID: 692 (gvmd)
    Tasks: 1 (limit: 4915)
   Memory: 110.8M
   CGroup: /system.slice/gvmd.service
           └─692 gvmd: Waiting for incoming connections

and running a check shows:

**#gvmd --get-scanners**
6acd0832-df90-11e4-b9d5-28d24461215b  CVE    0  CVE
08b69003-5fc2-4037-a479-93b440211c73  OpenVAS  /opt/gvm/var/run/ospd.sock  0  OpenVAS Default

so gvmd is aware of scanners. Any ideas on where to look next/how to resolve?

Thnx & regards
Ton

This location:

currently doesn’t fit to this one:

Documentation on how to change / set the second path correctly is available here.

Thnx!
In hindsight that was pretty obvious

1 Like