Failing Scanner and CVE's not showing up in Dashboard

Can anyone help me with this? I have reinstalled this like 20 times and cannot get a scan to work.

md manage:WARNING:2019-11-25 16h03.47 UTC:1257: Could not connect to Scanner at /tmp/ospd.sock
md manage:WARNING:2019-11-25 16h03.47 UTC:1257: OSP start_scan 35479412-0c95-4ab4-8622-a31af9877b36: Could not connect to Scanner
event task:MESSAGE:2019-11-25 16h03.47 UTC:1257: Status of task SCAN 25NOV2019 (2b54c9e7-9c32-43da-b732-88fd4d393606) has changed to Done
md manage:WARNING:2019-11-25 16h03.58 utc:1364: manage_update_nvt_cache_osp: failed to connect to /opt/gvm/var/run/ospd.sock

You need to find out why your ospd-openvas is not listening to /tmp/ospd.sock:

Either ospd-openvas is listening on another file socket or the ospd-openvas is not running at all.

1 Like

Yes I have been looking where to find that config in GVM? Any ideas?

About running ospd-openvas the tool provides some configuration help via

$ ospd-openvas --help
1 Like

I have th same problem(git clone && cmake in debian10):
==> /usr/local/var/log/gvm/gvmd.log <==
md manage:WARNING:2019-12-05 02h07.29 utc:23345: manage_update_nvt_cache_osp: failed to connect to /tmp/ospd.sock
md manage:WARNING:2019-12-05 02h07.48 utc:23626: manage_update_nvt_cache_osp: failed to connect to /tmp/ospd.sock
md manage:WARNING:2019-12-05 02h08.04 utc:23648: manage_update_nvt_cache_osp: failed to connect to /tmp/ospd.sock
md manage:WARNING:2019-12-05 02h08.14 utc:23656: manage_update_nvt_cache_osp: failed to connect to /tmp/ospd.sock
md manage:WARNING:2019-12-05 02h08.24 utc:23661: manage_update_nvt_cache_osp: failed to connect to /tmp/ospd.sock
md manage:WARNING:2019-12-05 02h08.34 utc:23667: manage_update_nvt_cache_osp: failed to connect to /tmp/ospd.sock
md manage:WARNING:2019-12-05 02h08.44 utc:23673: manage_update_nvt_cache_osp: failed to connect to /tmp/ospd.sock

# ospd-openvas --help
usage: ospd-openvas [-h] [--version] [-s [CONFIG]] [-p PORT] [-b ADDRESS]
                    [-u UNIX_SOCKET] [--pid-file PID_FILE] [-m SOCKET_MODE]
                    [-k KEY_FILE] [-c CERT_FILE] [--ca-file CA_FILE]
                    [-L LOG_LEVEL] [-f] [-t STREAM_TIMEOUT] [-l LOG_FILE]
                    [--niceness NICENESS]
                    [--scaninfo-store-time SCANINFO_STORE_TIME]

OSPD - openvas

optional arguments:
  -h, --help            show this help message and exit
  --version             Print version then exit.
  -s [CONFIG], --config [CONFIG]
                        Configuration file path (default: ~/.config/ospd.conf)
  -p PORT, --port PORT  TCP Port to listen on. Default: 0
  -b ADDRESS, --bind-address ADDRESS
                        Address to listen on. Default: 0.0.0.0
  -u UNIX_SOCKET, --unix-socket UNIX_SOCKET
                        Unix file socket to listen on. Default:
                        /var/run/ospd/ospd.sock
  --pid-file PID_FILE   Location of the file for the process ID. Default:
                        /var/run/ospd.pid
  -m SOCKET_MODE, --socket-mode SOCKET_MODE
                        Unix file socket mode. Default: 0o700
  -k KEY_FILE, --key-file KEY_FILE
                        Server key file. Default:
                        /usr/var/lib/gvm/private/CA/serverkey.pem
  -c CERT_FILE, --cert-file CERT_FILE
                        Server cert file. Default:
                        /usr/var/lib/gvm/CA/servercert.pem
  --ca-file CA_FILE     CA cert file. Default: /usr/var/lib/gvm/CA/cacert.pem
  -L LOG_LEVEL, --log-level LOG_LEVEL
                        Wished level of logging. Default: WARNING
  -f, --foreground      Run in foreground and logs all messages to console.
  -t STREAM_TIMEOUT, --stream-timeout STREAM_TIMEOUT
                        Stream timeout. Default: 10
  -l LOG_FILE, --log-file LOG_FILE
                        Path to the logging file.
  --niceness NICENESS   Start the scan with the given niceness. Default 10
  --scaninfo-store-time SCANINFO_STORE_TIME
                        Time in hours a scan is stored before being considered
                        forgotten and being delete from the scan table.
                        Default 0, disabled.

Now the NVTs in Page SecInfo is empty (CVEs and CPEs have data)

Your socket location my be wrong, use netstat to check for your listening socket.

Please read the output of the command carefully

  -u UNIX_SOCKET, --unix-socket UNIX_SOCKET
                        Unix file socket to listen on. Default:
                        /var/run/ospd/ospd.sock

and afterwards look again at your log messages.

3 Likes

Hi,

sorry to ask but to me it was not helpful. I have error:

“manage_update_nvt_cache_osp: failed to connect to /run/ospd/ospd.sock”

and as stated in help, default is: /var/run/ospd/ospd.sock but i have no idea why it is failing to connect.

I know this is due to i changed /lib/systemd/system/greenbone-security-assistant.service listening IP from 127.0.0.1 to 0.0.0.0 so i can connect to web, from outside virtual machine (running it on Kali VM), and after changing it back to 127… reloading daemon, restarting services, scanner works again. Config with 0.0.0.0 works until VM or ospd service is restarted, then ospd fails to connect.

Any advice on what to change to make it work, both accessible from outside VM and able to connect to socket? Thanks.