greenbone / openvas-scanner

This repository contains the scanner component for Greenbone Community Edition.
https://greenbone.github.io/docs/
GNU General Public License v2.0
3.36k stars 621 forks source link

all tasks interrupted at 0% #1105

Closed haogege11 closed 2 years ago

haogege11 commented 2 years ago

I installed all about GVM and can load on the web of gsa, but when i start to scan the task, it is interrupted at 0%. I don't know why it happens, my Experimental environment and logs are as below:

uname -a Linux kali 5.10.0-kali3-amd64 #1 SMP Debian 5.10.13-1kali1 (2021-02-08) x86_64 GNU/Linux openvas --version OpenVAS 21.4.4 gvm-libs 21.4.4 psql --version psql (PostgreSQL) 14.2 (Debian 14.2-1+b3) redis-cli --version redis-cli 6.0.16 gsad --version Greenbone Security Assistant 21.4.4 gvmd --version Greenbone Vulnerability Manager 21.4.5 Manager DB revision 242

cat openvas.log lib nasl:MESSAGE: /var/lib/openvas/plugins/plugin_feed_info.inc: Not able to open nor to locate it in include paths cat gvmd.log md manage:WARNING: OSP start_scan 3f338b2e-3c6d-4ce8-a1d4-f1364d1c622f: VTs list is empty cat ospd-openvas.log OSPD[88177] ERROR: (ospd_openvas.openvas) OpenVAS Scanner failed to load VTs. Command '['openvas', '--update-vt-info']' returned non-zero exit status 1.

anyone can help?

Kraemii commented 2 years ago

Hello haogege11, there can be several reasons for this. In order to start a scan both gvmd and the openvas-scanner need VT data, which are scripts run by the openvas-scanner. It seems that either the location in which the VTs should be loacated is wrong or you forgot to run greenbone-nvt-sync. Note that the location of the VTs has to be adjusted according to your install prefix you chose. In order to fix this do the following:

  1. Be sure you have synced the VTs with greenbone-nvt-sync
  2. Make sure you set the correct location for the VTs within the openvas.conf which should be located at <install_prefix>/etc/openvas/openvas.conf. This config file should contain these both settings:
    include_folders = <install_prefix>/var/lib/openvas/plugins/
    plugins_folder = <install_prefix>/var/lib/openvas/plugins/

Try this and give me an update :)

haogege11 commented 2 years ago

i tried to do as you said, but nothing changed :( why does my log show that "VTs list is empty" still ? and the command "greenbone-nvt-sync" has changed for "sudo runuser -u _gvm -- greenbone-nvt-sync".

Kraemii commented 2 years ago

Ok can you run openvas -s post the output? And run sudo find / -name plugin_feed_info.inc to see if this file can be found on your system.

haogege11 commented 2 years ago

problem solved ! thanks :) your adverise inlight me! I checked the redis use the command "cat /var/log/redis/redis-server-openvas.log" and found the issues, then i do the following: 1、sysctl vm.overcommit_memory=1 2、echo madvise > /sys/kernel/mm/transparent hugepage/enabled