[Antivirus] Failed to update virus definitions. Update definitions manually, or try again later.

Q'center app, Helpdesk app
Post Reply
User avatar
usefulvid
Starting out
Posts: 33
Joined: Thu Oct 11, 2018 5:00 pm

[Antivirus] Failed to update virus definitions. Update definitions manually, or try again later.

Post by usefulvid »

This message appears on TS-231P and TS-431+
Firmware is kept up to date!
This fix did not help out:
viewtopic.php?f=345&t=152727#p741022

I used the verbose option for freshclam:

Code: Select all

--------------------------------------
Current working dir is /share/CE_CACHEDEV1_DATA/.antivirus/usr/share/clamav
ClamAV update process started at Mon Apr 20 13:47:19 2020
Using IPv6 aware code
Max retries == 2
Querying current.cvd.clamav.net
TTL: 1759
Software version from DNS: 0.102.2
WARNING: Your ClamAV installation is OUTDATED!
WARNING: Local version: 0.101.2 Recommended version: 0.102.2
DON'T PANIC! Read https://www.clamav.net/documents/upgrading-clamav
Retrieving http://database.clamav.net/main.cvd
Trying to download http://database.clamav.net/main.cvd (IP: 104.16.219.84)
nonblock_recv: recv timing out (30 secs)
WARNING: getfile: Download interrupted: Operation now in progress (IP: 104.16.219.84)
WARNING: Can't download main.cvd from database.clamav.net
Querying main.0.102.0.0.6810DB54.ping.clamav.net
Can't query main.0.102.0.0.6810DB54.ping.clamav.net
Trying again in 5 secs...
Querying current.cvd.clamav.net
TTL: 879
Software version from DNS: 0.102.2
WARNING: Your ClamAV installation is OUTDATED!
WARNING: Local version: 0.101.2 Recommended version: 0.102.2
DON'T PANIC! Read https://www.clamav.net/documents/upgrading-clamav
Retrieving http://database.clamav.net/main.cvd
Trying to download http://database.clamav.net/main.cvd (IP: 104.16.218.84)
nonblock_recv: recv timing out (30 secs)
ERROR: getfile: Download interrupted: Operation now in progress (IP: 104.16.218.84)
ERROR: Can't download main.cvd from database.clamav.net
Querying main.0.102.0.0.6810DA54.ping.clamav.net
Can't query main.0.102.0.0.6810DA54.ping.clamav.net
Giving up on database.clamav.net...
Update failed. Your network may be down or none of the mirrors listed in /etc/config/freshclam.conf is working. Check https://www.clamav.net/documents/official-mirror-faq for possible reasons.
--------------------------------------
Current working dir is /share/CE_CACHEDEV1_DATA/.antivirus/usr/share/clamav
ClamAV update process started at Mon Apr 20 13:48:49 2020
Using IPv6 aware code
Max retries == 2
Querying current.cvd.clamav.net
TTL: 830
Software version from DNS: 0.102.2
WARNING: Your ClamAV installation is OUTDATED!
WARNING: Local version: 0.101.2 Recommended version: 0.102.2
DON'T PANIC! Read https://www.clamav.net/documents/upgrading-clamav
Retrieving http://database.clamav.net/main.cvd
Ignoring mirror 104.16.218.84 (due to previous errors)
Trying to download http://database.clamav.net/main.cvd (IP: 104.16.219.84)
nonblock_recv: recv timing out (30 secs)
WARNING: getfile: Download interrupted: Operation now in progress (IP: 104.16.219.84)
WARNING: Can't download main.cvd from database.clamav.net
Querying main.0.102.0.0.6810DB54.ping.clamav.net
Can't query main.0.102.0.0.6810DB54.ping.clamav.net
Trying again in 5 secs...
Querying current.cvd.clamav.net
TTL: 792
Software version from DNS: 0.102.2
WARNING: Your ClamAV installation is OUTDATED!
WARNING: Local version: 0.101.2 Recommended version: 0.102.2
DON'T PANIC! Read https://www.clamav.net/documents/upgrading-clamav
Retrieving http://database.clamav.net/main.cvd
Trying to download http://database.clamav.net/main.cvd (IP: 104.16.219.84)
nonblock_recv: recv timing out (30 secs)
ERROR: getfile: Download interrupted: Operation now in progress (IP: 104.16.219.84)
ERROR: Can't download main.cvd from database.clamav.net
Querying main.0.102.0.0.6810DB54.ping.clamav.net
Can't query main.0.102.0.0.6810DB54.ping.clamav.net
Giving up on database.clamav.net...
Update failed. Your network may be down or none of the mirrors listed in /etc/config/freshclam.conf is working. Check https://www.clamav.net/documents/official-mirror-faq for possible reasons.
This sounds weired:
Can't query main.0.102.0.0.6810DB54.ping.clamav.net

Download seems to work of main.cvd, I can see the begin of the download in iftop and in terminal download goes to 99%
Hosts file and resolve.conf are clean, no virus infection.

DNS looks fine for me:

Code: Select all

 host -t txt current.cvd.clamav.net
current.cvd.clamav.net descriptive text "0.102.2:59:25788:1587392941:1:63:49191:331"
[~] # host database.clamav.net
database.clamav.net is an alias for database.clamav.net.cdn.cloudflare.net.
database.clamav.net.cdn.cloudflare.net has address 104.16.219.84
database.clamav.net.cdn.cloudflare.net has address 104.16.218.84
database.clamav.net.cdn.cloudflare.net has IPv6 address 2606:4700::6810:da54
database.clamav.net.cdn.cloudflare.net has IPv6 address 2606:4700::6810:db54
wget works:

Code: Select all

 wget database.clamav.net/main.cvd
--2020-04-20 17:14:26--  http://database.clamav.net/main.cvd
Resolving database.clamav.net (database.clamav.net)... 2606:4700::6810:da54, 2606:4700::6810:db54, 104.16.219.84, ...
Connecting to database.clamav.net (database.clamav.net)|2606:4700::6810:da54|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 117859675 (112M) [application/octet-stream]
Saving to: ‘main.cvd’

main.cvd                             100%[====================================================================>] 112.40M  67.9MB/s    in 1.7s

2020-04-20 17:14:30 (67.9 MB/s) - ‘main.cvd’ saved [117859675/117859675]
ours.gris
New here
Posts: 4
Joined: Mon May 25, 2020 7:27 pm

Re: [Antivirus] Failed to update virus definitions. Update definitions manually, or try again later.

Post by ours.gris »

I have the same problem here on my TS-231P. I cannot trace back to the origin of the problem (5 days ago) and I can't be sure that this is linked to a firmware update.
In addition, I cannot neither manually update the antivirus: whenever I try to upload the .cvd files, I get the message "Incorrect file format".
User avatar
usefulvid
Starting out
Posts: 33
Joined: Thu Oct 11, 2018 5:00 pm

Re: [Antivirus] Failed to update virus definitions. Update definitions manually, or try again later.

Post by usefulvid »

Manual update worked for me.
Can you open up a ticket at qnap?
ours.gris
New here
Posts: 4
Joined: Mon May 25, 2020 7:27 pm

Re: [Antivirus] Failed to update virus definitions. Update definitions manually, or try again later.

Post by ours.gris »

I just did. Will keep you informed if I get some answers.
User avatar
usefulvid
Starting out
Posts: 33
Joined: Thu Oct 11, 2018 5:00 pm

Re: [Antivirus] Failed to update virus definitions. Update definitions manually, or try again later.

Post by usefulvid »

A workaround for my NAS is this:

Code: Select all

VOLUME=`/sbin/getcfg Public path -f /etc/config/smb.conf | cut -d '/' -f 3`
cd /share/$VOLUME/.antivirus/usr/share/clamav/
rm *.cvd
rm *.cld
wget http://database.clamav.net/daily.cvd
wget http://database.clamav.net/main.cvd
wget http://database.clamav.net/bytecode.cvd
freshclam -u admin
pindio

Re: [Antivirus] Failed to update virus definitions. Update definitions manually, or try again later.

Post by pindio »

ours.gris wrote: Mon May 25, 2020 7:35 pm I have the same problem here on my TS-231P. I cannot trace back to the origin of the problem (5 days ago) and I can't be sure that this is linked to a firmware update.
In addition, I cannot neither manually update the antivirus: whenever I try to upload the .cvd files, I get the message "Incorrect file format".
+1
ours.gris
New here
Posts: 4
Joined: Mon May 25, 2020 7:27 pm

Re: [Antivirus] Failed to update virus definitions. Update definitions manually, or try again later.

Post by ours.gris »

usefulvid wrote: Mon May 25, 2020 9:05 pm A workaround for my NAS is this:

Code: Select all

VOLUME=`/sbin/getcfg Public path -f /etc/config/smb.conf | cut -d '/' -f 3`
cd /share/$VOLUME/.antivirus/usr/share/clamav/
rm *.cvd
rm *.cld
wget http://database.clamav.net/daily.cvd
wget http://database.clamav.net/main.cvd
wget http://database.clamav.net/bytecode.cvd
freshclam -u admin
I think I've found where the problem come from: when I want to run freshclam I get this error:
freshclam: error while loading shared libraries: libclamav.so.9: cannot open shared object file: No such file or directory
But Clam being integrated in QTS I do not know how/if I can repare/reinstall it.
User avatar
usefulvid
Starting out
Posts: 33
Joined: Thu Oct 11, 2018 5:00 pm

Re: [Antivirus] Failed to update virus definitions. Update definitions manually, or try again later.

Post by usefulvid »

Yes I have the same issue but this is new after Firmware update :)
Before it was an other problem.
You can't reinstall it.
ours.gris
New here
Posts: 4
Joined: Mon May 25, 2020 7:27 pm

Re: [Antivirus] Failed to update virus definitions. Update definitions manually, or try again later.

Post by ours.gris »

I solved this problem, thanks to this 6 years old post viewtopic.php?t=95649 ! :DD

Here is the answer that helped me:
ccc wrote: Tue Nov 25, 2014 1:09 am Hi

I solved this problem now.
These symlinks should be created manually over putty:

Code: Select all


# ln -s /share/CACHEDEV2_DATA/.antivirus/usr/share/clamav/ /usr/share/clamav
# ln -s /share/CACHEDEV2_DATA/.antivirus/usr/lib/libclamav.so.6.1.13 /usr/lib/libclamav.so.6.1.13
# ln -s /usr/lib/libclamav.so.6.1.13 /usr/lib/libclamav.so.6
# ln -s /usr/lib/libclamav.so.6.1.13 /usr/lib/libclamav.so
# ldconfig
# freshclam -u admin
ClamAV update process started at Mon Nov 24 17:56:44 2014
WARNING: Your ClamAV installation is OUTDATED!
WARNING: Local version: 0.97.4 Recommended version: 0.98.5
DON'T PANIC! Read http://www.clamav.net/support/faq
main.cvd is up to date (version: 55, sigs: 2424225, f-level: 60, builder: neo)
Downloading daily-19675.cdiff [100%]
daily.cld updated (version: 19675, sigs: 1272598, f-level: 63, builder: shurley)
bytecode.cld is up to date (version: 242, sigs: 46, f-level: 63, builder: dgoddard)
Database updated (3696869 signatures) from db.local.clamav.net (IP: 193.230.240.8)
Why this happens is still unclear and according to many postings on the internet I'm not alone with this problem.
So I changed what I had to (file version and directory) and I made new symlinks over Putty:

Code: Select all

# ln -s /share/CACHEDEV1_DATA/.antivirus/usr/share/clamav/ /usr/share/clamav
# ln -s /share/CACHEDEV1_DATA/.antivirus/usr/lib/libclamav.so.9.0.2 /usr/lib/libclamav.so.9.0.2
# ln -s /usr/lib/libclamav.so.9.0.2 /usr/lib/libclamav.so.9
# ln -s /usr/lib/libclamav.so.9.0.2 /usr/lib/libclamav.so
# ldconfig
# freshclam -u admin
But then I had to do the same with an other library: :roll:
[/usr/lib] # freshclam -u admin
freshclam: error while loading shared libraries: libclammspack.so.0: cannot open shared object file: No such file or directory
So I've done the same with libclammspack:

Code: Select all

# ln -s /share/CACHEDEV1_DATA/.antivirus/usr/share/clamav/ /usr/share/clamav
# ln -s /share/CACHEDEV1_DATA/.antivirus/usr/lib/libclammspack.so.0.1.0 /usr/lib/libclammspack.so.0.1.0
# ln -s /usr/lib/libclammspack.so.0.1.0 /usr/lib/libclammspack.so.0
# ln -s /usr/lib/libclammspack.so.0.1.0 /usr/lib/libclammspack.so
# ldconfig
# freshclam -u admin
And now everything is working fine, update is also functionnal from the Control Pannel. 8)
User avatar
usefulvid
Starting out
Posts: 33
Joined: Thu Oct 11, 2018 5:00 pm

Re: [Antivirus] Failed to update virus definitions. Update definitions manually, or try again later.

Post by usefulvid »

Thanks for sharing
What a ** especially regarding the security issues from the past months.
My ticket is now open since a month.
tsberry561
New here
Posts: 8
Joined: Thu May 16, 2019 12:10 pm

Re: [Antivirus] Failed to update virus definitions. Update definitions manually, or try again later.

Post by tsberry561 »

(This information is current as of May 26, 2020)


I suspect that the programmers for the latest QTS forgot to update the library symbolic links in their latest firmware on my device (TS-131K). You can do so easily via terminal (SSH). Locate your library files in your device. In my case, the directory was:
/share/CACHEDEV1_DATA/.antivirus/usr/lib

Since the symbolic links need to be fixed:
Just run the following SSH command:
"ldconfig /share/CACHEDEV1_DATA/.antivirus/usr/lib" (Or whatever directory your clamav libraries are located)

Here is the output of a "ls -l" command on a TS-131K AFTER running the command:
[/share/CACHEDEV1_DATA/.antivirus/usr/lib] # ls -l
lrwxrwxrwx 1 admin administ 18 May 26 07:28 libclamav.so -> libclamav.so.9.0.2*
lrwxrwxrwx 1 admin administ 18 May 26 07:28 libclamav.so.9 -> libclamav.so.9.0.2*
-rwxr-xr-x 1 admin administ 3707540 May 19 00:10 libclamav.so.9.0.2*
lrwxrwxrwx 1 admin administ 22 May 26 07:28 libclammspack.so -> libclammspack.so.0.1.0 *
lrwxrwxrwx 1 admin administ 22 May 26 07:28 libclammspack.so.0 -> libclammspack.so.0.1 .0*
-rwxr-xr-x 1 admin administ 64980 May 19 00:10 libclammspack.so.0.1.0*
lrwxrwxrwx 1 admin administ 21 May 26 07:28 libclamunrar.so -> libclamunrar.so.9.0.2*
lrwxrwxrwx 1 admin administ 21 May 26 07:28 libclamunrar.so.9 -> libclamunrar.so.9.0.2 *
-rwxr-xr-x 1 admin administ 143764 May 19 00:10 libclamunrar.so.9.0.2*
lrwxrwxrwx 1 admin administ 27 May 26 07:28 libclamunrar_iface.so -> libclamunrar_ifac e.so.9.0.2*
lrwxrwxrwx 1 admin administ 27 May 26 07:28 libclamunrar_iface.so.9 -> libclamunrar_if ace.so.9.0.2*
-rwxr-xr-x 1 admin administ 10116 May 19 00:10 libclamunrar_iface.so.9.0.2*
User avatar
usefulvid
Starting out
Posts: 33
Joined: Thu Oct 11, 2018 5:00 pm

Re: [Antivirus] Failed to update virus definitions. Update definitions manually, or try again later.

Post by usefulvid »

This worked and gave me back my previous error:

Code: Select all

WARNING: Your ClamAV installation is OUTDATED!
WARNING: Local version: 0.101.2 Recommended version: 0.102.3
DON'T PANIC! Read https://www.clamav.net/documents/upgrading-clamav
main.cvd is up to date (version: 59, sigs: 4564902, f-level: 60, builder: sigmgr)
WARNING: getpatch: Can't download daily-25824.cdiff from database.clamav.net
ERROR: getpatch: Can't download daily-25824.cdiff from database.clamav.net
WARNING: Incremental update failed, trying to download daily.cvd
ERROR: Can't download daily.cvd from database.clamav.net
Giving up on database.clamav.net...
Update failed. Your network may be down or none of the mirrors listed in /etc/config/freshclam.conf is working. Check https://www.clamav.net/documents/official-mirror-faq for possible reasons.
tsberry561
New here
Posts: 8
Joined: Thu May 16, 2019 12:10 pm

Re: [Antivirus] Failed to update virus definitions. Update definitions manually, or try again later.

Post by tsberry561 »

usefulvid wrote: Wed May 27, 2020 2:56 pm This worked and gave me back my previous error:

Code: Select all

WARNING: Your ClamAV installation is OUTDATED!
WARNING: Local version: 0.101.2 Recommended version: 0.102.3
DON'T PANIC! Read https://www.clamav.net/documents/upgrading-clamav
main.cvd is up to date (version: 59, sigs: 4564902, f-level: 60, builder: sigmgr)
WARNING: getpatch: Can't download daily-25824.cdiff from database.clamav.net
ERROR: getpatch: Can't download daily-25824.cdiff from database.clamav.net
WARNING: Incremental update failed, trying to download daily.cvd
ERROR: Can't download daily.cvd from database.clamav.net
Giving up on database.clamav.net...
Update failed. Your network may be down or none of the mirrors listed in /etc/config/freshclam.conf is working. Check https://www.clamav.net/documents/official-mirror-faq for possible reasons.
[/quote

Glad it worked. Your new problem is not related to libraries, it's a communication problem. First try doing exactly what the error message says.
User avatar
usefulvid
Starting out
Posts: 33
Joined: Thu Oct 11, 2018 5:00 pm

Re: [Antivirus] Failed to update virus definitions. Update definitions manually, or try again later.

Post by usefulvid »

Please check my start post.
asbath
Starting out
Posts: 13
Joined: Thu May 28, 2020 3:37 am

Re: [Antivirus] Failed to update virus definitions. Update definitions manually, or try again later.

Post by asbath »

Came here to (register) and say thanks, your note about the symlinks fixed my problem. Running freshclam will take a few beats while it updates the definitions.
Post Reply

Return to “NAS Management”