Scan interrupted at 0 %

I saw no category for the GVM 20.08 VirtualBox image, so I posted it here.

I installed the image, configured it, downloaded the latest feeds.
Tryed to do a hostscan of one host at first, but it was interrupted after 0 % (repeatedly)
I have been looking, but can not find out why, there is no logging and no error.

Can you give me a tip?

Hi @kees,
What do the logs say? Did you check in all log files (openvas, ospd-openvas and gvmd)? If you could paste the logs, it would be helpful.

1 Like

Hi @jjnicola, thank you for your reply, but as I wrote, there is no logging and no error reported .

Is your ospd-openvas daemon running? At least it should log something if it tries to start a scan.
What does gvmd logs says? I have just killed my ospd-openvas daemon, and a scan is set as interrupted. The gvmd log says:

md manage:WARNING:2021-04-15 07h49.31 UTC:22254: Could not connect to Scanner at /var/run/ospd/openvas.sock
md manage:WARNING:2021-04-15 07h49.31 UTC:22254: OSP start_scan 264e0394-4fc6-43ed-9bb4-0b4106f234ad: Could not connect to Scanner
event task:MESSAGE:2021-04-15 07h49.31 UTC:22254: Status of task MyTask (4625a0be-f8e9-4dcc-becf-381045ccf910) has changed to Done
event task:MESSAGE:2021-04-15 07h49.31 UTC:22254: Status of task MyTask (4625a0be-f8e9-4dcc-becf-381045ccf910) has changed to Interrupted
1 Like

Hello kees!

I assume with “GVM 20.08 VirtualBox image” you mean our “GSM TRIAL” appliance for VirtualBox from https://www.greenbone.net/en/testnow/?

If so, please re-download the appliance - We have just released the new version 20.08.8 where we have fixed two interrupt bugs.

If the problem persists with the new version, we do need logs to debug the issue further. On the GSM TRIAL, you can view the logs as follows:

  1. Log in to the VM via the hypervsior console or via SSH
  2. Open the menu Advanced > Support > Shell
  3. Execute the command journalctl -f
  4. In the web interface, start the scan
  5. Monitor the logs in the console from step 3
3 Likes

@jjnicola, @Martin thank you for your replies, I will download the new version and do some more testing!

@Martin,
Importing the GSM TRIAL

  1. Download the OVA file of the GSM TRIAL.
    still points at the 20.08.7 version!

Please check the the “Download” tab, it links the correct download:

I will see to it that we get the “Importing the GSM TRIAL” part fixed.

Edit: Fixed now.

@jjnicola, here a screenshot of the running processes and a listing of the log/gvm directory:

@Martin, yes I’m now downloading the new version, thanks!

The same result with the new Trial 20.08.8.
Settings:

  • IPv4 enabled
  • DNS unset
  • Global Gateway unset
    I can ping and connect through ssh to the server I want to do the host discovery to, from the VirualBox VM.
    Here is a list of processes running:
UID        PID  PPID  C STIME TTY          TIME CMD
root         1     0  0 09:59 ?        00:00:01 /sbin/init
root         2     0  0 09:59 ?        00:00:00 [kthreadd]
root         3     2  0 09:59 ?        00:00:00 [rcu_gp]
root         4     2  0 09:59 ?        00:00:00 [rcu_par_gp]
root         6     2  0 09:59 ?        00:00:00 [kworker/0:0H-kblockd]
root         8     2  0 09:59 ?        00:00:00 [mm_percpu_wq]
root         9     2  0 09:59 ?        00:00:00 [ksoftirqd/0]
root        10     2  0 09:59 ?        00:00:01 [rcu_sched]
root        11     2  0 09:59 ?        00:00:00 [rcu_bh]
root        12     2  0 09:59 ?        00:00:00 [migration/0]
root        13     2  0 09:59 ?        00:00:00 [kworker/0:1-events]
root        14     2  0 09:59 ?        00:00:00 [cpuhp/0]
root        15     2  0 09:59 ?        00:00:00 [cpuhp/1]
root        16     2  0 09:59 ?        00:00:00 [migration/1]
root        17     2  0 09:59 ?        00:00:00 [ksoftirqd/1]
root        19     2  0 09:59 ?        00:00:00 [kworker/1:0H-kblockd]
root        20     2  0 09:59 ?        00:00:00 [kdevtmpfs]
root        21     2  0 09:59 ?        00:00:00 [netns]
root        22     2  0 09:59 ?        00:00:00 [kauditd]
root        23     2  0 09:59 ?        00:00:00 [khungtaskd]
root        24     2  0 09:59 ?        00:00:00 [oom_reaper]
root        25     2  0 09:59 ?        00:00:00 [writeback]
root        26     2  0 09:59 ?        00:00:00 [kcompactd0]
root        27     2  0 09:59 ?        00:00:00 [ksmd]
root        28     2  0 09:59 ?        00:00:00 [khugepaged]
root        29     2  0 09:59 ?        00:00:00 [crypto]
root        30     2  0 09:59 ?        00:00:00 [kintegrityd]
root        31     2  0 09:59 ?        00:00:00 [kblockd]
root        32     2  0 09:59 ?        00:00:00 [edac-poller]
root        33     2  0 09:59 ?        00:00:00 [devfreq_wq]
root        34     2  0 09:59 ?        00:00:00 [watchdogd]
root        35     2  0 09:59 ?        00:00:00 [kworker/1:1-events]
root        36     2  0 09:59 ?        00:00:00 [kswapd0]
root        54     2  0 09:59 ?        00:00:00 [kthrotld]
root        55     2  0 09:59 ?        00:00:00 [ipv6_addrconf]
root        65     2  0 09:59 ?        00:00:00 [kstrp]
root       110     2  0 09:59 ?        00:00:00 [ata_sff]
root       111     2  0 09:59 ?        00:00:00 [scsi_eh_0]
root       112     2  0 09:59 ?        00:00:00 [scsi_tmf_0]
root       113     2  0 09:59 ?        00:00:00 [scsi_eh_1]
root       114     2  0 09:59 ?        00:00:00 [scsi_tmf_1]
root       115     2  0 09:59 ?        00:00:00 [kworker/u4:2-events_unbound]
root       117     2  0 09:59 ?        00:00:02 [kworker/0:1H-kblockd]
root       130     2  1 09:59 ?        00:00:07 [kworker/1:1H-kblockd]
root       132     2  0 09:59 ?        00:00:00 [kdmflush]
root       146     2  0 09:59 ?        00:00:00 [kworker/u5:0]
root       148     2  0 09:59 ?        00:00:00 [jbd2/dm-0-8]
root       149     2  0 09:59 ?        00:00:00 [ext4-rsv-conver]
root       197     1  0 09:59 ?        00:00:00 /lib/systemd/systemd-journald
root       207     2  0 09:59 ?        00:00:01 [kworker/1:2-events]
root       221     2  0 09:59 ?        00:00:00 [kworker/u4:3-events_unbound]
root       233     1  0 09:59 ?        00:00:00 /lib/systemd/systemd-udevd
root       290     2  0 09:59 ?        00:00:00 [ttm_swap]
root       293     2  0 09:59 ?        00:00:00 [jbd2/sda2-8]
root       294     2  0 09:59 ?        00:00:00 [ext4-rsv-conver]
root       320     1  0 09:59 ?        00:00:00 /usr/sbin/haveged --Foreground --verbose=1 -w 1024
root       336     1  0 09:59 ?        00:00:00 /usr/sbin/syslog-ng -F
root       337     1  0 09:59 ?        00:00:00 /usr/sbin/cron -f
root       339     2  0 09:59 ?        00:00:00 [kworker/0:3-events]
root       346     1  0 09:59 ?        00:00:00 /usr/sbin/incrond
root       358     1  0 09:59 ?        00:00:00 /sbin/dhclient -4 -v -i -pf /run/dhclient.eth0.pid -
gsad       463     1  0 09:59 ?        00:00:00 /usr/sbin/gsad --foreground --drop-privileges=gsad -
root       465     1  0 09:59 ?        00:00:01 /usr/sbin/collectd
root       466     1  0 09:59 tty4     00:00:00 /sbin/agetty -o -p -- \u --noclear tty4 linux
root       467     1  0 09:59 tty1     00:00:00 /bin/login -p --
root       468     1  0 09:59 tty2     00:00:00 /sbin/agetty -o -p -- \u --noclear tty2 linux
root       469     1  0 09:59 tty6     00:00:00 /sbin/agetty -o -p -- \u --noclear tty6 linux
root       470     1  0 09:59 tty3     00:00:00 /sbin/agetty -o -p -- \u --noclear tty3 linux
root       471     1  0 09:59 tty5     00:00:00 /sbin/agetty -o -p -- \u --noclear tty5 linux
dnsmasq    476     1  0 09:59 ?        00:00:00 /usr/sbin/dnsmasq -x /run/dnsmasq/dnsmasq.pid -u dns
redis      490     1  4 09:59 ?        00:00:37 /usr/bin/redis-server *:0
postgres   518     1  0 09:59 ?        00:00:00 /usr/lib/postgresql/11/bin/postgres -D /var/lib/post
gsad       519   463  0 09:59 ?        00:00:00 /usr/sbin/gsad --foreground --drop-privileges=gsad -
postgres   523   518  0 09:59 ?        00:00:00 postgres: 11/main: checkpointer   
postgres   524   518  0 09:59 ?        00:00:00 postgres: 11/main: background writer   
postgres   525   518  0 09:59 ?        00:00:00 postgres: 11/main: walwriter   
postgres   526   518  0 09:59 ?        00:00:00 postgres: 11/main: autovacuum launcher   
postgres   527   518  0 09:59 ?        00:00:00 postgres: 11/main: stats collector   
postgres   528   518  0 09:59 ?        00:00:00 postgres: 11/main: logical replication launcher   
ospd       556     1  1 10:00 ?        00:00:14 /usr/bin/python3 /usr/bin/ospd-openvas --config=/etc
ospd       558   556  0 10:00 ?        00:00:00 /usr/bin/python3 /usr/bin/ospd-openvas --config=/etc
gvmd       570     1  0 10:00 ?        00:00:01 gvmd: Waiting for incoming connections
postgres   589   518  0 10:00 ?        00:00:00 postgres: 11/main: gvmd gvmd [local] idle
admin      628   467  0 10:00 tty1     00:00:01 /usr/bin/python3 /usr/bin/pyspatch /usr/share/gsm-cl
admin     1287   628  0 10:06 tty1     00:00:00 /bin/bash
admin     1477  1287  0 10:12 tty1     00:00:00 ps -ef

Anything I should configure?

Please check the log with journalctl -f while you run the scan, as @Martin explain above

1 Like

@jjnicola @Martin I tried with journalctl -f, see below:

-- Logs begin at Thu 2021-04-15 05:49:55 UTC. --
Apr 19 10:58:08 gsm systemd[1]: Started Journal Service.
Apr 19 10:58:08 gsm systemd[1]: Started Flush Journal to Persistent Storage.
Apr 19 10:58:09 gsm systemd[1]: systemd-udevd.service: Main process exited, code=killed, status=6/ABRT
Apr 19 10:58:09 gsm systemd[1]: systemd-udevd.service: Failed with result 'watchdog'.
Apr 19 10:58:09 gsm systemd[1]: systemd-udevd.service: Service has no hold-off time (RestartSec=0), scheduling restart.
Apr 19 10:58:09 gsm systemd[1]: systemd-udevd.service: Scheduled restart job, restart counter is at 1.
Apr 19 10:58:09 gsm systemd[1]: Stopped udev Kernel Device Manager.
Apr 19 10:58:09 gsm systemd[1]: Starting udev Kernel Device Manager...
Apr 19 10:58:09 gsm systemd-udevd[2218]: Network interface NamePolicy= disabled on kernel command line, ignoring.
Apr 19 10:58:09 gsm systemd[1]: Started udev Kernel Device Manager.
Apr 19 11:00:17 gsm gsad[463]: gsad  gmp[463]: Authentication success for 'kees' from 192.168.178.70
Apr 19 11:00:22 gsm gvmd[2299]: Status of task artemis (5f55d9cd-6bd9-4989-9ad5-746abde4874e) has changed to Requested
Apr 19 11:00:22 gsm gvmd[2299]: Task artemis (5f55d9cd-6bd9-4989-9ad5-746abde4874e) has been requested to start by kees
Apr 19 11:00:23 gsm ospd-openvas[556]: OSPD[550] INFO: (ospd.command.command) Scan 4e580af1-01d3-4169-8d8a-e256b43b03ce added to the queue in position 1.
Apr 19 11:00:23 gsm gvmd[2304]: Status of task artemis (5f55d9cd-6bd9-4989-9ad5-746abde4874e) has changed to Queued
Apr 19 11:00:27 gsm ospd-openvas[556]: OSPD[550] INFO: (ospd.ospd) Currently 1 queued scans.
Apr 19 11:00:27 gsm ospd-openvas[556]: OSPD[550] INFO: (ospd.ospd) Starting scan 4e580af1-01d3-4169-8d8a-e256b43b03ce.
Apr 19 11:00:27 gsm sudo[2348]:     ospd : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/sbin/openvas -s
Apr 19 11:00:27 gsm sudo[2348]: pam_unix(sudo:session): session opened for user root by (uid=0)
Apr 19 11:00:27 gsm sudo[2348]: pam_unix(sudo:session): session closed for user root
Apr 19 11:00:27 gsm sudo[2350]:     ospd : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/sbin/openvas --scan-start f6b295a2-4f59-47d1-98cc-89eb4d00cbbd
Apr 19 11:00:27 gsm sudo[2350]: pam_unix(sudo:session): session opened for user root by (uid=0)
Apr 19 11:00:27 gsm openvas[2351]: sd   main[2351]: openvas 20.8.2 started
Apr 19 11:00:28 gsm gvmd[2304]: Status of task artemis (5f55d9cd-6bd9-4989-9ad5-746abde4874e) has changed to Running
Apr 19 11:00:39 gsm sudo[2350]: pam_unix(sudo:session): session closed for user root
Apr 19 11:00:39 gsm ospd-openvas[2343]: OSPD[550] ERROR: (ospd_openvas.daemon) Task 4e580af1-01d3-4169-8d8a-e256b43b03ce was unexpectedly stopped or killed.
Apr 19 11:00:39 gsm ospd-openvas[2343]: OSPD[550] INFO: (ospd.ospd) 4e580af1-01d3-4169-8d8a-e256b43b03ce: Host scan finished.
Apr 19 11:00:39 gsm ospd-openvas[2343]: OSPD[550] INFO: (ospd.ospd) 4e580af1-01d3-4169-8d8a-e256b43b03ce: Host scan finished. Progress: 0, Status: RUNNING
Apr 19 11:00:39 gsm ospd-openvas[2343]: OSPD[550] INFO: (ospd.ospd) 4e580af1-01d3-4169-8d8a-e256b43b03ce: Scan interrupted.
Apr 19 11:00:43 gsm ospd-openvas[556]: OSPD[550] INFO: (ospd.ospd) 4e580af1-01d3-4169-8d8a-e256b43b03ce: Scan process is dead and its progress is 0
Apr 19 11:00:43 gsm ospd-openvas[556]: OSPD[550] INFO: (ospd.ospd) 4e580af1-01d3-4169-8d8a-e256b43b03ce: Scan interrupted.
Apr 19 11:00:43 gsm ospd-openvas[556]: OSPD[550] INFO: (ospd.ospd) 4e580af1-01d3-4169-8d8a-e256b43b03ce: Scan process is dead and its progress is 0
Apr 19 11:00:43 gsm ospd-openvas[556]: OSPD[550] INFO: (ospd.ospd) 4e580af1-01d3-4169-8d8a-e256b43b03ce: Scan interrupted.
Apr 19 11:00:43 gsm ospd-openvas[556]: OSPD[550] INFO: (ospd.ospd) 4e580af1-01d3-4169-8d8a-e256b43b03ce: Scan process is dead and its progress is 0
Apr 19 11:00:43 gsm ospd-openvas[556]: OSPD[550] INFO: (ospd.ospd) 4e580af1-01d3-4169-8d8a-e256b43b03ce: Scan interrupted.
Apr 19 11:00:43 gsm ospd-openvas[556]: OSPD[550] INFO: (ospd.ospd) 4e580af1-01d3-4169-8d8a-e256b43b03ce: Scan process is dead and its progress is 0
Apr 19 11:00:43 gsm ospd-openvas[556]: OSPD[550] INFO: (ospd.ospd) 4e580af1-01d3-4169-8d8a-e256b43b03ce: Scan interrupted.
Apr 19 11:00:43 gsm gvmd[2304]: Status of task artemis (5f55d9cd-6bd9-4989-9ad5-746abde4874e) has changed to Interrupted

I looks like:
Apr 19 11:00:39 gsm ospd-openvas[2343]: OSPD[550] ERROR: (ospd_openvas.daemon) Task 4e580af1-01d3-4169-8d8a-e256b43b03ce was unexpectedly stopped or killed.
was the cause. Does not give any clue as far as I can see…

Finally got it running, AFAICT the problem was that I ran the tasks as a normal user, when I run them as admin, they run and finish as planned.
@Martin, maybe an error can be reported that it is not possible to run a task as a normal user?

I am not able to reproduce this behaviour.
Are you using the default “User” role, or a custom configured role?
And are you starting the task via the (Advanced) Task Wizard, or are you creating a task by hand?

This indicates a misconfigured setting, or a problem with the target hosts definition.
Did you configure the task setting “Network Source Interface” for the scan task?
And if possible, may we see the hosts and excluded hosts of the scan target for debugging purposes?

1 Like

@Martin, I have been testing and finally found out what I did wrong in those scans, I filled in the Network Source Interface with the IP address the webserver is running on, since it was open, I didn;t know what else to put there. Once I leave it open, it worked correctly.
So it is a user error I guess, no fault in GSM.

1 Like

Thank you for the feedback, I’m glad you were able to solve it!

The “Network Source Interface” is an older setting with difficult useability. We are currently assessing on how to handle it in the future.

For now you can simply leave the “Network Source Interface” field empty, it is not required for the normal GSM operation!

2 Likes

A post was merged into an existing topic: Manage_update_nvt_cache_osp: failed to connect to /opt/gvm/var/run/ospd.sock

Hi, where do i change that setting? in web or server (virtual machine)?

The “Network Source Interface” setting was available in the web interface via the “New Task” or “Edit Task” dialogs.

Please note that this setting has since been deprecated and removed for all currently supported versions of our products, so you will most likely not see it anymore. If you still see it, you must upgrade to a supported version.

3 Likes