gvm-containers icon indicating copy to clipboard operation
gvm-containers copied to clipboard

Problems with feed updates

Open serveradmin99 opened this issue 5 years ago • 2 comments
trafficstars

Getting rsync error on docker-compose up because all three feed sync containers are trying to run at the same time and there can only be one:

"rsync: failed to connect to feed.community.greenbone.net (45.135.106.142): Connection refused (111)"

To get around this I have changed the command on the first service as follows and deleted the other two services:

command: sh -c "greenbone-certdata-sync --curl --verbose && greenbone-nvt-sync && greenbone-scapdata-sync --curl --verbose"

Could really do with implementing some way to run the sync commands on a schedule as well.

serveradmin99 avatar Nov 10 '20 15:11 serveradmin99

Here is what I do :

tls@kali2:~$ sudo docker ps
CONTAINER ID   IMAGE                      COMMAND                  CREATED          STATUS          PORTS                  NAMES
a032e3001422   admirito/gsad:11           "docker-entrypoint.s…"   15 minutes ago   Up 15 minutes   0.0.0.0:8080->80/tcp   gvm-containers_gsad_1
3daecda6f2e4   redis:5.0                  "docker-entrypoint.s…"   15 minutes ago   Up 15 minutes   6379/tcp               gvm-containers_redis_1
4d53ada2f992   admirito/gvmd:11           "docker-entrypoint.s…"   15 minutes ago   Up 15 minutes   9390/tcp               gvm-containers_gvmd_1
839babaef78d   admirito/openvas:11        "/tini -- bash /usr/…"   15 minutes ago   Up 15 minutes                          gvm-containers_openvas_1
f75839d23afa   admirito/gvm-postgres:11   "docker-entrypoint.s…"   2 weeks ago      Up 15 minutes   5432/tcp               gvm-containers_gvm-postgres_1

Then I invoke the command proposed by serveradmin99 :

sudo docker exec -it gvm-containers_gvmd_1 bash 
root@4d53ada2f992:/# greenbone-certdata-sync --curl --verbose && greenbone-nvt-sync && greenbone-scapdata-sync --curl --verbose

Feeds are then updated ! There is one issue related to rsync: sent 69 bytes received 429 bytes 199.20 bytes/sec total size is 1,014 speedup is 2.04 rsync: failed to connect to feed.community.greenbone.net (45.135.106.142): Connection refused (111) rsync: failed to connect to feed.community.greenbone.net (2a0e:6b40:20:106:20c:29ff:fe67:cbb5): Cannot assign requested address (99) rsync error: error in socket IO (code 10) at clientserver.c(127) [Receiver=3.1.3]

tsmets avatar Feb 26 '21 16:02 tsmets

The suggested default command in old version in gvm-11 branch had this issue:

docker-compose -f docker-compose.yml -f nvt-sync.yml -f cert-sync.yml -f scap-sync.yml up

and then greenbone will block your IP because thay have this policy to only allow one sync at a time. Of course you could do once at a time with:

docker-compose -f nvt-sync.yml up
docker-compose -f cert-sync.yml up
docker-compose -f scap-sync.yml up

The suggested command in the latest version, i.e. gvm-20, has fixed in the README file, so please use the latest version and follow the instructions in the README.

admirito avatar Feb 27 '21 06:02 admirito