Ospd-openvas Is not Reachable after a while

Hello Together,
i have a problem wilth openvas community edition what i dont understand and don´t find a real Fix for it. The Problem is Pretty Simple:
After a while, it is not the same everytime, the ospd-openvas container logs it is not reachable anymore. I can restart it with:

docker compose -f $DOWNLOAD_DIR/docker-compose.yml -p greenbone-community-edition  restart ospd-openvas

Then it will run again for a while. I discovered it will also stop working when the system do not Perform any Scan. i used the official documentation for Ubuntu to set it up ( Greenbone Community Containers 22.4 - Greenbone Community Documentation )

Does anyone else have this isse ?
Thanks
Nils

Do you get any log output via docker compose -f $DOWNLOAD_DIR/docker-compose.yml -p greenbone-community-edition logs ospd-openvas, is the container still running?

Sorry for the late reply i had to wait till the issues happend. Here are the logs:

docker compose -f docker-compose.yml -p greenbone-community-edition logs -f

Says:

greenbone-community-edition-gvmd-1                 | md manage:   INFO:2023-10-19 14h38.09 UTC:119781: Captured duplicate report host detail, report: 21 hash_value: f2780557108d1b5a1397a8b1ae3abed6
greenbone-community-edition-gvmd-1                 | event task:MESSAGE:2023-10-19 17h55.38 UTC:119781: Status of task weniger hosts (272f9db8-45b2-4eee-9fca-5a7c2061be64) has changed to Interrupted
.
.
.
greenbone-community-edition-gvmd-1                 | md manage:   INFO:2023-10-19 17h59.25 UTC:133203: osp_scanner_feed_version: No feed version available yet. OSPd OpenVAS is still starting

And
docker compose -f docker-compose.yml -p greenbone-community-edition logs ospd-openvas -f
Says:

greenbone-community-edition-ospd-openvas-1  | OSPD[8] 2023-10-19 17:55:38,213: INFO: (ospd.ospd) e2f857d5-e4b2-4989-a436-56ca077114ac: Scan process is dead and its progress is 36
greenbone-community-edition-ospd-openvas-1  | OSPD[8] 2023-10-19 17:55:38,214: INFO: (ospd.ospd) e2f857d5-e4b2-4989-a436-56ca077114ac: Scan interrupted.
greenbone-community-edition-ospd-openvas-1  | Traceback (most recent call last):
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/redis/connection.py", line 1079, in get_connection
greenbone-community-edition-ospd-openvas-1  |     if connection.can_read():
greenbone-community-edition-ospd-openvas-1  |        ^^^^^^^^^^^^^^^^^^^^^
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/redis/connection.py", line 471, in can_read
greenbone-community-edition-ospd-openvas-1  |     return self._parser.can_read(timeout)
greenbone-community-edition-ospd-openvas-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/redis/_parsers/base.py", line 129, in can_read
greenbone-community-edition-ospd-openvas-1  |     return self._buffer and self._buffer.can_read(timeout)
greenbone-community-edition-ospd-openvas-1  |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/redis/_parsers/socket.py", line 95, in can_read
greenbone-community-edition-ospd-openvas-1  |     return bool(self.unread_bytes()) or self._read_from_socket(
greenbone-community-edition-ospd-openvas-1  |                                         ^^^^^^^^^^^^^^^^^^^^^^^
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/redis/_parsers/socket.py", line 68, in _read_from_socket
greenbone-community-edition-ospd-openvas-1  |     raise ConnectionError(SERVER_CLOSED_CONNECTION_ERROR)
greenbone-community-edition-ospd-openvas-1  | redis.exceptions.ConnectionError: Connection closed by server.
greenbone-community-edition-ospd-openvas-1  |
greenbone-community-edition-ospd-openvas-1  | During handling of the above exception, another exception occurred:
greenbone-community-edition-ospd-openvas-1  |
greenbone-community-edition-ospd-openvas-1  | Traceback (most recent call last):
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/redis/connection.py", line 259, in connect
greenbone-community-edition-ospd-openvas-1  |     sock = self.retry.call_with_retry(
greenbone-community-edition-ospd-openvas-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/redis/retry.py", line 46, in call_with_retry
greenbone-community-edition-ospd-openvas-1  |     return do()
greenbone-community-edition-ospd-openvas-1  |            ^^^^
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/redis/connection.py", line 260, in <lambda>
greenbone-community-edition-ospd-openvas-1  |     lambda: self._connect(), lambda error: self.disconnect(error)
greenbone-community-edition-ospd-openvas-1  |             ^^^^^^^^^^^^^^^
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/redis/connection.py", line 803, in _connect
greenbone-community-edition-ospd-openvas-1  |     sock.connect(self.path)
greenbone-community-edition-ospd-openvas-1  | FileNotFoundError: [Errno 2] No such file or directory
greenbone-community-edition-ospd-openvas-1  |
greenbone-community-edition-ospd-openvas-1  | During handling of the above exception, another exception occurred:
greenbone-community-edition-ospd-openvas-1  |
greenbone-community-edition-ospd-openvas-1  | Traceback (most recent call last):
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/bin/ospd-openvas", line 8, in <module>
greenbone-community-edition-ospd-openvas-1  |     sys.exit(main())
greenbone-community-edition-ospd-openvas-1  |              ^^^^^^
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/ospd_openvas/daemon.py", line 1244, in main
greenbone-community-edition-ospd-openvas-1  |     daemon_main('OSPD - openvas', OSPDopenvas, NotusParser())
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/ospd/main.py", line 153, in main
greenbone-community-edition-ospd-openvas-1  |     daemon.run()
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/ospd/ospd.py", line 1103, in run
greenbone-community-edition-ospd-openvas-1  |     self.scheduler()
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/ospd_openvas/daemon.py", line 703, in scheduler
greenbone-community-edition-ospd-openvas-1  |     self.check_feed()
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/ospd_openvas/daemon.py", line 677, in check_feed
greenbone-community-edition-ospd-openvas-1  |     current_feed = self.nvti.get_feed_version()
greenbone-community-edition-ospd-openvas-1  |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/ospd_openvas/nvticache.py", line 70, in get_feed_version
greenbone-community-edition-ospd-openvas-1  |     return OpenvasDB.get_single_item(self.ctx, NVTI_CACHE_NAME)
greenbone-community-edition-ospd-openvas-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/ospd_openvas/db.py", line 268, in get_single_item
greenbone-community-edition-ospd-openvas-1  |     return ctx.lindex(name, index)
greenbone-community-edition-ospd-openvas-1  |            ^^^^^^^^^^^^^^^^^^^^^^^
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/redis/commands/core.py", line 2685, in lindex
greenbone-community-edition-ospd-openvas-1  |     return self.execute_command("LINDEX", name, index)
greenbone-community-edition-ospd-openvas-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/redis/client.py", line 505, in execute_command
greenbone-community-edition-ospd-openvas-1  |     conn = self.connection or pool.get_connection(command_name, **options)
greenbone-community-edition-ospd-openvas-1  |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/redis/connection.py", line 1083, in get_connection
greenbone-community-edition-ospd-openvas-1  |     connection.connect()
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/redis/connection.py", line 265, in connect
greenbone-community-edition-ospd-openvas-1  |     raise ConnectionError(self._error_message(e))
greenbone-community-edition-ospd-openvas-1  | redis.exceptions.ConnectionError: Error 2 connecting to unix socket: /run/redis/redis.sock. No such file or directory.
greenbone-community-edition-ospd-openvas-1  | OSPD[8] 2023-10-19 17:55:39,651: INFO: (ospd.main) Shutting-down server ...
greenbone-community-edition-ospd-openvas-1  | Exception ignored in atexit callback: <function exit_cleanup at 0x7f7d5d1d1120>
greenbone-community-edition-ospd-openvas-1  | Traceback (most recent call last):
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/ospd/main.py", line 74, in exit_cleanup
greenbone-community-edition-ospd-openvas-1  |     sys.exit()
greenbone-community-edition-ospd-openvas-1  | SystemExit:
greenbone-community-edition-ospd-openvas-1  | [WARN  tini (7)] Tini is not running as PID 1 and isn't registered as a child subreaper.
greenbone-community-edition-ospd-openvas-1  | Zombie processes will not be re-parented to Tini, so zombie reaping won't work.
greenbone-community-edition-ospd-openvas-1  | To fix the problem, use the -s option or set the environment variable TINI_SUBREAPER to register Tini as a child subreaper, or run Tini as PID 1.
greenbone-community-edition-ospd-openvas-1  | OSPD[8] 2023-10-19 17:55:46,550: INFO: (ospd.main) Starting OSPd OpenVAS version 22.6.0.
greenbone-community-edition-ospd-openvas-1  | OSPD[8] 2023-10-19 17:55:46,579: INFO: (ospd_openvas.messaging.mqtt) Successfully connected to MQTT broker
greenbone-community-edition-ospd-openvas-1  | OSPD[8] 2023-10-19 17:55:56,710: INFO: (ospd_openvas.daemon) Loading VTs. Scans will be [requested|queued] until VTs are loaded. This may take a few minutes, please wait...
greenbone-community-edition-ospd-openvas-1  | OSPD[8] 2023-10-19 17:58:54,107: INFO: (ospd_openvas.daemon) Finished loading VTs. The VT cache has been updated from version 0 to 202309150621.

From the logs you can read that the redis-server container is not running. It is required by ospd-openvas for storing the scan results. Try to check the logs of the redis-server container and to restart it.

I believe Redis is typically one of the first processes to be stopped by the Linux OOM Killer?

I Watched it today and found a message which says that Memory overcommit is not enabled. I enabled it but i had the same issue. for me the Redis server is not stopped except the time i Killed it

greenbone-community-edition-redis-server-1  | 8:M 19 Oct 2023 17:55:39.731 * The server is now ready to accept connections at /run/redis/redis.sock
greenbone-community-edition-redis-server-1  | 8:C 21 Oct 2023 00:00:31.628 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
greenbone-community-edition-redis-server-1  | 8:C 21 Oct 2023 00:00:31.628 # Redis version=7.0.11, bits=64, commit=00000000, modified=0, pid=8, just started
greenbone-community-edition-redis-server-1  | 8:C 21 Oct 2023 00:00:31.628 # Configuration loaded
greenbone-community-edition-redis-server-1  | 8:M 21 Oct 2023 00:00:31.628 * monotonic clock: POSIX clock_gettime
greenbone-community-edition-redis-server-1  | 8:M 21 Oct 2023 00:00:31.668 * Running mode=standalone, port=0.
greenbone-community-edition-redis-server-1  | 8:M 21 Oct 2023 00:00:31.668 # Server initialized
greenbone-community-edition-redis-server-1  | 8:M 21 Oct 2023 00:00:31.668 # 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.
greenbone-community-edition-redis-server-1  | 8:M 21 Oct 2023 00:00:31.687 * The server is now ready to accept connections at /run/redis/redis.sock
greenbone-community-edition-redis-server-1  | 8:C 23 Oct 2023 06:33:48.128 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
greenbone-community-edition-redis-server-1  | 8:C 23 Oct 2023 06:33:48.128 # Redis version=7.0.11, bits=64, commit=00000000, modified=0, pid=8, just started
greenbone-community-edition-redis-server-1  | 8:C 23 Oct 2023 06:33:48.128 # Configuration loaded
greenbone-community-edition-redis-server-1  | 8:M 23 Oct 2023 06:33:48.128 * monotonic clock: POSIX clock_gettime
greenbone-community-edition-redis-server-1  | 8:M 23 Oct 2023 06:33:48.129 * Running mode=standalone, port=0.
greenbone-community-edition-redis-server-1  | 8:M 23 Oct 2023 06:33:48.129 # Server initialized
greenbone-community-edition-redis-server-1  | 8:M 23 Oct 2023 06:33:48.130 * The server is now ready to accept connections at /run/redis/redis.sock
greenbone-community-edition-redis-server-1  | Killed
greenbone-community-edition-redis-server-1  | 9:C 23 Oct 2023 13:23:24.711 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
greenbone-community-edition-redis-server-1  | 9:C 23 Oct 2023 13:23:24.711 # Redis version=7.0.11, bits=64, commit=00000000, modified=0, pid=9, just started
greenbone-community-edition-redis-server-1  | 9:C 23 Oct 2023 13:23:24.711 # Configuration loaded
greenbone-community-edition-redis-server-1  | 9:M 23 Oct 2023 13:23:24.712 * monotonic clock: POSIX clock_gettime
greenbone-community-edition-redis-server-1  | 9:M 23 Oct 2023 13:23:24.742 * Running mode=standalone, port=0.
greenbone-community-edition-redis-server-1  | 9:M 23 Oct 2023 13:23:24.742 # Server initialized
greenbone-community-edition-redis-server-1  | 9:M 23 Oct 2023 13:23:24.761 * The server is now ready to accept connections at /run/redis/redis.sock

This is what the ospd openvas logs says:

greenbone-community-edition-ospd-openvas-1  | OSPD[8] 2023-10-23 06:37:10,449: INFO: (ospd.command.command) Scan d9e766e3-70f7-4391-a183-43195ff4078e added to the queue in position 2.
greenbone-community-edition-ospd-openvas-1  | OSPD[8] 2023-10-23 06:38:52,994: INFO: (ospd_openvas.daemon) Finished loading VTs. The VT cache has been updated from version 0 to 202309150621.
greenbone-community-edition-ospd-openvas-1  | OSPD[8] 2023-10-23 06:39:28,042: INFO: (ospd.ospd) Currently 1 queued scans.
greenbone-community-edition-ospd-openvas-1  | OSPD[8] 2023-10-23 06:39:28,208: INFO: (ospd.ospd) Starting scan d9e766e3-70f7-4391-a183-43195ff4078e.
greenbone-community-edition-ospd-openvas-1  | [/source/samba/librpc/rpc/dcerpc_connect.c:329:dcerpc_pipe_connect_ncacn_ip_tcp_recv()] failed NT status (c00000b5) in dcerpc_pipe_connect_ncacn_ip_tcp_recv
greenbone-community-edition-ospd-openvas-1  | [/source/samba/librpc/rpc/dcerpc_connect.c:790:dcerpc_pipe_connect_b_recv()] failed NT status (c00000b5) in dcerpc_pipe_connect_b_recv
greenbone-community-edition-ospd-openvas-1  | [/source/samba/librpc/rpc/dcerpc_connect.c:329:dcerpc_pipe_connect_ncacn_ip_tcp_recv()] failed NT status (c0000017) in dcerpc_pipe_connect_ncacn_ip_tcp_recv
greenbone-community-edition-ospd-openvas-1  | [/source/samba/librpc/rpc/dcerpc_connect.c:790:dcerpc_pipe_connect_b_recv()] failed NT status (c0000017) in dcerpc_pipe_connect_b_recv
.
.
..
greenbone-community-edition-ospd-openvas-1  | [/source/samba/librpc/rpc/dcerpc_connect.c:329:dcerpc_pipe_connect_ncacn_ip_tcp_recv()] failed NT status (c0000017) in dcerpc_pipe_connect_ncacn_ip_tcp_recv
greenbone-community-edition-ospd-openvas-1  | [/source/samba/librpc/rpc/dcerpc_connect.c:790:dcerpc_pipe_connect_b_recv()] failed NT status (c0000017) in dcerpc_pipe_connect_b_recv
greenbone-community-edition-ospd-openvas-1  | [/source/samba/librpc/rpc/dcerpc_connect.c:329:dcerpc_pipe_connect_ncacn_ip_tcp_recv()] failed NT status (c0000017) in dcerpc_pipe_connect_ncacn_ip_tcp_recv
greenbone-community-edition-ospd-openvas-1  | [/source/samba/librpc/rpc/dcerpc_connect.c:790:dcerpc_pipe_connect_b_recv()] failed NT status (c0000017) in dcerpc_pipe_connect_b_recv
greenbone-community-edition-ospd-openvas-1  | [/source/samba/librpc/rpc/dcerpc_connect.c:329:dcerpc_pipe_connect_ncacn_ip_tcp_recv()] failed NT status (c0000017) in dcerpc_pipe_connect_ncacn_ip_tcp_recv
greenbone-community-edition-ospd-openvas-1  | [/source/samba/librpc/rpc/dcerpc_connect.c:790:dcerpc_pipe_connect_b_recv()] failed NT status (c0000017) in dcerpc_pipe_connect_b_recv
greenbone-community-edition-ospd-openvas-1  | [/source/samba/librpc/rpc/dcerpc_connect.c:329:dcerpc_pipe_connect_ncacn_ip_tcp_recv()] failed NT status (c00000b5) in dcerpc_pipe_connect_ncacn_ip_tcp_recv
greenbone-community-edition-ospd-openvas-1  | [/source/samba/librpc/rpc/dcerpc_connect.c:790:dcerpc_pipe_connect_b_recv()] failed NT status (c00000b5) in dcerpc_pipe_connect_b_recv
greenbone-community-edition-ospd-openvas-1  | [/source/samba/librpc/rpc/dcerpc_connect.c:329:dcerpc_pipe_connect_ncacn_ip_tcp_recv()] failed NT status (c00000b5) in dcerpc_pipe_connect_ncacn_ip_tcp_recv
greenbone-community-edition-ospd-openvas-1  | [/source/samba/librpc/rpc/dcerpc_connect.c:790:dcerpc_pipe_connect_b_recv()] failed NT status (c00000b5) in dcerpc_pipe_connect_b_recv
greenbone-community-edition-ospd-openvas-1  | Traceback (most recent call last):
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/bin/ospd-openvas", line 8, in <module>
greenbone-community-edition-ospd-openvas-1  |     sys.exit(main())
greenbone-community-edition-ospd-openvas-1  |              ^^^^^^
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/ospd_openvas/daemon.py", line 1244, in main
greenbone-community-edition-ospd-openvas-1  |     daemon_main('OSPD - openvas', OSPDopenvas, NotusParser())
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/ospd/main.py", line 153, in main
greenbone-community-edition-ospd-openvas-1  |     daemon.run()
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/ospd/ospd.py", line 1103, in run
greenbone-community-edition-ospd-openvas-1  |     self.scheduler()
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/ospd_openvas/daemon.py", line 703, in scheduler
greenbone-community-edition-ospd-openvas-1  |     self.check_feed()
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/ospd_openvas/daemon.py", line 677, in check_feed
greenbone-community-edition-ospd-openvas-1  |     current_feed = self.nvti.get_feed_version()
greenbone-community-edition-ospd-openvas-1  |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/ospd_openvas/nvticache.py", line 70, in get_feed_version
greenbone-community-edition-ospd-openvas-1  |     return OpenvasDB.get_single_item(self.ctx, NVTI_CACHE_NAME)
greenbone-community-edition-ospd-openvas-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/ospd_openvas/db.py", line 268, in get_single_item
greenbone-community-edition-ospd-openvas-1  |     return ctx.lindex(name, index)
greenbone-community-edition-ospd-openvas-1  |            ^^^^^^^^^^^^^^^^^^^^^^^
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/redis/commands/core.py", line 2685, in lindex
greenbone-community-edition-ospd-openvas-1  |     return self.execute_command("LINDEX", name, index)
greenbone-community-edition-ospd-openvas-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/redis/client.py", line 508, in execute_command
greenbone-community-edition-ospd-openvas-1  |     return conn.retry.call_with_retry(
greenbone-community-edition-ospd-openvas-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/redis/retry.py", line 49, in call_with_retry
greenbone-community-edition-ospd-openvas-1  |     fail(error)
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/redis/client.py", line 512, in <lambda>
greenbone-community-edition-ospd-openvas-1  |     lambda error: self._disconnect_raise(conn, error),
greenbone-community-edition-ospd-openvas-1  |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/redis/client.py", line 498, in _disconnect_raise
greenbone-community-edition-ospd-openvas-1  |     raise error
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/redis/retry.py", line 46, in call_with_retry
greenbone-community-edition-ospd-openvas-1  |     return do()
greenbone-community-edition-ospd-openvas-1  |            ^^^^
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/redis/client.py", line 509, in <lambda>
greenbone-community-edition-ospd-openvas-1  |     lambda: self._send_command_parse_response(
greenbone-community-edition-ospd-openvas-1  |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/redis/client.py", line 485, in _send_command_parse_response
greenbone-community-edition-ospd-openvas-1  |     return self.parse_response(conn, command_name, **options)
greenbone-community-edition-ospd-openvas-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/redis/client.py", line 525, in parse_response
greenbone-community-edition-ospd-openvas-1  |     response = connection.read_response()
greenbone-community-edition-ospd-openvas-1  |                ^^^^^^^^^^^^^^^^^^^^^^^^^^
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/redis/connection.py", line 493, in read_response
greenbone-community-edition-ospd-openvas-1  |     response = self._parser.read_response(disable_decoding=disable_decoding)
greenbone-community-edition-ospd-openvas-1  |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/redis/_parsers/resp2.py", line 15, in read_response
greenbone-community-edition-ospd-openvas-1  |     result = self._read_response(disable_decoding=disable_decoding)
greenbone-community-edition-ospd-openvas-1  |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/redis/_parsers/resp2.py", line 25, in _read_response
greenbone-community-edition-ospd-openvas-1  |     raw = self._buffer.readline()
greenbone-community-edition-ospd-openvas-1  |           ^^^^^^^^^^^^^^^^^^^^^^^
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/redis/_parsers/socket.py", line 115, in readline
greenbone-community-edition-ospd-openvas-1  |     self._read_from_socket()
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/redis/_parsers/socket.py", line 68, in _read_from_socket
greenbone-community-edition-ospd-openvas-1  |     raise ConnectionError(SERVER_CLOSED_CONNECTION_ERROR)
greenbone-community-edition-ospd-openvas-1  | redis.exceptions.ConnectionError: Connection closed by server.
greenbone-community-edition-ospd-openvas-1  | OSPD[8] 2023-10-23 13:23:21,204: WARNING: (ospd.ospd) Error sending data to the client while executing a scan d9e766e3-70f7-4391-a183-43195ff4078e.
greenbone-community-edition-ospd-openvas-1  | Exception ignored in atexit callback: <function exit_cleanup at 0x7f28857cd120>
greenbone-community-edition-ospd-openvas-1  | Traceback (most recent call last):
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/ospd/main.py", line 69, in exit_cleanup
greenbone-community-edition-ospd-openvas-1  |     daemon.daemon_exit_cleanup()
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/ospd/ospd.py", line 448, in daemon_exit_cleanup
greenbone-community-edition-ospd-openvas-1  |     self.scan_collection.clean_up_pickled_scan_info()
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/ospd/scan.py", line 252, in clean_up_pickled_scan_info
greenbone-community-edition-ospd-openvas-1  |     if self.get_status(scan_id) == ScanStatus.QUEUED:
greenbone-community-edition-ospd-openvas-1  |        ^^^^^^^^^^^^^^^^^^^^^^^^
greenbone-community-edition-ospd-openvas-1  |   File "/usr/local/lib/python3.11/dist-packages/ospd/scan.py", line 352, in get_status
greenbone-community-edition-ospd-openvas-1  |     status = self.scans_table.get(scan_id, {}).get('status', None)
greenbone-community-edition-ospd-openvas-1  |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
greenbone-community-edition-ospd-openvas-1  |   File "<string>", line 2, in get
greenbone-community-edition-ospd-openvas-1  |   File "/usr/lib/python3.11/multiprocessing/managers.py", line 818, in _callmethod
greenbone-community-edition-ospd-openvas-1  |     self._connect()
greenbone-community-edition-ospd-openvas-1  |   File "/usr/lib/python3.11/multiprocessing/managers.py", line 805, in _connect
greenbone-community-edition-ospd-openvas-1  |     conn = self._Client(self._token.address, authkey=self._authkey)
greenbone-community-edition-ospd-openvas-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
greenbone-community-edition-ospd-openvas-1  |   File "/usr/lib/python3.11/multiprocessing/connection.py", line 501, in Client
greenbone-community-edition-ospd-openvas-1  |     c = SocketClient(address)
greenbone-community-edition-ospd-openvas-1  |         ^^^^^^^^^^^^^^^^^^^^^
greenbone-community-edition-ospd-openvas-1  |   File "/usr/lib/python3.11/multiprocessing/connection.py", line 629, in SocketClient
greenbone-community-edition-ospd-openvas-1  |     s.connect(address)
greenbone-community-edition-ospd-openvas-1  | FileNotFoundError: [Errno 2] No such file or directory
greenbone-community-edition-ospd-openvas-1  | [WARN  tini (7)] Tini is not running as PID 1 and isn't registered as a child subreaper.
greenbone-community-edition-ospd-openvas-1  | Zombie processes will not be re-parented to Tini, so zombie reaping won't work.
greenbone-community-edition-ospd-openvas-1  | To fix the problem, use the -s option or set the environment variable TINI_SUBREAPER to register Tini as a child subreaper, or run Tini as PID 1.
greenbone-community-edition-ospd-openvas-1  | OSPD[8] 2023-10-23 13:23:27,411: INFO: (ospd.main) Starting OSPd OpenVAS version 22.6.0.
greenbone-community-edition-ospd-openvas-1  | OSPD[8] 2023-10-23 13:23:27,424: INFO: (ospd_openvas.messaging.mqtt) Successfully connected to MQTT broker
greenbone-community-edition-ospd-openvas-1  | OSPD[8] 2023-10-23 13:23:37,517: INFO: (ospd_openvas.daemon) Loading VTs. Scans will be [requested|queued] until VTs are loaded. This may take a few minutes, please wait...
greenbone-community-edition-ospd-openvas-1  | OSPD[8] 2023-10-23 13:25:44,356: INFO: (ospd_openvas.daemon) Finished loading VTs. The VT cache has been updated from version 0 to 202309150621.

The Only Thin i see is that it has some trouble with samba is that normal ?

Thanks you all for trying to help :slight_smile:

Hi again,
i think i know now the reason why the Redis Server is crashing. It really seems so that OOM kills it (thanks @rippledj). At least i find a entry in the System logs for that. But i really dont know / understand why. The system has 16 GB ram and i only try to scan 254 hosts for me that shouldnt be that big deal or is my assumption here Completly wrong ?

Hello nils, please see my post here for some root causes and first steps of how to address this!

2 Likes

Hello Together,
after a many Tests i am able to find the Problem. The important Stuff first:
Thank you all for your help.

Now the Solution. It is Pretty simple, OOM kills the redis. It was my fault that i dont checked the system logs first. But i think it is interesting what brings Redis to fill up that much.
We have a system in use that is called “hashicorp” (https://www.hashicorp.com/) that responds in 5 minutes with 1 million Packages and this fills up the redis. We are still checking why it does that.

Thank you again for your help
Best regards
Nils

1 Like

There is a similar bug report for the OpenVAS scanner here: Memory leak on scan · Issue #1488 · greenbone/openvas-scanner · GitHub

Feel free to add any of your findings there, it may help us to debug the problem.

1 Like

Ref to the existing thread about “Hashicorp Vault” where this GitHub report is originating from:

2 Likes