Page 1 of 3

[Antivirus] Failed to update virus definitions

Posted: Tue Jan 14, 2020 6:51 pm
by davidc1023
Hi All,

I've been getting the error below since early December 2019.

"[Antivirus] Failed to update virus definitions. No storage volume detected. Create a new volume"

I've done some research and come across a few articles saying creating a new storage volume will fix the issue (doesn't fix it for all users apparently). We're not able to do this as our current storage pool takes up the entire drive(s) capacity. I've also pulled the latest definitions of the ClaimAV Virus Database and tried to putting the .cvd file in to manually update however I'm getting an incorrect format error.

I'm not sure what else to do other than trying to find another third-party AV from the app store.

Any input is greatly appreciated.

Re: [Antivirus] Failed to update virus definitions

Posted: Tue Jan 14, 2020 7:59 pm
by Toxic17
hope its not this..

viewtopic.php?f=50&t=146352

if it is your NAS maybe infected.

do you have upto date firmware installed on your unkown nas?

do you have the latest Malware Remover installed and have scanned your system?

also add Security Counsellor app to harden your NAS.

also use the search feature and search for the phrase.

viewtopic.php?t=143527

failing this raise a ticket with QNAP. let them fix it.

Re: [Antivirus] Failed to update virus definitions

Posted: Thu Jan 23, 2020 12:31 pm
by vel0x
Had the same issue.
Somehow my default system volume was not set in the config.
Using SSH:

Code: Select all

[/etc/config] # getcfg SHARE_DEF defVolMP -f /etc/config/def_share.info

Fixed it using (you may need to adjust this if you use a different volume as your system volume):

Code: Select all

[/etc/config] # setcfg SHARE_DEF defVolMP -f /etc/config/def_share.info /share/CACHEDEV1_DATA
After that it looked like this:

Code: Select all

[/etc/config] # getcfg SHARE_DEF defVolMP -f /etc/config/def_share.info                      
/share/CACHEDEV1_DATA
And the updates started working again after this.

Re: [Antivirus] Failed to update virus definitions

Posted: Wed Jan 29, 2020 10:41 pm
by TMadmin
Thank you for that vel0x, that did it for me! ;-)

Curious though as to where/how you found this solution?

Thanks again,

Michel

Re: [Antivirus] Failed to update virus definitions

Posted: Mon Feb 03, 2020 8:41 am
by AlFromCochrane
Kudos to Vel0x!

Worked for me too! I just had to reboot my system after resetting the system volume as per Vel0x's instructions (so Clamav could see the new setting I suppose)
thanks so much. cheers

For what it's worth, I believe a power outage was the root cause for my system losing it's system volume setting.

Re: [Antivirus] Failed to update virus definitions

Posted: Sun Apr 12, 2020 1:36 am
by salvsalvo
Hi guys, sorry if I bother you after so long.
I have the same problem so I'm trying the solution posted by vel0x but it doesn't work for me.

I'm not an expert user so I post my screen, please can you check where I'm doing wrong?
Schermata 2020-04-11 alle 19.34.30.png
I also rebooted the NAS.

many thanks
S.

Re: [Antivirus] Failed to update virus definitions

Posted: Wed Apr 15, 2020 10:43 am
by robtihanyi
salvsalvo wrote: Sun Apr 12, 2020 1:36 am I have the same problem so I'm trying the solution posted by vel0x but it doesn't work for me.
I had to disable and re-enable my antivirus for it to work. Make sure you go to the Antivirus tab in the control panel, and apply the changes when you disable it. And then re-enable and apply again. It should start the update straight away.

Re: [Antivirus] Failed to update virus definitions

Posted: Sun Apr 19, 2020 6:11 pm
by Oceloman
Thank you for the solution vel0x, worked for me !

Re: [Antivirus] Failed to update virus definitions

Posted: Thu Apr 23, 2020 5:32 am
by jb5ep
Thanks @vel0x! That worked for me also.

McAfee wasn't updating. All sorted after (didn't need to restart anything).

Re: [Antivirus] Failed to update virus definitions

Posted: Sun May 17, 2020 7:13 am
by scottdavidcarter
Nice fix! I had the same problem here and was getting a warning that my definition update failed as well as storage volume not detected. I traced this back to a power failure, too. Using Putty to reset the default system volume and doing a restart and it's working again! Slowly I am getting the hang of keeping this system working.

""Severity Level Date Time Users Source IP Application Category Content
Warning 2020/05/16 12:04:41 System 127.0.0.1 Antivirus Settings [Antivirus] Failed to update virus definitions. No storage volume detected. Create a new volume.""

Thanks,
Scott
vel0x wrote: Thu Jan 23, 2020 12:31 pm Had the same issue.
Somehow my default system volume was not set in the config.
Using SSH:

Code: Select all

[/etc/config] # getcfg SHARE_DEF defVolMP -f /etc/config/def_share.info

Fixed it using (you may need to adjust this if you use a different volume as your system volume):

Code: Select all

[/etc/config] # setcfg SHARE_DEF defVolMP -f /etc/config/def_share.info /share/CACHEDEV1_DATA
After that it looked like this:

Code: Select all

[/etc/config] # getcfg SHARE_DEF defVolMP -f /etc/config/def_share.info                      
/share/CACHEDEV1_DATA
And the updates started working again after this.

Re: [Antivirus] Failed to update virus definitions

Posted: Thu May 28, 2020 7:50 pm
by eTeukros
It worked for me as well, straight away.

Thank you very much for your post.

Re: [Antivirus] Failed to update virus definitions

Posted: Mon Jun 01, 2020 2:09 am
by trevorklat
Thanks vel0x! This code worked for me. I would be interested in how you came to know to do this.

Re: [Antivirus] Failed to update virus definitions

Posted: Mon Jun 01, 2020 3:38 pm
by ken05
Hi
I tried those commands but nothing happened.
I was using putty.
also there is no etc/config directory's on my NAS ??
can you please provide a step by step instruction for me

Re: [Antivirus] Failed to update virus definitions

Posted: Sat Jun 13, 2020 11:28 pm
by Briain
Hi Folks

For the past few days, I've been getting these failure warnings (and when I finally looked at it today, the QTS AV section showed that the last successful update had been achieved on the 6th June). I've just checked a number of previously discussed update failure issues (in this forum and including the above suggestion about the share) but everything looked just fine on my own Qnap. One of the threads showed how to run the Qnap process via the CLI, which I tried

Code: Select all

/bin/sh -xxxx /etc/init.d/antivirus.sh update_db

A few lines from the end was the dreaded 'Failed to update virus definitions' line, so that confirmed there was a problem (but not why it had happened).

The fix (which is the work of others - and who are both credited in the below text - was very easy to implement):

I then spotted a thread ended with tsberry561's suggestion to look at the clamav blog (viewtopic.php?f=345&t=154436&p=755872#p754143) and I noted that under 0.102.2, one of the issues that had been addressed (several months ago) was: 'Fixed an issue where freshclam failed to update if the database version downloaded is one version older than advertised' so that sounded rather promising.

Further back in that same thread (on May 25th) is a post by usefulvid (viewtopic.php?f=345&t=154436#p753626) explaining how he'd manually deleted the three files (daily.cvd, main.cvd and bytecode.cvd) then he'd used wget to download current versions and then he manually ran the CLI update command (freshclam -u admin). I followed his techniques and the process all ran smoothly, then when done, looking back at the QTS AV section showed the definitions as being dated today. :) The status still showed the previous attempt failure message (which is not surprising as I hadn't run the Qnap script to procure and install the update files) so to test whether it really was now fixed, via the QTS AV section I disabled then re-enabled the AV (which triggers it into checking for an update) and the status immediately changed to 'update complete'.

As the change was so fast (and with no 'checking' feedback) I wondered whether it had actually done anything, so I then tried hitting the 'update now' button and it all loked good (there was feedback via the QTS interface to show it was checking the repository) but just to be 100% super-sure that all was good, I then tried running the CLI variant of the Qnap update procedure (/bin/sh -xxxx /etc/init.d/antivirus.sh update_db ) and this time it contained the below success message (a few lines from the end) so I can confirm that everything now appears to be working just as it should.

Code: Select all

+ dbgprintf '    /sbin/setcfg Antivirus AntivirusStatus 4 -f /etc/config/antivirus.global (4:UpdateComplete)'
Others are due all the credit for the fixes, but I thought it could be useful (to others searching the forum for a fix) to pull it into a single post and add it to this thread as that other thread lists several other potential problems (and these were posted after the post by usefulvid).

Kind regards,
Briain

Re: [Antivirus] Failed to update virus definitions

Posted: Mon Jun 15, 2020 9:54 pm
by Briain
Interestingly, the automatic update failed again both yesterday and today, so I just tried the 'Update now' button and that failed too. Odd; it was all working after I'd performed the other tricks, so I'll just give up for now (I don't run AV on my Debian machines and the Windows machine doesn't have access to my Qnaps, so I'm not that bothered about it).
Briain