[Résolu] clamav : Can't download *.cvd

Started by Darkopnsense, December 30, 2019, 05:54:37 PM

Previous topic - Next topic
Complement,

In console mode after downloading:

wget http://database.clamav.net/main.cvd -o /var/db/clamav/main.cvd
wget http://database.clamav.net/daily.cvd -o /var/db/clamav/daily.cvd
wget http://database.clamav.net/bytecode.cvd -o /var/db/clamav/bytecode.cvd

I have the following error:

Starting clamav_clamd.
LibClamAV Error: cli_cvdparse: Not a CVD file
LibClamAV Error: Can't load /var/db/clamav/main.cvd: Broken or not a CVD file
LibClamAV Error: cli_loaddbdir (): error loading database /var/db/clamav/main.cvd
Wed Jan 8 13:19:05 2020 ->! Broken or not a CVD file
/usr/local/etc/rc.d/clamav-clamd: WARNING: failed to start clamav_clamd
Starting clamav_freshclam.

This is starting to elude me. Ok until wget but for the definition I'm bad.

Kind regards to the person who can correct me and bring me the explanatory correction of what I am not doing well.

cordially
Depuis 2017
X7SPA-HF, Intel(R) ATOM(TM) D525, 4Go RAM, 120Go, 2 Lan 24.1.2_1
APU4c, 4Go RAM, 120Go, 4 Lan 24.1.10_8
APU3a, 2Go RAM, 60Go, 3 Lan 24.1.2_1
APU2c, 2Go RAM, 60Go, 3 Lan 23.7.1_3
BIOS A JOUR (v4.19.0.1).

Hm, on my systems everything works fine there.
Just to sum up:

You have 6 machines, all the same version, on 3 systems it works on the other 3 not, and you guess it is/was the other the plugins were installed, correct?

January 08, 2020, 03:14:03 PM #17 Last Edit: February 01, 2020, 10:07:01 PM by Darkopnsense
Hello minugmail,

Here is an overview of my equipment

P8B-X, Intel (R) Xeon (R) E3-1225V2, 8 GB RAM, 1 TB SATA, 2 Lan, OPNsense 20.1-amd64 OK, ClamAV 1.7 OK, Maltrail 1.3 OK, ntopng 1.2 OK, rspamd1.9 OK, Sensei 1.3.1 DB 1.3.1 elasticsearch OK  (Production)

X2630G, Intel (R) I3 (C), 8 GB RAM, 500 GB SATA, 2 Lan, OPNsense 20.1-amd64 OK, ClamAV 1.7 OK, Maltrail 1.3 OK, ntopng 1.2 OK, rspamd1.9 OK, Sensei 1.3.1 DB 1.3.1 elasticsearch OK

X7SPA-HF, Intel (R) ATOM (TM) D525, 4GB RAM, 320GB SATA, 2 Lan, OPNsense 20.1-amd64 OK, ClamAV 1.7 OK, Maltrail 1.3 OK, ntopng 1.2 OK, rspamd1.9 OK, Sensei 1.3.1 DB 1.3.1 mongodb OK

AP3a, 2GB RAM, 60GB mATA, 3 Lan, OPNsense 20.1-amd64 OK, ClamAV 1.7 OK, Maltrail 1.3 OK, ntopng 1.2 OK, rspamd1.9 OK, Sensei 1.3.1 DB 1.3.1 mongodb OK

AP4c, 4GB RAM, 120GB mATA, 4 Lan, OPNsense 20.1-amd64 OK, ClamAV 1.7 OK, Maltrail 1.3 OK, ntopng 1.2 OK, rspamd1.9 OK, Sensei 1.3.1 DB 1.3.1 mongodb OK (Production)

ALL BIOS UP TO DATE.

Regards, my mother tongue is French
Depuis 2017
X7SPA-HF, Intel(R) ATOM(TM) D525, 4Go RAM, 120Go, 2 Lan 24.1.2_1
APU4c, 4Go RAM, 120Go, 4 Lan 24.1.10_8
APU3a, 2Go RAM, 60Go, 3 Lan 24.1.2_1
APU2c, 2Go RAM, 60Go, 3 Lan 23.7.1_3
BIOS A JOUR (v4.19.0.1).

Re Hello minugmail,

I returned to service the

X7SPA-HF, Intel (R) ATOM (TM) D525, 4GB RAM, 320GB SATA, 2 Lan, OPNsense 19.7.8-amd64 OK, ClamAV 1.7 OUT, Sensei 1.2.5 DB 1.3.1 mongodb OK

Regards, my mother tongue is French
Depuis 2017
X7SPA-HF, Intel(R) ATOM(TM) D525, 4Go RAM, 120Go, 2 Lan 24.1.2_1
APU4c, 4Go RAM, 120Go, 4 Lan 24.1.10_8
APU3a, 2Go RAM, 60Go, 3 Lan 24.1.2_1
APU2c, 2Go RAM, 60Go, 3 Lan 23.7.1_3
BIOS A JOUR (v4.19.0.1).

P8B-X and X2630G are in the same network as the others? Which device is the gateway for them all?
Whats the setting in "System : Settings : General"? (Screenshot would be best)

Hi minugmail,

the P8B-X and the X2630G are not in the same network.

Each utm has its wan link and its own network.

In system / settings / general
each with its own host name
each to his domain
time zone: europe / paris
French language
theme: tukan
prefer ipv4 to ipv6: deactivate
identical dns server on all
allow DNS replacement: enabled
do not use local dns: disabled
allow gateway failover: disabled
Depuis 2017
X7SPA-HF, Intel(R) ATOM(TM) D525, 4Go RAM, 120Go, 2 Lan 24.1.2_1
APU4c, 4Go RAM, 120Go, 4 Lan 24.1.10_8
APU3a, 2Go RAM, 60Go, 3 Lan 24.1.2_1
APU2c, 2Go RAM, 60Go, 3 Lan 23.7.1_3
BIOS A JOUR (v4.19.0.1).

All right, all of them work.

I'm adding an instruction to use in console mode

# sudo clamd

For beginners all is in this thread, you just need to have knowledge in shell mode, know how to change direction and destroy files if necessary.

To have a spirit of analysis and understanding in what we read.

I would close when I have validated on another machine.

Regards,
Depuis 2017
X7SPA-HF, Intel(R) ATOM(TM) D525, 4Go RAM, 120Go, 2 Lan 24.1.2_1
APU4c, 4Go RAM, 120Go, 4 Lan 24.1.10_8
APU3a, 2Go RAM, 60Go, 3 Lan 24.1.2_1
APU2c, 2Go RAM, 60Go, 3 Lan 23.7.1_3
BIOS A JOUR (v4.19.0.1).

A big thank you to all the speakers.

No problem, I can confirm that with less than ten command lines in console mode, Clamav works very well.

Therefore

X7SPA-HF, Intel (R) ATOM (TM) D525, 4 GB RAM, 320 GB SATA, 2 Lan, OPNsense 19.7.8-amd64 OK, ClamAV 1.7 OK, Sensei 1.2.5 DB 1.3 .1 mongodb OK

AP3a, 2 GB RAM, 60 GB mATA, 3 Lan, OPNsense 19.7.8-amd64 OK, ClamAV 1.7 OK, Sensei uninstalled because stopped for swap> 30%

Happy new year and see you next time.
Depuis 2017
X7SPA-HF, Intel(R) ATOM(TM) D525, 4Go RAM, 120Go, 2 Lan 24.1.2_1
APU4c, 4Go RAM, 120Go, 4 Lan 24.1.10_8
APU3a, 2Go RAM, 60Go, 3 Lan 24.1.2_1
APU2c, 2Go RAM, 60Go, 3 Lan 23.7.1_3
BIOS A JOUR (v4.19.0.1).

Quote from: Darkopnsense on January 08, 2020, 07:01:04 PM
# sudo clamd

To be fair, "#" would already indicate you are root so the sudo does nothing.

Lesson to be learned here: anything less than root on the console for administrative tasks such as service update, addition and removal is futile.


Cheers,
Franco

I do everything as described in this post. And unfortunately I get the answer as below. Does any of your colleagues have any advice

Thank you






LibClamAV Error: cli_cvdparse: Not a CVD file
LibClamAV Error: Can't load /var/db/clamav/main.cvd: Broken or not a CVD file
LibClamAV Error: cli_loaddbdir(): error loading database /var/db/clamav/main.cvd
Sat Feb  1 17:57:18 2020 -> !Broken or not a CVD file

this is obviously the log when trying to run clamav
Thank you

maybe a colleague of Darkopnsense give a description of the clamav configuration using ssh.

I will be very grateful

Hi,

Did you delete all cvd and cld files before downloading?

Sincerely, (French mother tongue)
Depuis 2017
X7SPA-HF, Intel(R) ATOM(TM) D525, 4Go RAM, 120Go, 2 Lan 24.1.2_1
APU4c, 4Go RAM, 120Go, 4 Lan 24.1.10_8
APU3a, 2Go RAM, 60Go, 3 Lan 24.1.2_1
APU2c, 2Go RAM, 60Go, 3 Lan 23.7.1_3
BIOS A JOUR (v4.19.0.1).

I deleted, then downloaded and the message as below


root@OPNsense:/var/db/clamav # wget http://database.clamav.net/main.cvd -o /var/db/clamav/main.cvd
root@OPNsense:/var/db/clamav # wget http://database.clamav.net/daily.cvd -o /var/db/clamav/daily.cvd
root@OPNsense:/var/db/clamav # wget http://database.clamav.net/bytecode.cvd -o /var/db/clamav/bytecode.cvd
root@OPNsense:/var/db/clamav # sudo clamd
LibClamAV Error: cli_cvdparse: Not a CVD file
LibClamAV Error: cli_loaddbdir(): error parsing header of /var/db/clamav/daily.cvd
Sat Feb  1 22:18:00 2020 -> !Malformed database
root@OPNsense:/var/db/clamav #
root@OPNsense:/var/db/clamav # ls
bytecode.cvd    bytecode.cvd.1  daily.cvd       daily.cvd.1     main.cvd        main.cvd.1      tmp
root@OPNsense:/var/db/clamav #
root@OPNsense:/var/db/clamav # rm bytecode.cvd.1
root@OPNsense:/var/db/clamav #
root@OPNsense:/var/db/clamav # rm daily.cvd.1
root@OPNsense:/var/db/clamav #
root@OPNsense:/var/db/clamav # rm  main.cvd.1
root@OPNsense:/var/db/clamav # ls
bytecode.cvd    daily.cvd       main.cvd        tmp
root@OPNsense:/var/db/clamav # sudo clamd
LibClamAV Error: cli_cvdparse: Not a CVD file
LibClamAV Error: cli_loaddbdir(): error parsing header of /var/db/clamav/daily.cvd
Sat Feb  1 22:19:45 2020 -> !Malformed database
root@OPNsense:/var/db/clamav #

after entering, freshclma downloads the files but does not finish the download. stops at around 97 mb etc

root@OPNsense:/var/db/clamav # freshclam
Sat Feb  1 22:22:18 2020 -> ClamAV update process started at Sat Feb  1 22:22:18 2020
Sat Feb  1 22:22:18 2020 -> ^[LibClamAV] cli_cvdparse: Not a CVD file
Sat Feb  1 22:22:18 2020 -> daily database available for download (remote version: 25713)
Time: 37.2s, ETA; 0.0s [=======================================>] 55.74MiB/55.74MiB
Sat Feb  1 22:22:57 2020 -> Testing database: '/var/db/clamav/tmp/clamav-61c0221544ffd174fbfaab7e1afce7d7.tmp-daily.cvd' ...
Sat Feb  1 22:23:03 2020 -> Database test passed.
Sat Feb  1 22:23:03 2020 -> daily.cvd updated (version: 25713, sigs: 2172237, f-level: 63, builder: raynman)
Sat Feb  1 22:23:03 2020 -> ^[LibClamAV] cli_cvdparse: Not a CVD file
Sat Feb  1 22:23:03 2020 -> main database available for download (remote version: 59)
Sat Feb  1 22:24:03 2020 -> ^Download failed (28) Sat Feb  1 22:24:03 2020 -> ^ Message: Timeout was reached
Sat Feb  1 22:24:03 2020 -> ^getcvd: Can't download main.cvd from http://database.clamav.net//main.cvd
Sat Feb  1 22:24:03 2020 -> Trying again in 5 secs...
Sat Feb  1 22:24:08 2020 -> ^[LibClamAV] cli_cvdparse: Not a CVD file
Sat Feb  1 22:24:08 2020 -> main database available for download (remote version: 59)
Sat Feb  1 22:25:08 2020 -> ^Download failed (28) Sat Feb  1 22:25:08 2020 -> ^ Message: Timeout was reached
Sat Feb  1 22:25:08 2020 -> ^getcvd: Can't download main.cvd from http://database.clamav.net//main.cvd
Sat Feb  1 22:25:08 2020 -> Trying again in 5 secs...
Sat Feb  1 22:25:13 2020 -> ^[LibClamAV] cli_cvdparse: Not a CVD file
Sat Feb  1 22:25:13 2020 -> main database available for download (remote version: 59)
^CSat Feb  1 22:25:19 2020 -> Update process terminated         ] 9.05MiB/112.40MiB