Koozali.org: home of the SME Server

freshclam: Update failed (Again)

Offline jumba

  • ****
  • 291
  • +0/-0
  • Donations: July 2007 - $ 20.00
    • Smeserver på svenska!
freshclam: Update failed (Again)
« on: February 17, 2013, 03:24:06 PM »
The last couple of days, I've hourly received error mails from every SME Server version 7.6 (fully updated) I maintain.

Code: [Select]
2013-02-17 15:16:47.448401500 ClamAV update process started at Sun Feb 17 15:16:47 20132013-02-17 15:16:47.449129500 main.cvd is up to date (version: 54, sigs: 1044387, f-level: 60, builder: sven) 2013-02-17 15:16:48.593586500 WARNING: getpatch: Can't download daily-16682.cdiff from database.clamav.net 2013-02-17 15:16:48.594133500 WARNING: getpatch: Can't download daily-16682.cdiff from database.clamav.net 2013-02-17 15:16:48.594627500 WARNING: getpatch: Can't download daily-16682.cdiff from database.clamav.net 2013-02-17 15:16:48.595118500 WARNING: getpatch: Can't download daily-16682.cdiff from database.clamav.net 2013-02-17 15:16:48.595625500 WARNING: getpatch: Can't download daily-16682.cdiff from database.clamav.net 2013-02-17 15:16:48.596258500 ERROR: getpatch: Can't download daily-16682.cdiff from database.clamav.net 2013-02-17 15:16:48.622605500 WARNING: Incremental update failed, trying to download daily.cvd 2013-02-17 15:16:48.623215500 ERROR: Can't download daily.cvd from database.clamav.net 2013-02-17 15:16:48.623357500 Giving up on database.clamav.net... 2013-02-17 15:16:48.623378500 Update failed. Your network may be down or none of the mirrors listed in /etc/freshclam.conf is working. Check http://www.clamav.net/support/mirror-problem for possible reasons.



Trying to do a manual freshclam results in lines like


Code: [Select]
[root@server cron.daily]# freshclam
ClamAV update process started at Sun Feb 17 15:15:52 2013
main.cvd is up to date (version: 54, sigs: 1044387, f-level: 60, builder: sven)
WARNING: getpatch: Can't download daily-16682.cdiff from db.local.clamav.net
WARNING: getpatch: Can't download daily-16682.cdiff from db.local.clamav.net
WARNING: getpatch: Can't download daily-16682.cdiff from db.local.clamav.net
WARNING: getpatch: Can't download daily-16682.cdiff from db.local.clamav.net
WARNING: getpatch: Can't download daily-16682.cdiff from db.local.clamav.net
WARNING: getpatch: Can't download daily-16682.cdiff from db.local.clamav.net
WARNING: Incremental update failed, trying to download daily.cvd
WARNING: Can't download daily.cvd from db.local.clamav.net
Trying again in 5 secs...

[size=78%]No available yum updates, please what's wrong?[/size]

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: freshclam: Update failed (Again)
« Reply #1 on: February 17, 2013, 05:02:40 PM »
please what's wrong?

you forgot to search the forums and the FAQ before writing your post.

Offline jumba

  • ****
  • 291
  • +0/-0
  • Donations: July 2007 - $ 20.00
    • Smeserver på svenska!
Re: freshclam: Update failed (Again)
« Reply #2 on: February 17, 2013, 05:27:01 PM »
What kind of reply is that?

Actually, I DID search the forums, even the bug tracker, and I even tried to follow some advice from the bug tracker, but since every hit I got was several years old, I thought it wasn't relevant for this which started 2013.


But never mind, don't bother.....


Offline johnp

  • ****
  • 312
  • +0/-0
Re: freshclam: Update failed (Again)
« Reply #4 on: February 17, 2013, 08:20:11 PM »
FWIW, I followed Charlie's method and stopped freshclam, removed the file and restarted freshclam. It downloaded the new file, and I haven't seen anymore emails.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: freshclam: Update failed (Again)
« Reply #5 on: February 19, 2013, 02:44:16 AM »
FWIW, I followed Charlie's method and stopped freshclam, removed the file and restarted freshclam. It downloaded the new file, and I haven't seen anymore emails.

In future, please report all problems via the bug tracker (only).

Offline Philippe MARTY

  • *
  • 37
  • +0/-0
Re: freshclam: Update failed (Again)
« Reply #6 on: March 28, 2013, 09:18:57 PM »
The answer of Charlie is :
Quote
remove the file mirrors.dat  rm /var/clamav/mirrors.dat and run freshclam manually.
Might have to do this more than once.

Fast and easy :)
Keep smiling with the sun and singing with the birds
www.atelier51.com

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: freshclam: Update failed (Again)
« Reply #7 on: March 29, 2013, 03:25:29 AM »
The answer of Charlie is :

Really? I don't believe so. Can you please provide a URL where I did say that?

Offline robin_wangaz

  • *
  • 26
  • +0/-0
Re: freshclam: Update failed (Again)
« Reply #8 on: April 01, 2013, 02:45:10 AM »
Hi all
The following worked for me on two SME's Version 7.6 thanks to Graeme Fleming! I'm now running clamav-0.97.7/16935/Mon Apr 1 11:40:28 2013

I'm documenting an update process that has worked without fail everytime I've used it, regardless of Clam version & update status; it follows most of what the previous few posters have said with a few additions for completeness & clarity:

# Shutdown clam so clamd.socket file is removed
service clamd stop

# Navigate to clamav folder
cd /var/clamav

# Remove ALL files from folder to provide clean slate for update process
rm -f /var/clamav/* (you could skip the -f & confirm every file delete for safety)

# Current Clamav version is clamav-0.97.6

rpm -q clamav

clamav-0.97.6-1.el5.rf

# Update clamav to latest version if required
# Not downloading clamav-db
yum update clamav

# Restart clam
service clamd start

# Update sigs
freshclam -v (--no-dns can be used if just -v fails tho I haven't struck this issue)

Check output from freshclam to make sure update completes sucessfully.

Current working dir is /var/clamav
Max retries == 6
ClamAV update process started at Sun Feb 24 15:14:02 2013
Using IPv6 aware code
Querying current.cvd.clamav.net
TTL: 900
Software version from DNS: 0.97.6
main.cvd version from DNS: 54
main.cvd is up to date (version: 54, sigs: 1044387, f-level: 60, builder: sven)
daily.cvd version from DNS: 16731
daily.cld is up to date (version: 16731, sigs: 829102, f-level: 63, builder: guitar)
bytecode.cvd version from DNS: 214
bytecode.cvd is up to date (version: 214, sigs: 41, f-level: 63, builder: neo)

which showed as just 5 files in the /var/clamav folder:

-rw-r--r--  1 clamav clamav    60125 Feb 17 12:11 bytecode.cvd
srw-rw-rw-  1 clamav clamav        0 Feb 24 14:27 clamd.socket
-rw-r--r--  1 clamav clamav 52101120 Feb 24 11:46 daily.cld
-rw-r--r--  1 clamav clamav 30750647 Oct 11  2011 main.cvd
-rw-------  1 clamav clamav      104 Feb 24 14:46 mirrors.dat

Note:  if you are bandwidth poor or on slow connection then don't delete main.cvd

For completeness & to be absolutely sure signal-event post-update; signal-event reboot, then go through the logs post reboot to make sure everything started correctly.  This is not necessary for this procedure but doesn't hurt.

Offline Philippe MARTY

  • *
  • 37
  • +0/-0
Re: freshclam: Update failed (Again)
« Reply #9 on: April 02, 2013, 05:40:48 PM »
Really? I don't believe so. Can you please provide a URL where I did say that?

Here: http://bugs.contribs.org/show_bug.cgi?id=7353#c15
I just precised the directory. Is there a problem?  :sad:
Keep smiling with the sun and singing with the birds
www.atelier51.com

Offline purvis

  • ****
  • 567
  • +0/-0
Re: freshclam: Update failed (Again)
« Reply #10 on: April 03, 2013, 09:23:54 AM »
There is suppose to be a rework of the freshclam from clamav sometime in the future.
I believe ClamAV  knowS they have issues with freshclam from what i have read off the internet.