OpenVAS 扫描仪超时

OpenVAS 扫描仪超时

扫描仪一直工作正常,直到我运行一个包含 58 个目标(CSV 文件)的任务,默认的最大同时扫描主机数 = 20,负载变得太高,我无法重新登录,否则可能会让它运行并对目标发生一些事情,所以我只是运行了“服务 openvas-扫描仪停止“,它确实停止了,但现在我无法将它重新启动。

我现在不知道该做什么,也没有在网上找到任何有用的东西,我不想为了停止命令而重新开始......

状态:

root@OPENVAS: systemctl status openvas-scanner.service
● openvas-scanner.service - LSB: remote network security auditor - scanner
   Loaded: loaded (/etc/init.d/openvas-scanner; bad; vendor preset: enabled)
   Active: failed (Result: timeout) since Qua 2019-01-16 17:20:13 -02; 29min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 1173 ExecStart=/etc/init.d/openvas-scanner start (code=killed, signal=TERM)
    Tasks: 1
   Memory: 3.8M
      CPU: 54ms
   CGroup: /system.slice/openvas-scanner.service
           └─1208 /usr/sbin/openvassd

Jan 16 17:15:12 OPENVAS systemd[1]: Starting LSB: remote network security auditor - scanner...
Jan 16 17:15:14 OPENVAS openvas-scanner[1173]: (openvassd:1208): lib  kb_redis-CRITICAL **: fetch_max_db_index: cannot retr
Jan 16 17:20:13 OPENVAS systemd[1]: openvas-scanner.service: Start operation timed out. Terminating.
Jan 16 17:20:13 OPENVAS systemd[1]: Failed to start LSB: remote network security auditor - scanner.
Jan 16 17:20:13 OPENVAS systemd[1]: openvas-scanner.service: Unit entered failed state.
Jan 16 17:20:13 OPENVAS systemd[1]: openvas-scanner.service: Failed with result 'timeout'.

当我尝试开始时:

root@OPENVAS systemctl start openvas-scanner.service
Job for openvas-scanner.service failed because a timeout was exceeded. See "systemctl status openvas-scanner.service" and "journalctl -xe" for details

journalctl-xe

root@OPENVAS: journalctl -xe
Jan 16 18:15:17 OPENVAS sudo[1796]: root : TTY=pts/0 ; PWD=/run/redis ; USER=root ; COMMAND=/usr/sbin/openvasmd --rebuild
Jan 16 18:15:17 OPENVAS sudo[1796]: pam_unix(sudo:session): session opened for user root by root(uid=0)
Jan 16 18:17:01 OPENVAS CRON[1815]: pam_unix(cron:session): session opened for user root by (uid=0)
Jan 16 18:17:01 OPENVAS CRON[1816]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Jan 16 18:17:01 OPENVAS CRON[1815]: pam_unix(cron:session): session closed for user root
Jan 16 18:29:36 OPENVAS sudo[1796]: pam_unix(sudo:session): session closed for user root
Jan 16 18:29:45 OPENVAS systemd[1]: Starting LSB: remote network security auditor - scanner...
-- Subject: Unidade openvas-scanner.service sendo iniciado
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- A unidade openvas-scanner.service está sendo iniciada.
Jan 16 18:34:45 OPENVAS systemd[1]: openvas-scanner.service: Start operation timed out. Terminating.
Jan 16 18:34:45 OPENVAS systemd[1]: Failed to start LSB: remote network security auditor - scanner.
-- Subject: A unidade openvas-scanner.service falhou
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- A unidade openvas-scanner.service falhou.
--
-- O resultado é failed.
Jan 16 18:34:45 OPENVAS systemd[1]: openvas-scanner.service: Unit entered failed state.
Jan 16 18:34:45 OPENVAS systemd[1]: openvas-scanner.service: Failed with result 'timeout'.

答案1

使用上面提到的资源重新检查您的 Redis 设置。以下步骤已知可行并可解决此问题:

删除文件 dump.rdb(例如,位于 /var/run/redis,具体取决于您的设置)从 redis.conf 中注释掉/删除所有保存 xy z(例如,保存 900 1)(例如,位于 /etc/redis,具体取决于您的设置)可选:刷新 redis 数据库(取决于您的设置,例如 redis-cli -s /var/run/redis/redis.sock flushall)重新启动 redis(取决于您的设置,例如,服务 redis-server restart)重新启动扫描仪(openvassd)并重试

临时解决方案是使用 flushall 命令刷新 redis-cli 数据库并重新启动扫描仪以检索 NVT。以下是检查您是否有未使用的数据库的步骤:

$ redis-cli -s <path_to_redis_socket>
> INFO keyspace

相关内容