Scan interrupted at 1%

Hi all,

I scanned a target and the task was interrupted. Before that I updated gvm-feed as it was deprecated (400+ old)

Following is the log from ospd-openvas.log:

OSPD[171778] 2023-02-15 10:13:56,602: INFO: (ospd.main) Starting OSPd OpenVAS version 22.4.5.
OSPD[171778] 2023-02-15 10:13:56,609: INFO: (ospd_openvas.messaging.mqtt) Successfully connected to MQTT broker
OSPD[171778] 2023-02-15 10:14:06,709: INFO: (ospd_openvas.daemon) Loading VTs. Scans will be [requested|queued] until VTs are loaded. This may take a few minutes, please wait...
OSPD[171778] 2023-02-15 10:14:06,849: WARNING: (gnupg) potential problem: ERROR: add_keyblock_resource 33587201
OSPD[171778] 2023-02-15 10:14:06,850: WARNING: (gnupg) potential problem: ERROR: keydb_search 33554445
OSPD[171778] 2023-02-15 10:14:06,850: WARNING: (gnupg) potential problem: ERROR: keydb_search 33554445
OSPD[171778] 2023-02-15 10:14:06,850: WARNING: (gnupg) gpg returned a non-zero error code: 2
OSPD[171778] 2023-02-15 10:14:06,851: WARNING: (ospd_openvas.notus) GPG verification of notus sha256sums failed. Notus advisories are not loaded.
OSPD[171778] 2023-02-15 10:14:06,851: WARNING: (ospd_openvas.notus) ignoring /var/lib/notus/advisories/mageia.notus due to invalid signature
OSPD[171778] 2023-02-15 10:14:06,946: WARNING: (gnupg) potential problem: ERROR: add_keyblock_resource 33587201
OSPD[171778] 2023-02-15 10:14:06,946: WARNING: (gnupg) potential problem: ERROR: keydb_search 33554445
OSPD[171778] 2023-02-15 10:14:06,947: WARNING: (gnupg) potential problem: ERROR: keydb_search 33554445
OSPD[171778] 2023-02-15 10:14:06,947: WARNING: (gnupg) gpg returned a non-zero error code: 2
OSPD[171778] 2023-02-15 10:14:06,947: WARNING: (ospd_openvas.notus) GPG verification of notus sha256sums failed. Notus advisories are not loaded.
OSPD[171778] 2023-02-15 10:14:06,947: WARNING: (ospd_openvas.notus) ignoring /var/lib/notus/advisories/euleros.notus due to invalid signature
OSPD[171778] 2023-02-15 10:14:07,033: WARNING: (gnupg) potential problem: ERROR: add_keyblock_resource 33587201
OSPD[171778] 2023-02-15 10:14:07,034: WARNING: (gnupg) potential problem: ERROR: keydb_search 33554445
OSPD[171778] 2023-02-15 10:14:07,035: WARNING: (gnupg) potential problem: ERROR: keydb_search 33554445
OSPD[171778] 2023-02-15 10:14:07,035: WARNING: (gnupg) gpg returned a non-zero error code: 2
OSPD[171778] 2023-02-15 10:14:07,036: WARNING: (ospd_openvas.notus) GPG verification of notus sha256sums failed. Notus advisories are not loaded.
OSPD[171778] 2023-02-15 10:14:07,036: WARNING: (ospd_openvas.notus) ignoring /var/lib/notus/advisories/ubuntu.notus due to invalid signature
OSPD[171778] 2023-02-15 10:14:07,059: WARNING: (gnupg) potential problem: ERROR: add_keyblock_resource 33587201
OSPD[171778] 2023-02-15 10:14:07,059: WARNING: (gnupg) potential problem: ERROR: keydb_search 33554445
OSPD[171778] 2023-02-15 10:14:07,060: WARNING: (gnupg) potential problem: ERROR: keydb_search 33554445
OSPD[171778] 2023-02-15 10:14:07,060: WARNING: (gnupg) gpg returned a non-zero error code: 2
OSPD[171778] 2023-02-15 10:14:07,060: WARNING: (ospd_openvas.notus) GPG verification of notus sha256sums failed. Notus advisories are not loaded.
OSPD[171778] 2023-02-15 10:14:07,060: WARNING: (ospd_openvas.notus) ignoring /var/lib/notus/advisories/slackware.notus due to invalid signature
OSPD[171778] 2023-02-15 10:14:07,205: WARNING: (gnupg) potential problem: ERROR: add_keyblock_resource 33587201
OSPD[171778] 2023-02-15 10:14:07,206: WARNING: (gnupg) potential problem: ERROR: keydb_search 33554445
OSPD[171778] 2023-02-15 10:14:07,206: WARNING: (gnupg) potential problem: ERROR: keydb_search 33554445
OSPD[171778] 2023-02-15 10:14:07,207: WARNING: (gnupg) gpg returned a non-zero error code: 2
OSPD[171778] 2023-02-15 10:14:07,207: WARNING: (ospd_openvas.notus) GPG verification of notus sha256sums failed. Notus advisories are not loaded.
OSPD[171778] 2023-02-15 10:14:07,207: WARNING: (ospd_openvas.notus) ignoring /var/lib/notus/advisories/suse.notus due to invalid signature
OSPD[171778] 2023-02-15 10:15:17,319: INFO: (ospd.command.command) Scan f5bd34c5-7166-4dbe-8244-b368ccbf6cbf added to the queue in position 1.
OSPD[171778] 2023-02-15 10:15:59,074: INFO: (ospd_openvas.daemon) VTs were up to date. Feed version is 202302091018.
OSPD[171778] 2023-02-15 10:16:39,403: INFO: (ospd.ospd) Currently 1 queued scans.
OSPD[171778] 2023-02-15 10:16:39,559: INFO: (ospd.ospd) Starting scan f5bd34c5-7166-4dbe-8244-b368ccbf6cbf.
OSPD[171778] 2023-02-15 10:48:07,575: ERROR: (ospd.ospd) f5bd34c5-7166-4dbe-8244-b368ccbf6cbf: Exception Timeout reading from socket while scanning
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/redis/connection.py", line 421, in read_from_socket
    bufflen = self._sock.recv_into(self._buffer)
TimeoutError: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/ospd/ospd.py", line 596, in start_scan
    self.exec_scan(scan_id)
  File "/usr/lib/python3/dist-packages/ospd_openvas/daemon.py", line 1203, in exec_scan
    self.report_openvas_scan_status(kbdb, scan_id)
  File "/usr/lib/python3/dist-packages/ospd_openvas/daemon.py", line 777, in report_openvas_scan_status
    all_status = kbdb.get_scan_status()
  File "/usr/lib/python3/dist-packages/ospd_openvas/db.py", line 606, in get_scan_status
    return self._pop_list_items("internal/status")
  File "/usr/lib/python3/dist-packages/ospd_openvas/db.py", line 493, in _pop_list_items
    return OpenvasDB.pop_list_items(self.ctx, name)
  File "/usr/lib/python3/dist-packages/ospd_openvas/db.py", line 207, in pop_list_items
    results, redis_return_code = pipe.execute()
  File "/usr/lib/python3/dist-packages/redis/client.py", line 2078, in execute
    return conn.retry.call_with_retry(
  File "/usr/lib/python3/dist-packages/redis/retry.py", line 49, in call_with_retry
    fail(error)
  File "/usr/lib/python3/dist-packages/redis/client.py", line 2080, in <lambda>
    lambda error: self._disconnect_raise_reset(conn, error),
  File "/usr/lib/python3/dist-packages/redis/retry.py", line 46, in call_with_retry
    return do()
  File "/usr/lib/python3/dist-packages/redis/client.py", line 2079, in <lambda>
    lambda: execute(conn, stack, raise_on_error),
  File "/usr/lib/python3/dist-packages/redis/client.py", line 1933, in _execute_transaction
    self.parse_response(connection, "_")
  File "/usr/lib/python3/dist-packages/redis/client.py", line 2018, in parse_response
    result = Redis.parse_response(self, connection, command_name, **options)
  File "/usr/lib/python3/dist-packages/redis/client.py", line 1254, in parse_response
    response = connection.read_response()
  File "/usr/lib/python3/dist-packages/redis/connection.py", line 824, in read_response
    response = self._parser.read_response(disable_decoding=disable_decoding)
  File "/usr/lib/python3/dist-packages/redis/connection.py", line 467, in read_response
    self.read_from_socket()
  File "/usr/lib/python3/dist-packages/redis/connection.py", line 436, in read_from_socket
    raise TimeoutError("Timeout reading from socket")
redis.exceptions.TimeoutError: Timeout reading from socket
OSPD[171778] 2023-02-15 10:48:32,559: INFO: (ospd.ospd) f5bd34c5-7166-4dbe-8244-b368ccbf6cbf: Host scan got interrupted. Progress: 1, Status: RUNNING
OSPD[171778] 2023-02-15 10:48:32,569: INFO: (ospd.ospd) f5bd34c5-7166-4dbe-8244-b368ccbf6cbf: Scan interrupted.
OSPD[171778] 2023-02-15 10:48:32,619: INFO: (ospd.ospd) f5bd34c5-7166-4dbe-8244-b368ccbf6cbf: Scan process is dead and its progress is 1
OSPD[171778] 2023-02-15 10:48:32,620: INFO: (ospd.ospd) f5bd34c5-7166-4dbe-8244-b368ccbf6cbf: Scan interrupted.
OSPD[171778] 2023-02-15 10:48:32,967: INFO: (ospd.ospd) f5bd34c5-7166-4dbe-8244-b368ccbf6cbf: Scan process is dead and its progress is 1
OSPD[171778] 2023-02-15 10:48:32,969: INFO: (ospd.ospd) f5bd34c5-7166-4dbe-8244-b368ccbf6cbf: Scan interrupted.
OSPD[171778] 2023-02-15 10:48:33,131: INFO: (ospd.ospd) f5bd34c5-7166-4dbe-8244-b368ccbf6cbf: Scan process is dead and its progress is 1
OSPD[171778] 2023-02-15 10:48:33,133: INFO: (ospd.ospd) f5bd34c5-7166-4dbe-8244-b368ccbf6cbf: Scan interrupted.
OSPD[171778] 2023-02-15 11:14:40,710: INFO: (ospd.main) Shutting-down server ...
OSPD[218664] 2023-02-15 11:15:46,772: INFO: (ospd.main) Starting OSPd OpenVAS version 22.4.5.
OSPD[218664] 2023-02-15 11:15:46,780: INFO: (ospd_openvas.messaging.mqtt) Successfully connected to MQTT broker
OSPD[218664] 2023-02-15 11:15:56,874: INFO: (ospd_openvas.daemon) Loading VTs. Scans will be [requested|queued] until VTs are loaded. This may take a few minutes, please wait...
OSPD[218664] 2023-02-15 11:15:57,028: WARNING: (gnupg) potential problem: ERROR: add_keyblock_resource 33587201
OSPD[218664] 2023-02-15 11:15:57,029: WARNING: (gnupg) potential problem: ERROR: keydb_search 33554445
OSPD[218664] 2023-02-15 11:15:57,029: WARNING: (gnupg) potential problem: ERROR: keydb_search 33554445
OSPD[218664] 2023-02-15 11:15:57,030: WARNING: (gnupg) gpg returned a non-zero error code: 2
OSPD[218664] 2023-02-15 11:15:57,031: WARNING: (ospd_openvas.notus) GPG verification of notus sha256sums failed. Notus advisories are not loaded.
OSPD[218664] 2023-02-15 11:15:57,031: WARNING: (ospd_openvas.notus) ignoring /var/lib/notus/advisories/mageia.notus due to invalid signature
OSPD[218664] 2023-02-15 11:15:57,131: WARNING: (gnupg) potential problem: ERROR: add_keyblock_resource 33587201
OSPD[218664] 2023-02-15 11:15:57,131: WARNING: (gnupg) potential problem: ERROR: keydb_search 33554445
OSPD[218664] 2023-02-15 11:15:57,131: WARNING: (gnupg) potential problem: ERROR: keydb_search 33554445
OSPD[218664] 2023-02-15 11:15:57,132: WARNING: (gnupg) gpg returned a non-zero error code: 2
OSPD[218664] 2023-02-15 11:15:57,132: WARNING: (ospd_openvas.notus) GPG verification of notus sha256sums failed. Notus advisories are not loaded.
OSPD[218664] 2023-02-15 11:15:57,132: WARNING: (ospd_openvas.notus) ignoring /var/lib/notus/advisories/euleros.notus due to invalid signature
OSPD[218664] 2023-02-15 11:15:57,230: WARNING: (gnupg) potential problem: ERROR: add_keyblock_resource 33587201
OSPD[218664] 2023-02-15 11:15:57,231: WARNING: (gnupg) potential problem: ERROR: keydb_search 33554445
OSPD[218664] 2023-02-15 11:15:57,231: WARNING: (gnupg) potential problem: ERROR: keydb_search 33554445
OSPD[218664] 2023-02-15 11:15:57,231: WARNING: (gnupg) gpg returned a non-zero error code: 2
OSPD[218664] 2023-02-15 11:15:57,232: WARNING: (ospd_openvas.notus) GPG verification of notus sha256sums failed. Notus advisories are not loaded.
OSPD[218664] 2023-02-15 11:15:57,232: WARNING: (ospd_openvas.notus) ignoring /var/lib/notus/advisories/ubuntu.notus due to invalid signature
OSPD[218664] 2023-02-15 11:15:57,253: WARNING: (gnupg) potential problem: ERROR: add_keyblock_resource 33587201
OSPD[218664] 2023-02-15 11:15:57,253: WARNING: (gnupg) potential problem: ERROR: keydb_search 33554445
OSPD[218664] 2023-02-15 11:15:57,254: WARNING: (gnupg) potential problem: ERROR: keydb_search 33554445
OSPD[218664] 2023-02-15 11:15:57,254: WARNING: (gnupg) gpg returned a non-zero error code: 2
OSPD[218664] 2023-02-15 11:15:57,254: WARNING: (ospd_openvas.notus) GPG verification of notus sha256sums failed. Notus advisories are not loaded.
OSPD[218664] 2023-02-15 11:15:57,254: WARNING: (ospd_openvas.notus) ignoring /var/lib/notus/advisories/slackware.notus due to invalid signature
OSPD[218664] 2023-02-15 11:15:57,406: WARNING: (gnupg) potential problem: ERROR: add_keyblock_resource 33587201
OSPD[218664] 2023-02-15 11:15:57,406: WARNING: (gnupg) potential problem: ERROR: keydb_search 33554445
OSPD[218664] 2023-02-15 11:15:57,407: WARNING: (gnupg) potential problem: ERROR: keydb_search 33554445
OSPD[218664] 2023-02-15 11:15:57,407: WARNING: (gnupg) gpg returned a non-zero error code: 2
OSPD[218664] 2023-02-15 11:15:57,407: WARNING: (ospd_openvas.notus) GPG verification of notus sha256sums failed. Notus advisories are not loaded.
OSPD[218664] 2023-02-15 11:15:57,407: WARNING: (ospd_openvas.notus) ignoring /var/lib/notus/advisories/suse.notus due to invalid signature
OSPD[218664] 2023-02-15 11:17:48,223: INFO: (ospd_openvas.daemon) VTs were up to date. Feed version is 202302091018.

I was trying to update my gvm from 20.04 to 22.4, clone my task, but it still didn’t work
In fact, in the old task, the scanner stopped at 22%, the cloned task stops at 1%

System Kali Linux
GVM-22.4.1
OpenVAS Scanner 22.4.1
Notus Scanner 22.4.2
ospd-OpenVAS 22.4.5
GVM Manager 22.4.2

For the gpg validation, it seems to be the same issue as Kali ospd-openvas not staring with MQTT broker errors - #2 by bricks which is Kali related. Not sure if there is already a bug report in the Kali issue tracker.

For the redis connection timeout, it could be possible that you did scan your local machine and under the high load ospd-openvas couldn’t communicate with redis successfully anymore.

2 Likes

Weird, I didn’t change the range of the scan ip, so I don’t know why it would break due to self-scan. But just in case, I’ll add a local ip to the exceptions.

Also, I try disabling the verification by running
echo "disable_notus_hashsum_verification = True" >> /etc/gvm/ospd-openvas.conf as root
and restart
sudo systemctl restart ospd-openvas

My ospd-openvas.log after that

OSPD[218664] 2023-02-17 10:27:15,174: INFO: (ospd.main) Shutting-down server ...
OSPD[452765] 2023-02-17 10:27:17,413: INFO: (ospd.main) Starting OSPd OpenVAS version 22.4.5.
OSPD[452765] 2023-02-17 10:27:17,423: INFO: (ospd_openvas.messaging.mqtt) Successfully connected to MQTT broker
OSPD[452765] 2023-02-17 10:27:27,513: INFO: (ospd_openvas.daemon) Loading VTs. Scans will be [requested|queued] until VTs are loaded. This may take a few minutes, please wait...
OSPD[452765] 2023-02-17 10:27:27,593: INFO: (ospd_openvas.notus) hashsum verification is disabled
OSPD[452765] 2023-02-17 10:29:17,542: INFO: (ospd_openvas.daemon) VTs were up to date. Feed version is 202302091018.

Now I’ll try to rescan again

After that I anyway have a same problem but without gpg errors

OSPD[452765] 2023-02-17 10:44:20,762: INFO: (ospd.ospd) Currently 1 queued scans.
OSPD[452765] 2023-02-17 10:44:20,899: INFO: (ospd.ospd) Starting scan 25db1cc0-4db1-41e6-87bf-f44bef20fa86.
OSPD[452765] 2023-02-17 11:01:20,481: ERROR: (ospd.ospd) 25db1cc0-4db1-41e6-87bf-f44bef20fa86: Exception Timeout reading from socket while scanning
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/redis/connection.py", line 421, in read_from_socket
    bufflen = self._sock.recv_into(self._buffer)
TimeoutError: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/ospd/ospd.py", line 596, in start_scan
    self.exec_scan(scan_id)
  File "/usr/lib/python3/dist-packages/ospd_openvas/daemon.py", line 1202, in exec_scan
    got_results = self.report_openvas_results(kbdb, scan_id)
  File "/usr/lib/python3/dist-packages/ospd_openvas/daemon.py", line 840, in report_openvas_results
    return self.report_results(results, scan_id)
  File "/usr/lib/python3/dist-packages/ospd_openvas/daemon.py", line 892, in report_results
    vt_aux = vthelper.get_single_vt(roid)
  File "/usr/lib/python3/dist-packages/ospd_openvas/vthelper.py", line 47, in get_single_vt
    custom = self.nvti.get_nvt_metadata(vt_id)
  File "/usr/lib/python3/dist-packages/ospd_openvas/nvticache.py", line 208, in get_nvt_metadata
    custom['vt_params'].update(self.get_nvt_params(oid))
  File "/usr/lib/python3/dist-packages/ospd_openvas/nvticache.py", line 112, in get_nvt_params
    prefs = self.get_nvt_prefs(oid)
  File "/usr/lib/python3/dist-packages/ospd_openvas/nvticache.py", line 265, in get_nvt_prefs
    return OpenvasDB.get_list_item(self.ctx, key)
  File "/usr/lib/python3/dist-packages/ospd_openvas/db.py", line 186, in get_list_item
    return ctx.lrange(name, start, end)
  File "/usr/lib/python3/dist-packages/redis/commands/core.py", line 2629, in lrange
    return self.execute_command("LRANGE", name, start, end)
  File "/usr/lib/python3/dist-packages/redis/client.py", line 1238, in execute_command
    return conn.retry.call_with_retry(
  File "/usr/lib/python3/dist-packages/redis/retry.py", line 49, in call_with_retry
    fail(error)
  File "/usr/lib/python3/dist-packages/redis/client.py", line 1242, in <lambda>
    lambda error: self._disconnect_raise(conn, error),
  File "/usr/lib/python3/dist-packages/redis/client.py", line 1228, in _disconnect_raise
    raise error
  File "/usr/lib/python3/dist-packages/redis/retry.py", line 46, in call_with_retry
    return do()
  File "/usr/lib/python3/dist-packages/redis/client.py", line 1239, in <lambda>
    lambda: self._send_command_parse_response(
  File "/usr/lib/python3/dist-packages/redis/client.py", line 1215, in _send_command_parse_response
    return self.parse_response(conn, command_name, **options)
  File "/usr/lib/python3/dist-packages/redis/client.py", line 1254, in parse_response
    response = connection.read_response()
  File "/usr/lib/python3/dist-packages/redis/connection.py", line 824, in read_response
    response = self._parser.read_response(disable_decoding=disable_decoding)
  File "/usr/lib/python3/dist-packages/redis/connection.py", line 467, in read_response
    self.read_from_socket()
  File "/usr/lib/python3/dist-packages/redis/connection.py", line 436, in read_from_socket
    raise TimeoutError("Timeout reading from socket")
redis.exceptions.TimeoutError: Timeout reading from socket
OSPD[452765] 2023-02-17 11:01:24,667: INFO: (ospd.ospd) 25db1cc0-4db1-41e6-87bf-f44bef20fa86: Host scan got interrupted. Progress: 0, Status: RUNNING
OSPD[452765] 2023-02-17 11:01:24,684: INFO: (ospd.ospd) 25db1cc0-4db1-41e6-87bf-f44bef20fa86: Scan interrupted.
OSPD[455168] 2023-02-17 11:10:47,490: INFO: (ospd.main) Starting OSPd OpenVAS version 22.4.5.
OSPD[455168] 2023-02-17 11:10:47,511: INFO: (ospd_openvas.messaging.mqtt) Successfully connected to MQTT broker
OSPD[455168] 2023-02-17 11:10:57,611: INFO: (ospd_openvas.daemon) Loading VTs. Scans will be [requested|queued] until VTs are loaded. This may take a few minutes, please wait...
OSPD[455168] 2023-02-17 11:10:57,694: INFO: (ospd_openvas.notus) hashsum verification is disabled
OSPD[455168] 2023-02-17 11:12:49,207: INFO: (ospd_openvas.daemon) VTs were up to date. Feed version is 202302091018.

I noticed that the redis-server@openvas.servise is using 5GB of RAM and when scanning at some point, it apparently does not have enough memory. Reboot the server does not help, I tried to reinstall the GVM. After reinstallation, the redis-server, as usual, occupied 200-250MB of RAM. I tried to run a scan but ran into the same problem only at 23% of the scan

OSPD[576867] 2023-02-20 17:24:34,555: INFO: (ospd.main) Shutting-down server ...
OSPD[847208] 2023-02-20 17:25:36,739: INFO: (ospd.main) Starting OSPd OpenVAS version 22.4.5.
OSPD[847208] 2023-02-20 17:25:36,757: INFO: (ospd_openvas.messaging.mqtt) Successfully connected to MQTT broker
OSPD[847208] 2023-02-20 17:25:46,847: INFO: (ospd_openvas.daemon) Loading VTs. Scans will be [requested|queued] until VTs are loaded. This may take a few minutes, please wait...
OSPD[847208] 2023-02-20 17:25:46,919: INFO: (ospd_openvas.notus) hashsum verification is disabled
OSPD[847208] 2023-02-20 17:27:51,414: INFO: (ospd_openvas.daemon) VTs were up to date. Feed version is 202302091018.
OSPD[847208] 2023-02-20 17:39:30,885: INFO: (ospd.main) Shutting-down server ...
OSPD[848034] 2023-02-20 17:40:43,019: INFO: (ospd.main) Starting OSPd OpenVAS version 22.4.5.
OSPD[848034] 2023-02-20 17:40:43,037: INFO: (ospd_openvas.messaging.mqtt) Successfully connected to MQTT broker
OSPD[848034] 2023-02-20 17:40:53,144: INFO: (ospd_openvas.daemon) Loading VTs. Scans will be [requested|queued] until VTs are loaded. This may take a few minutes, please wait...
OSPD[848034] 2023-02-20 17:40:53,219: INFO: (ospd_openvas.notus) hashsum verification is disabled
OSPD[848034] 2023-02-20 17:50:35,896: INFO: (ospd.main) Shutting-down server ...
OSPD[848265] 2023-02-20 17:51:46,851: INFO: (ospd.main) Starting OSPd OpenVAS version 22.4.5.
OSPD[848265] 2023-02-20 17:51:46,866: INFO: (ospd_openvas.messaging.mqtt) Successfully connected to MQTT broker
OSPD[848265] 2023-02-20 17:51:56,977: INFO: (ospd_openvas.daemon) Loading VTs. Scans will be [requested|queued] until VTs are loaded. This may take a few minutes, please wait...
OSPD[848265] 2023-02-20 17:51:57,051: INFO: (ospd_openvas.notus) hashsum verification is disabled
OSPD[848265] 2023-02-20 17:54:25,998: INFO: (ospd_openvas.daemon) VTs were up to date. Feed version is 202302091018.
OSPD[848265] 2023-02-20 17:57:00,888: INFO: (ospd.main) Shutting-down server ...
OSPD[853044] 2023-02-20 18:06:23,004: INFO: (ospd.main) Starting OSPd OpenVAS version 22.4.5.
OSPD[853044] 2023-02-20 18:06:23,020: INFO: (ospd_openvas.messaging.mqtt) Successfully connected to MQTT broker
OSPD[853044] 2023-02-20 18:06:33,108: INFO: (ospd_openvas.daemon) Loading VTs. Scans will be [requested|queued] until VTs are loaded. This may take a few minutes, please wait...
OSPD[853044] 2023-02-20 18:06:33,245: WARNING: (gnupg) potential problem: ERROR: add_keyblock_resource 33587201
OSPD[853044] 2023-02-20 18:06:33,245: WARNING: (gnupg) potential problem: ERROR: keydb_search 33554445
OSPD[853044] 2023-02-20 18:06:33,246: WARNING: (gnupg) potential problem: ERROR: keydb_search 33554445
OSPD[853044] 2023-02-20 18:06:33,247: WARNING: (gnupg) gpg returned a non-zero error code: 2
OSPD[853044] 2023-02-20 18:06:33,247: WARNING: (ospd_openvas.notus) GPG verification of notus sha256sums failed. Notus advisories are not loaded.
OSPD[853044] 2023-02-20 18:06:33,247: WARNING: (ospd_openvas.notus) ignoring /var/lib/notus/advisories/mageia.notus due to invalid signature
OSPD[853044] 2023-02-20 18:06:33,348: WARNING: (gnupg) potential problem: ERROR: add_keyblock_resource 33587201
OSPD[853044] 2023-02-20 18:06:33,349: WARNING: (gnupg) potential problem: ERROR: keydb_search 33554445
OSPD[853044] 2023-02-20 18:06:33,349: WARNING: (gnupg) potential problem: ERROR: keydb_search 33554445
OSPD[853044] 2023-02-20 18:06:33,350: WARNING: (gnupg) gpg returned a non-zero error code: 2
OSPD[853044] 2023-02-20 18:06:33,350: WARNING: (ospd_openvas.notus) GPG verification of notus sha256sums failed. Notus advisories are not loaded.
OSPD[853044] 2023-02-20 18:06:33,350: WARNING: (ospd_openvas.notus) ignoring /var/lib/notus/advisories/euleros.notus due to invalid signature
OSPD[853044] 2023-02-20 18:06:33,425: WARNING: (gnupg) potential problem: ERROR: add_keyblock_resource 33587201
OSPD[853044] 2023-02-20 18:06:33,426: WARNING: (gnupg) potential problem: ERROR: keydb_search 33554445
OSPD[853044] 2023-02-20 18:06:33,426: WARNING: (gnupg) potential problem: ERROR: keydb_search 33554445
OSPD[853044] 2023-02-20 18:06:33,427: WARNING: (gnupg) gpg returned a non-zero error code: 2
OSPD[853044] 2023-02-20 18:06:33,427: WARNING: (ospd_openvas.notus) GPG verification of notus sha256sums failed. Notus advisories are not loaded.
OSPD[853044] 2023-02-20 18:06:33,427: WARNING: (ospd_openvas.notus) ignoring /var/lib/notus/advisories/ubuntu.notus due to invalid signature
OSPD[853044] 2023-02-20 18:06:33,447: WARNING: (gnupg) potential problem: ERROR: add_keyblock_resource 33587201
OSPD[853044] 2023-02-20 18:06:33,448: WARNING: (gnupg) potential problem: ERROR: keydb_search 33554445
OSPD[853044] 2023-02-20 18:06:33,448: WARNING: (gnupg) potential problem: ERROR: keydb_search 33554445
OSPD[853044] 2023-02-20 18:06:33,448: WARNING: (gnupg) gpg returned a non-zero error code: 2
OSPD[853044] 2023-02-20 18:06:33,449: WARNING: (ospd_openvas.notus) GPG verification of notus sha256sums failed. Notus advisories are not loaded.
OSPD[853044] 2023-02-20 18:06:33,449: WARNING: (ospd_openvas.notus) ignoring /var/lib/notus/advisories/slackware.notus due to invalid signature
OSPD[853044] 2023-02-20 18:06:33,583: WARNING: (gnupg) potential problem: ERROR: add_keyblock_resource 33587201
OSPD[853044] 2023-02-20 18:06:33,583: WARNING: (gnupg) potential problem: ERROR: keydb_search 33554445
OSPD[853044] 2023-02-20 18:06:33,584: WARNING: (gnupg) potential problem: ERROR: keydb_search 33554445
OSPD[853044] 2023-02-20 18:06:33,584: WARNING: (gnupg) gpg returned a non-zero error code: 2
OSPD[853044] 2023-02-20 18:06:33,585: WARNING: (ospd_openvas.notus) GPG verification of notus sha256sums failed. Notus advisories are not loaded.
OSPD[853044] 2023-02-20 18:06:33,585: WARNING: (ospd_openvas.notus) ignoring /var/lib/notus/advisories/suse.notus due to invalid signature
OSPD[853044] 2023-02-20 18:07:45,445: INFO: (ospd_openvas.daemon) VTs were up to date. Feed version is 202302201018.
OSPD[853044] 2023-02-20 18:08:33,084: INFO: (ospd.command.command) Scan c54966ec-5697-44a1-821e-ba7c2807c5b5 added to the queue in position 1.
OSPD[853044] 2023-02-20 18:08:35,765: INFO: (ospd.ospd) Currently 1 queued scans.
OSPD[853044] 2023-02-20 18:08:35,976: INFO: (ospd.ospd) Starting scan c54966ec-5697-44a1-821e-ba7c2807c5b5.
OSPD[853044] 2023-02-21 02:20:19,465: ERROR: (ospd.ospd) c54966ec-5697-44a1-821e-ba7c2807c5b5: Exception Redis is loading the dataset in memory while scanning
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/ospd/ospd.py", line 596, in start_scan
    self.exec_scan(scan_id)
  File "/usr/lib/python3/dist-packages/ospd_openvas/daemon.py", line 1198, in exec_scan
    target_is_finished = kbdb.target_is_finished(scan_id)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/ospd_openvas/db.py", line 582, in target_is_finished
    status = self._get_single_item(f'internal/{scan_id}')
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/ospd_openvas/db.py", line 476, in _get_single_item
    return OpenvasDB.get_single_item(self.ctx, name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/ospd_openvas/db.py", line 274, in get_single_item
    return ctx.lindex(name, index)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/redis/commands/core.py", line 2564, in lindex
    return self.execute_command("LINDEX", name, index)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/redis/client.py", line 1238, in execute_command
    return conn.retry.call_with_retry(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/redis/retry.py", line 49, in call_with_retry
    fail(error)
  File "/usr/lib/python3/dist-packages/redis/client.py", line 1242, in <lambda>
    lambda error: self._disconnect_raise(conn, error),
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/redis/client.py", line 1228, in _disconnect_raise
    raise error
  File "/usr/lib/python3/dist-packages/redis/retry.py", line 46, in call_with_retry
    return do()
           ^^^^
  File "/usr/lib/python3/dist-packages/redis/client.py", line 1239, in <lambda>
    lambda: self._send_command_parse_response(
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/redis/client.py", line 1215, in _send_command_parse_response
    return self.parse_response(conn, command_name, **options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/redis/client.py", line 1254, in parse_response
    response = connection.read_response()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/redis/connection.py", line 824, in read_response
    response = self._parser.read_response(disable_decoding=disable_decoding)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/redis/connection.py", line 487, in read_response
    raise response
redis.exceptions.BusyLoadingError: Redis is loading the dataset in memory
OSPD[853044] 2023-02-21 02:20:19,500: INFO: (ospd.ospd) c54966ec-5697-44a1-821e-ba7c2807c5b5: Host scan got interrupted. Progress: 23, Status: RUNNING
OSPD[853044] 2023-02-21 02:20:19,501: INFO: (ospd.ospd) c54966ec-5697-44a1-821e-ba7c2807c5b5: Scan interrupted.
OSPD[853044] 2023-02-21 02:20:23,456: INFO: (ospd.ospd) c54966ec-5697-44a1-821e-ba7c2807c5b5: Scan process is dead and its progress is 23
OSPD[853044] 2023-02-21 02:20:23,460: INFO: (ospd.ospd) c54966ec-5697-44a1-821e-ba7c2807c5b5: Scan interrupted.
OSPD[853044] 2023-02-21 02:20:23,471: INFO: (ospd.ospd) c54966ec-5697-44a1-821e-ba7c2807c5b5: Scan process is dead and its progress is 23
OSPD[853044] 2023-02-21 02:20:23,472: INFO: (ospd.ospd) c54966ec-5697-44a1-821e-ba7c2807c5b5: Scan interrupted.
OSPD[853044] 2023-02-21 02:20:23,535: INFO: (ospd.ospd) c54966ec-5697-44a1-821e-ba7c2807c5b5: Scan process is dead and its progress is 23
OSPD[853044] 2023-02-21 02:20:23,535: INFO: (ospd.ospd) c54966ec-5697-44a1-821e-ba7c2807c5b5: Scan interrupted.
OSPD[853044] 2023-02-21 02:20:23,570: INFO: (ospd.ospd) c54966ec-5697-44a1-821e-ba7c2807c5b5: Scan process is dead and its progress is 23
OSPD[853044] 2023-02-21 02:20:23,570: INFO: (ospd.ospd) c54966ec-5697-44a1-821e-ba7c2807c5b5: Scan interrupted.
OSPD[853044] 2023-02-21 07:26:26,904: INFO: (ospd.main) Shutting-down server ...

Now i trying fix the problem with redis-server

The required RAM really depends on your network, the found software and your scan configuration. Some scans require a lot of memory. I remember for example scanning vhosts is/was memory intensive. Therefore we recommend at least 8GiB of RAM (https://greenbone.github.io/docs/latest/22.4/source-build/index.html#hardware-requirements).

1 Like

Btw. there is a better workaround for the GPG issue

I have server with gvm with same hardware and with many more scanned hosts, and there were no problems with the redis-server and with RAM

I use

┌──(poker㉿xxxx)-[~]
└─$ redis-server --check-system                                                                                                                                                                                                        
[slow-clocksource]...OK
[xen-clocksource]...OK
[overcommit]...WARNING:
Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
[THP]...WARNING:
You have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo madvise > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled (set to 'madvise' or 'never').

I used the advice from this system check
And try scan again

Ok, it’s give me nothing, I have the same errors. I try a workaround for the GPG issue and rescan, but anyway scan is interrupted

OSPD[2146] 2023-02-21 19:41:46,409: INFO: (ospd.main) Starting OSPd OpenVAS version 22.4.5.
OSPD[2146] 2023-02-21 19:41:46,415: INFO: (ospd_openvas.messaging.mqtt) Successfully connected to MQTT broker
OSPD[2146] 2023-02-21 19:41:56,506: INFO: (ospd_openvas.daemon) Loading VTs. Scans will be [requested|queued] until VTs are loaded. This may take a few minutes, please wait...
OSPD[2146] 2023-02-21 19:43:40,797: INFO: (ospd_openvas.daemon) VTs were up to date. Feed version is 202302211010.
OSPD[2146] 2023-02-21 19:45:51,139: INFO: (ospd.command.command) Scan cec0ad17-54fe-4fac-8c17-b2bc49a384e5 added to the queue in position 1.
OSPD[2146] 2023-02-21 19:45:52,462: INFO: (ospd.ospd) Currently 1 queued scans.
OSPD[2146] 2023-02-21 19:45:52,597: INFO: (ospd.ospd) Starting scan cec0ad17-54fe-4fac-8c17-b2bc49a384e5.
OSPD[2146] 2023-02-22 04:11:18,827: ERROR: (ospd.ospd) cec0ad17-54fe-4fac-8c17-b2bc49a384e5: Exception Timeout reading from socket while scanning
Traceback (most recent call last):
 File "/usr/lib/python3/dist-packages/redis/connection.py", line 421, in read_from_socket
   bufflen = self._sock.recv_into(self._buffer)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TimeoutError: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
 File "/usr/lib/python3/dist-packages/ospd/ospd.py", line 596, in start_scan
   self.exec_scan(scan_id)
 File "/usr/lib/python3/dist-packages/ospd_openvas/daemon.py", line 1202, in exec_scan
   got_results = self.report_openvas_results(kbdb, scan_id)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/usr/lib/python3/dist-packages/ospd_openvas/daemon.py", line 821, in report_openvas_results
   all_results = db.get_result()
                 ^^^^^^^^^^^^^^^
 File "/usr/lib/python3/dist-packages/ospd_openvas/db.py", line 509, in get_result
   return self._pop_list_items("internal/results")
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/usr/lib/python3/dist-packages/ospd_openvas/db.py", line 493, in _pop_list_items
   return OpenvasDB.pop_list_items(self.ctx, name)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/usr/lib/python3/dist-packages/ospd_openvas/db.py", line 207, in pop_list_items
   results, redis_return_code = pipe.execute()
                                ^^^^^^^^^^^^^^
 File "/usr/lib/python3/dist-packages/redis/client.py", line 2078, in execute
   return conn.retry.call_with_retry(
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/usr/lib/python3/dist-packages/redis/retry.py", line 49, in call_with_retry
   fail(error)
 File "/usr/lib/python3/dist-packages/redis/client.py", line 2080, in <lambda>
   lambda error: self._disconnect_raise_reset(conn, error),
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/usr/lib/python3/dist-packages/redis/retry.py", line 46, in call_with_retry
   return do()
          ^^^^
 File "/usr/lib/python3/dist-packages/redis/client.py", line 2079, in <lambda>
   lambda: execute(conn, stack, raise_on_error),
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/usr/lib/python3/dist-packages/redis/client.py", line 1933, in _execute_transaction
   self.parse_response(connection, "_")
 File "/usr/lib/python3/dist-packages/redis/client.py", line 2018, in parse_response
   result = Redis.parse_response(self, connection, command_name, **options)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/usr/lib/python3/dist-packages/redis/client.py", line 1254, in parse_response
   response = connection.read_response()
              ^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/usr/lib/python3/dist-packages/redis/connection.py", line 824, in read_response
   response = self._parser.read_response(disable_decoding=disable_decoding)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/usr/lib/python3/dist-packages/redis/connection.py", line 467, in read_response
   self.read_from_socket()
 File "/usr/lib/python3/dist-packages/redis/connection.py", line 436, in read_from_socket
   raise TimeoutError("Timeout reading from socket")
redis.exceptions.TimeoutError: Timeout reading from socket
OSPD[2146] 2023-02-22 04:11:19,025: INFO: (ospd.ospd) cec0ad17-54fe-4fac-8c17-b2bc49a384e5: Host scan got interrupted. Progress: 24, Status: RUNNING
OSPD[2146] 2023-02-22 04:11:19,032: INFO: (ospd.ospd) cec0ad17-54fe-4fac-8c17-b2bc49a384e5: Scan interrupted.
OSPD[2146] 2023-02-22 04:11:23,967: INFO: (ospd.ospd) cec0ad17-54fe-4fac-8c17-b2bc49a384e5: Scan process is dead and its progress is 24
OSPD[2146] 2023-02-22 04:11:23,969: INFO: (ospd.ospd) cec0ad17-54fe-4fac-8c17-b2bc49a384e5: Scan interrupted.
OSPD[2146] 2023-02-22 04:11:23,975: INFO: (ospd.ospd) cec0ad17-54fe-4fac-8c17-b2bc49a384e5: Scan process is dead and its progress is 24
OSPD[2146] 2023-02-22 04:11:23,976: INFO: (ospd.ospd) cec0ad17-54fe-4fac-8c17-b2bc49a384e5: Scan interrupted.
OSPD[2146] 2023-02-22 04:11:24,143: INFO: (ospd.ospd) cec0ad17-54fe-4fac-8c17-b2bc49a384e5: Scan process is dead and its progress is 24
OSPD[2146] 2023-02-22 04:11:24,144: INFO: (ospd.ospd) cec0ad17-54fe-4fac-8c17-b2bc49a384e5: Scan interrupted.
OSPD[2146] 2023-02-22 04:11:24,166: INFO: (ospd.ospd) cec0ad17-54fe-4fac-8c17-b2bc49a384e5: Scan process is dead and its progress is 24
OSPD[2146] 2023-02-22 04:11:24,166: INFO: (ospd.ospd) cec0ad17-54fe-4fac-8c17-b2bc49a384e5: Scan interrupted.

Did you try out the redis-openvas.conf changes from Kali ospd-openvas not staring with MQTT broker errors - #9 by mopedmaster too?

If you about this
After that, edit /etc/redis/redis-openvas.conf and around line 221, add:

save ""

The area around this will look like:

#save 900 1
#save 300 10
#save 60 10000
save ""

After these changes, reboot the machine. Run gvm-start and everything will work/sync properly.

Yes, I did

Ok in that case I don’t have a clue why redis server is so slow that it can’t answer the messages from ospd-openvas. Are you maybe scanning the local host?

Local server added to exclusions

Ok, I tried dividing my scan into two parts so that each had approximately the same number of hosts and start scanning part 1.
Scan was interrupted at 58%

OSPD[658821] 2023-02-22 07:12:43,257: INFO: (ospd.main) Starting OSPd OpenVAS version 22.4.5.
OSPD[658821] 2023-02-22 07:12:43,266: INFO: (ospd_openvas.messaging.mqtt) Successfully connected to MQTT broker
OSPD[658821] 2023-02-22 07:12:53,365: INFO: (ospd_openvas.daemon) Loading VTs. Scans will be [requested|queued] until VTs are loaded. This may take a few minutes, please wait...
OSPD[658821] 2023-02-22 07:14:33,671: INFO: (ospd_openvas.daemon) VTs were up to date. Feed version is 202302211010.
OSPD[658821] 2023-02-22 07:18:30,853: INFO: (ospd.command.command) Scan 3f230b10-1242-4503-99fe-753fbfef604d added to the queue in position 1.
OSPD[658821] 2023-02-22 07:18:35,345: INFO: (ospd.ospd) Currently 1 queued scans.
OSPD[658821] 2023-02-22 07:18:35,483: INFO: (ospd.ospd) Starting scan 3f230b10-1242-4503-99fe-753fbfef604d.
OSPD[658821] 2023-02-22 12:49:51,382: ERROR: (ospd.server) Error sending data to the client. [Errno 32] Broken pipe
OSPD[658821] 2023-02-22 19:00:44,196: ERROR: (ospd.ospd) 3f230b10-1242-4503-99fe-753fbfef604d: Exception Error while reading from connection : (104, 'Connection reset by peer') while scanning
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/redis/connection.py", line 824, in read_response
    response = self._parser.read_response(disable_decoding=disable_decoding)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/redis/connection.py", line 467, in read_response
    self.read_from_socket()
  File "/usr/lib/python3/dist-packages/redis/connection.py", line 421, in read_from_socket
    bufflen = self._sock.recv_into(self._buffer)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ConnectionResetError: [Errno 104] Connection reset by peer

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/ospd/ospd.py", line 596, in start_scan
    self.exec_scan(scan_id)
  File "/usr/lib/python3/dist-packages/ospd_openvas/daemon.py", line 1198, in exec_scan
    target_is_finished = kbdb.target_is_finished(scan_id)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/ospd_openvas/db.py", line 582, in target_is_finished
    status = self._get_single_item(f'internal/{scan_id}')
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/ospd_openvas/db.py", line 476, in _get_single_item
    return OpenvasDB.get_single_item(self.ctx, name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/ospd_openvas/db.py", line 274, in get_single_item
    return ctx.lindex(name, index)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/redis/commands/core.py", line 2564, in lindex
    return self.execute_command("LINDEX", name, index)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/redis/client.py", line 1238, in execute_command
    return conn.retry.call_with_retry(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/redis/retry.py", line 49, in call_with_retry
    fail(error)
  File "/usr/lib/python3/dist-packages/redis/client.py", line 1242, in <lambda>
    lambda error: self._disconnect_raise(conn, error),
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/redis/client.py", line 1228, in _disconnect_raise
    raise error
  File "/usr/lib/python3/dist-packages/redis/retry.py", line 46, in call_with_retry
    return do()
           ^^^^
  File "/usr/lib/python3/dist-packages/redis/client.py", line 1239, in <lambda>
    lambda: self._send_command_parse_response(
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/redis/client.py", line 1215, in _send_command_parse_response
    return self.parse_response(conn, command_name, **options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/redis/client.py", line 1254, in parse_response
    response = connection.read_response()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/redis/connection.py", line 830, in read_response
    raise ConnectionError(f"Error while reading from {hosterr}" f" : {e.args}")
redis.exceptions.ConnectionError: Error while reading from connection : (104, 'Connection reset by peer')
OSPD[658821] 2023-02-22 19:00:44,266: INFO: (ospd.ospd) 3f230b10-1242-4503-99fe-753fbfef604d: Host scan got interrupted. Progress: 58, Status: RUNNING
OSPD[658821] 2023-02-22 19:00:44,267: INFO: (ospd.ospd) 3f230b10-1242-4503-99fe-753fbfef604d: Scan interrupted.
OSPD[658821] 2023-02-22 19:00:48,208: INFO: (ospd.ospd) 3f230b10-1242-4503-99fe-753fbfef604d: Scan process is dead and its progress is 58
OSPD[658821] 2023-02-22 19:00:48,210: INFO: (ospd.ospd) 3f230b10-1242-4503-99fe-753fbfef604d: Scan interrupted.
OSPD[658821] 2023-02-22 19:00:48,218: INFO: (ospd.ospd) 3f230b10-1242-4503-99fe-753fbfef604d: Scan process is dead and its progress is 58
OSPD[658821] 2023-02-22 19:00:48,218: INFO: (ospd.ospd) 3f230b10-1242-4503-99fe-753fbfef604d: Scan interrupted.
OSPD[658821] 2023-02-22 19:00:48,335: INFO: (ospd.ospd) 3f230b10-1242-4503-99fe-753fbfef604d: Scan process is dead and its progress is 58
OSPD[658821] 2023-02-22 19:00:48,338: INFO: (ospd.ospd) 3f230b10-1242-4503-99fe-753fbfef604d: Scan interrupted.
OSPD[658821] 2023-02-22 19:00:48,372: INFO: (ospd.ospd) 3f230b10-1242-4503-99fe-753fbfef604d: Scan process is dead and its progress is 58
OSPD[658821] 2023-02-22 19:00:48,373: INFO: (ospd.ospd) 3f230b10-1242-4503-99fe-753fbfef604d: Scan interrupted.

Now I have error number

For info, I have 8GB RAM

If you have persistence enabled, check if you still have the redis dump file and remove it.

I scanned part 2 and it scanned successfully. Could it be that the scan stops because of some specific host?

I check openvas.log

sd   main:MESSAGE:2023-02-22 18h21.02 utc:1225581: Running LSC via Notus for xxxx
sd   main:MESSAGE:2023-02-22 18h21.02 utc:1225581: Vulnerability scan 3f230b10-1242-4503-99fe-753fbfef604d finished for host xxxx in 6810.72 seconds
sd   main:MESSAGE:2023-02-22 18h21.03 utc:1329608: Vulnerability scan 3f230b10-1242-4503-99fe-753fbfef604d started for host: xxxx
lib  misc:MESSAGE:2023-02-22 18h33.09 utc:1335742: Function socket_negotiate_ssl called from gb_ssl_tls_secure_renegotiation_supported.nasl: SSL/TLS connection (host: xxxx, ip: xxxx) failed.
lib  misc:MESSAGE:2023-02-22 18h42.47 utc:1342595: Function socket_negotiate_ssl called from gb_ssl_tls_secure_renegotiation_supported.nasl: SSL/TLS connection (host: xxxx, ip: xxxx) failed.
lib  misc:MESSAGE:2023-02-22 18h46.03 utc:1345809: Function socket_negotiate_ssl called from gb_ssl_tls_secure_renegotiation_supported.nasl: SSL/TLS connection (host: xxxx, ip: xxxx) failed.
lib  misc:MESSAGE:2023-02-22 18h46.04 utc:1345813: Function socket_negotiate_ssl called from gb_ssl_tls_secure_renegotiation_supported.nasl: SSL/TLS connection (host: xxxx, ip: xxxx) failed.
lib  misc:MESSAGE:2023-02-22 18h46.05 utc:1345860: Function socket_negotiate_ssl called from gb_ssl_tls_untrusted_cert_detect.nasl: SSL/TLS connection (host: xxxx, ip: xxxx) failed.
lib  misc:MESSAGE:2023-02-22 18h46.19 utc:1346215: Function socket_negotiate_ssl called from gb_ssl_tls_renegotiation_dos_CVE-2011-1473_CVE-2011-5094.nasl: SSL/TLS connection (host: xxxx, ip: xxxx) failed.
lib  misc:MESSAGE:2023-02-22 18h46.20 utc:1346225: Function socket_negotiate_ssl called from gb_ssl_tls_renegotiation_mitm_CVE-2009-3555.nasl: SSL/TLS connection (host: xxxx, ip: xxxx) failed.
lib  misc:MESSAGE:2023-02-22 18h49.46 utc:1349880: Function socket_negotiate_ssl called from gb_ssl_tls_renegotiation_dos_CVE-2011-1473_CVE-2011-5094.nasl: SSL/TLS connection (host: xxxx, ip: xxxx) failed.
lib  misc:MESSAGE:2023-02-22 18h49.46 utc:1349883: Function socket_negotiate_ssl called from gb_ssl_tls_renegotiation_mitm_CVE-2009-3555.nasl: SSL/TLS connection (host: xxxx, ip: xxxx) failed.
libgvm util:CRITICAL:2023-02-22 19h00.44 utc:1352315: No redis DB available
libgvm util:CRITICAL:2023-02-22 19h00.44 utc:1349868: get_redis_ctx: redis connection error to /var/run/redis-openvas/redis-server.sock: Connection refused
libgvm util:CRITICAL:2023-02-22 19h00.44 utc:1190877: get_redis_ctx: redis connection error to /var/run/redis-openvas/redis-server.sock: Connection refused
libgvm util:CRITICAL:2023-02-22 19h00.44 utc:1349868: get_redis_ctx: redis connection error to /var/run/redis-openvas/redis-server.sock: Connection refused
lib  misc:WARNING:2023-02-22 19h00.44 utc:1190877: check_kb_inconsistency_log: No internal/scanid found; abort to prevent data corruption.
libgvm util:CRITICAL:2023-02-22 19h00.44 utc:1349868: get_redis_ctx: redis connection error to /var/run/redis-openvas/redis-server.sock: Connection refused
libgvm util:CRITICAL:2023-02-22 19h00.44 utc:1349868: get_redis_ctx: redis connection error to /var/run/redis-openvas/redis-server.sock: Connection refused

The Kali team seems to also prepare new releases to iron out a few issues in the recent Kali packages related to redis. Better wait for these to make sure that your issues are not originating from the problems in these packages.

Can you check in your redis config file or with the following command how many databases redis has available? (adjust the redis socket path)

$ redis-cli -s /run/redis/redis-server.sock Config get databases

You should configure this setting to at list 500 or even 1000

1 Like