yes, unfortunately i use the ClamAV (0.103.6) which are available for Ubuntu 
22.04. 1 LTS
Please try so simple as possible to explain what this code should do and for 
what i need to run?
% ls -ld /etc/systemd/system/multi-user.target.wants/clamav-freshclam.service 
/lib/systemd/system/clamav-freshclam.service
lrwxrwxrwx 1 root root  44 Jun 23  2018 
/etc/systemd/system/multi-user.target.wants/clamav-freshclam.service -> 
/lib/systemd/system/clamav-freshclam.service
-rw-r--r-- 1 root root 412 Aug 21 21:28 
/lib/systemd/system/clamav-freshclam.service
kind regards
Marc


Von / From: Matus Uhlar - Fantomas <mailto:uh...@fantomas.sk>
An / To: Newcomer01 <mailto:newcome...@posteo.de>
Gesendet / Sent: Donnerstag, Februar 16, 2023 um 16:47 (at 04:47 PM) +0100
Betreff / Subject: Re: [clamav-users] Strange Problem when trying update after 
reboot (Ubuntu 22.04.1 ClamAV 0.103.6)
On 16.02.23 15:13, newcomer01 via clamav-users wrote:
i know, i have asked the same thing before some weeks.
But i will post this again.
When i fresh reboot my Ubuntu 22.04.1 at morning my script test at first if dns 
is available and only if it is, it starts the download from clamav sig-files.
But when i do this, i got this error messages:

Thu Feb 16 08:06:11 2023 -> ClamAV update process started at Thu Feb 16 
08:06:11 2023
Thu Feb 16 08:06:11 2023 -> WARNING: Can't query current.cvd.clamav.net
Thu Feb 16 08:06:11 2023 -> WARNING: Invalid DNS reply. Falling back to HTTP 
mode.
Thu Feb 16 08:06:11 2023 -> Trying to retrieve CVD header from 
https://database.clamav.net/daily.cvd
Thu Feb 16 08:06:11 2023 -> WARNING: remote_cvdhead: Download failed (6) Thu Feb 
16 08:06:11 2023 -> WARNING:  Message: Couldn't resolve host name
Thu Feb 16 08:06:11 2023 -> WARNING: Failed to get daily database version 
information from server: https://database.clamav.net
Thu Feb 16 08:06:11 2023 -> ERROR: check_for_new_database_version: Failed to 
find daily database using server https://database.clamav.net.
Thu Feb 16 08:06:11 2023 -> Trying again in 5 secs...
Thu Feb 16 08:06:16 2023 -> Trying to retrieve CVD header from 
https://database.clamav.net/daily.cvd
Thu Feb 16 08:06:16 2023 -> WARNING: remote_cvdhead: Download failed (6) Thu Feb 
16 08:06:16 2023 -> WARNING:  Message: Couldn't resolve host name
Thu Feb 16 08:06:16 2023 -> WARNING: Failed to get daily database version 
information from server: https://database.clamav.net
Thu Feb 16 08:06:16 2023 -> ERROR: check_for_new_database_version: Failed to 
find daily database using server https://database.clamav.net.
this looks like the DNS lookups are not vailable, no matter what your check
says.

Thu Feb 16 08:06:16 2023 -> Trying again in 5 secs...
Thu Feb 16 08:06:21 2023 -> Trying to retrieve CVD header from 
https://database.clamav.net/daily.cvd
Thu Feb 16 08:06:21 2023 -> OK
Thu Feb 16 08:06:21 2023 -> daily database available for download (remote 
version: 26813)
Thu Feb 16 08:06:30 2023 -> Testing database: 
'/var/lib/clamav/tmp.a828aef201/clamav-83875921b32bc900edab2d0ee431fcad.tmp-daily.cvd'
 ...
Thu Feb 16 08:06:37 2023 -> Database test passed.
Thu Feb 16 08:06:37 2023 -> daily.cvd updated (version: 26813, sigs: 2020949, 
f-level: 90, builder: raynman)
Thu Feb 16 08:06:37 2023 -> Trying to retrieve CVD header from 
https://database.clamav.net/main.cvd
Thu Feb 16 08:06:37 2023 -> OK
Thu Feb 16 08:06:37 2023 -> main database available for download (remote 
version: 62)
Thu Feb 16 08:07:04 2023 -> Testing database: 
'/var/lib/clamav/tmp.a828aef201/clamav-35347411896e0523e7b74f2c91338b97.tmp-main.cvd'
 ...
Thu Feb 16 08:07:10 2023 -> Database test passed.
Thu Feb 16 08:07:10 2023 -> main.cvd updated (version: 62, sigs: 6647427, 
f-level: 90, builder: sigmgr)
Thu Feb 16 08:07:10 2023 -> Trying to retrieve CVD header from 
https://database.clamav.net/bytecode.cvd
Thu Feb 16 08:07:10 2023 -> OK
Thu Feb 16 08:07:10 2023 -> bytecode database available for download (remote 
version: 333)
Thu Feb 16 08:07:11 2023 -> Testing database: 
'/var/lib/clamav/tmp.a828aef201/clamav-2f58bc478b2afd84ba98c4d288a63ac1.tmp-bytecode.cvd'
 ...
Thu Feb 16 08:07:11 2023 -> Database test passed.
Thu Feb 16 08:07:11 2023 -> bytecode.cvd updated (version: 333, sigs: 92, 
f-level: 63, builder: awillia2)
Thu Feb 16 09:46:56 2023 -> --------------------------------------
there seems to be no issue further.

Is there another way to solve the issue?
Current i have set an sleep 60 to work arround.
do you use clamav that comes with ubuntu?

try running:

% ls -ld /etc/systemd/system/multi-user.target.wants/clamav-freshclam.service 
/lib/systemd/system/clamav-freshclam.service
lrwxrwxrwx 1 root root  44 Jun 23  2018 
/etc/systemd/system/multi-user.target.wants/clamav-freshclam.service -> 
/lib/systemd/system/clamav-freshclam.service
-rw-r--r-- 1 root root 412 Aug 21 21:28 
/lib/systemd/system/clamav-freshclam.service

the clamav-freshclam.service should contain the line
"After=network-online.target"



This is the first act of my script before I try to download signatures:

         if [ "$(host -W 60 -t TXT "current.cvd.clamav.net")" != "" ]; then

             # standardwert fuer libs update std - 2
             LIBS_UPD_STD="2"

             # standardwert fuer libs uli std - 5
             LIBS_ULI_STD="5"

             # update anstossen - 1 oder 0
             START_FRESHCLAM="1"

             # setze wert fuer netzwerkverbindung - 0 nicht vorhanden, 1 
vorhanden
             NETZWERK_VORHANDEN="1"

         # falls nicht innerhalb von xx sekunden der descriptive txt geholt 
werden kann
         elif [ "$(host -W 60 -t TXT "current.cvd.clamav.net")" = "" ]; then

             # standardwert fuer libs update std - 2
             LIBS_UPD_STD="2"

             # standardwert fuer libs uli std - 5
             LIBS_ULI_STD="5"

             # update anstossen - 1 oder 0
             START_FRESHCLAM="0"

             # setze wert fuer netzwerkverbindung - 0 nicht vorhanden, 1 
vorhanden
             NETZWERK_VORHANDEN="0"

         fi
and only when "$NETZWERK_VORHANDEN" -eq "1" (NETZWERK_VORHANDEN is german = 
NETWORK_AVAILABLE) I start update (what is this time), but it seems that clamav CDN have a problem 
in case.
But why?
My code checks if dns from current.cvd.clamav.net  is available and starts, but 
freshclam says can't resolve host name.

kind regards
Marc
_______________________________________________

Manage your clamav-users mailing list subscription / unsubscribe:
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/Cisco-Talos/clamav-documentation

https://docs.clamav.net/#mailing-lists-and-chat

_______________________________________________

Manage your clamav-users mailing list subscription / unsubscribe:
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/Cisco-Talos/clamav-documentation

https://docs.clamav.net/#mailing-lists-and-chat

Reply via email to