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.37k stars 621 forks source link

HTTP Feed not working / wrong URL? #476

Closed kaistierl closed 4 years ago

kaistierl commented 4 years ago

Expected behavior

/usr/sbin/greenbone-nvt-sync --wget downloads the current NVT feed

Actual behavior

The downloaded file is corrupt / not the feed but the greenbone homepage...

Start refreshing NVTs...
Setting http_proxy and https_proxy environment variables
Syncing NVTs using wget
--2020-04-09 21:42:55--  http://dl.greenbone.net/community-nvt-feed-current.tar.bz2
Connecting to 192.168.0.100:3128... connected.
Proxy request sent, awaiting response... 301 Moved Permanently
Location: http://www.greenbone.net [following]
--2020-04-09 21:42:55--  http://www.greenbone.net/
Reusing existing connection to 192.168.0.100:3128.
Proxy request sent, awaiting response... 301 Moved Permanently
Location: https://www.greenbone.net/ [following]
--2020-04-09 21:42:55--  https://www.greenbone.net/
Connecting to 192.168.0.100:3128... connected.
Proxy request sent, awaiting response... 200 OK
Length: 97000 (95K) [text/html]
Saving to: '/tmp/greenbone-nvt-sync.9AbY8yQIRJ/openvas-feed-2020-04-09-167.tar.bz2'

100%[========================================================================================================================================================================>] 97,000      --.-K/s   in 0.04s

2020-04-09 21:42:56 (2.13 MB/s) - '/tmp/greenbone-nvt-sync.9AbY8yQIRJ/openvas-feed-2020-04-09-167.tar.bz2' saved [97000/97000]

bzip2: (stdin) is not a bzip2 file.
tar: Child returned status 2
tar: Error is not recoverable: exiting now

Steps to reproduce

simply run /usr/sbin/greenbone-nvt-sync --wget

Or: Try downloading http://dl.greenbone.net/community-nvt-feed-current.tar.bz2 using curl or a browser. This gets redirected to the greenbone homepage.

URL is the current one given in https://github.com/greenbone/openvas/blob/master/tools/greenbone-nvt-sync.in

kaistierl commented 4 years ago

...unfortunately this is blocking a production environment for me since we cannot get the feed via rsync due to proxy issues...

cfi-gb commented 4 years ago

Thanks for your report.

This is a problem with the feed services / of the download server and not originating from the OpenVAS scanner so closing this issue as invalid for this repository.

Please use https://community.greenbone.net/t/community-feed-url-redirects-to-greenbone-net-nvt-sync-fails/4887 for further discussions.

silverark commented 4 years ago

@cfi-gb Moderators saying that we should be using rsync (which still works) rather than http on the link you have provided. But this script specifically forces http for the first sync when there is no database. This will kill most installation unless you manually edit the script. Looks like Greenbone know the http version isn't working. Does this mean the script needs to change to rsync only?

For anyone hitting this issue currently, you can force rsync

greenbone-nvt-sync --rsync
NitinBhasneria commented 4 years ago

@cfi-gb @silverark after this I am encountered with error The number of NVTs in the OpenVAS Manager database is too low. Even the openvasmd --rebuild do not work. Please guide

cfi-gb commented 4 years ago

@NitinBhasneria from the issue template:

  1. Be aware that this is not a support forum. If your issue is rather a question than a bug report, please use our community forum at https://community.greenbone.net/c/gse instead.

Please follow this advice on your question about "The number of NVTs in the OpenVAS Manager database is too low."

cfi-gb commented 4 years ago

@silverark It seems the HTTP based download options are now completely dropped in favor of rsync: https://github.com/greenbone/openvas/pull/478

rakibulinux commented 4 years ago

The problem fixed. Use this:greenbone-nvt-sync --rsync or sudo greenbone-nvt-sync --rsync

cfi-gb commented 4 years ago

@silverark It seems the HTTP based download options are now completely dropped in favor of rsync: #478

Official announcement: https://community.greenbone.net/t/shutting-down-gcf-http-download/5339