Koozali.org: home of the SME Server

freshclam: Update failed

Offline chris burnat

  • ****
  • 1,135
  • +2/-0
    • http://www.burnat.com
freshclam: Update failed
« on: February 23, 2013, 05:29:00 AM »
In recent days, users may have received notification emails about freshclam failing to update, example:

Quote
-------- Original Message --------
Subject:    freshclam: Update failed
Date:    22 Feb 2013 11:15:35 -0000
From:    anonymous@2000fm.com
To:    admin@2000fm.com


2013-02-22 22:12:02.818832500 ClamAV update process started at Fri Feb 22 22:12:02 2013
2013-02-22 22:12:02.819310500 main.cld is up to date (version: 54, sigs: 1044387, f-level: 60, builder: sven)
2013-02-22 22:12:34.144912500 nonblock_connect: connect timing out (30 secs)
2013-02-22 22:12:34.144966500 Can't connect to port 80 of host database.clamav.net (IP: 116.240.207.20)
2013-02-22 22:12:34.144986500 WARNING: getpatch: Can't download daily-16682.cdiff from database.clamav.net
2013-02-22 22:13:04.691605500 nonblock_connect: connect timing out (30 secs)
[snip]
2013-02-22 22:15:35.334297500 Can't connect to port 80 of host database.clamav.net (IP: 116.240.207.20)
2013-02-22 22:15:35.334317500 ERROR: Can't download daily.cvd from database.clamav.net
2013-02-22 22:15:35.334512500 Giving up on database.clamav.net...
2013-02-22 22:15:35.334536500 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.
[Note: the warnings above may differ depending of the status of your server,  this problem is not fixed by updating to latest clamav package]

This issue is the subject of a ticket in Bugzilla: http://bugs.contribs.org/show_bug.cgi?id=7353
The Devs are working towards a resolution, in the meantime, temporary workarounds are provided, i.e. comment #45
Please follow up in the Tracker.
« Last Edit: February 23, 2013, 05:33:44 AM by chris burnat »
- chris
If it does not work out of the box, please fill in a Bug Report @ Bugzilla (http://bugs.contribs.org)  - check: http://wiki.contribs.org/Bugzilla_Help .  Thanks.

Offline robwellesley

  • *
  • 92
  • +0/-0
Re: freshclam: Update failed
« Reply #1 on: February 26, 2013, 12:38:59 AM »
Simplified temp fix based on comment 45

I've put this here for folks who will struggle to pull the 'fix' from the bug commentary.

Assumes you are fully patched.

We noted that unless we removed all files from /var/clamav we got a mixture of .cld and .cvd files in the next update.  Remove all the files and freshclam downloads a full set with .cvd extensions.  we then no longer get a recurrence.

# tail /var/log/freshclam/current  --  to make sure the server has this problem

# sv d /service/freshclam
# sv d /service/clamd

remove EVERYTHING from /var/clamav

# sv u /service/freshclam
# sv u /service/clamd

#  freshclam -v


Rob

« Last Edit: February 26, 2013, 12:48:07 AM by robwellesley »

Offline chris burnat

  • ****
  • 1,135
  • +2/-0
    • http://www.burnat.com
Re: freshclam: Update failed
« Reply #2 on: January 14, 2014, 01:22:13 AM »
As a result of bug #8107 and bug #8108,  a script to refresh clamav will soon be included in your SME Server , please check:
http://wiki.contribs.org/Clamav:freshclam_update#Freshclam_update

« Last Edit: January 14, 2014, 01:25:00 AM by chris burnat »
- chris
If it does not work out of the box, please fill in a Bug Report @ Bugzilla (http://bugs.contribs.org)  - check: http://wiki.contribs.org/Bugzilla_Help .  Thanks.