A typical slave update failure in our local mirror configuration.

The master hasn't pulled down the latest from the clamav infrastructure
yet. but will within the next hour.

Feb 25 15:16:09 host freshclam[2608]: Mirror XXX.XXX.XXX.XXX is not
synchronized.
Feb 25 15:16:09 host freshclam[2608]: Trying again in 5 secs...
Feb 25 15:16:14 host freshclam[2608]: Can't download daily.cvd from
clamav.local.example.com
Feb 25 15:16:14 host freshclam[2608]: Trying again in 5 secs...
Feb 25 15:16:19 host freshclam[2608]: Mirror XXX.XXX.XXX.XXX is not
synchronized.
Feb 25 15:16:19 host freshclam[2608]: Giving up on
clamav.local.example.com...
Feb 25 15:16:19 host freshclam[2608]: Update failed. Your network may be
down or none of the mirrors listed in freshclam.conf is working. Check
http://www.clamav.net/support/mirror-problem for possible reasons.


Question.
Why does freshclam suggest checking

http://www.clamav.net/support/mirror-problem

for possible problems with a a LOCAL MIRROR when it KNOWS that its
checking a local mirror.
If freshclam where written in perl heres what I would do.

if ( $Update_Error ) {
        $ErrorMsg = "Update failed. Your network may be down or none of
        the mirrors listed in freshclam.conf is working. ";
        if ( $Update_Server == "database.clamav.net ||
        $Update_Server=~m/(db\.??\.clamav\.net)/) {
                # Official Mirror
                # So hardcode it.
                $URL = "http://www.clamav.net/support/mirror-problem";;
        }else{
                # Somrehing Else maybe a Local Mirror.
                $URL = $Update_Error_URL;
                # This could be pulled from a new setting in freshclam.conf
                # FEATURE Request Hint Hint. :-)
        }
        if ( $URL ) {
                $ErrorMsg = $ErrorMsg . "Check $URL for possible reasons.";
        }
}

This would allow a more appropriate error message to be returned & allow
the site admin to include a local mirror status URL if desired.

Obviously the real programmers on the ClamAV team could do something
like this in C.


Thoughts.


-- 
Sincerely,

Nathan Gibbs

Systems Administrator
Christ Media
http://www.cmpublishers.com


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml

Reply via email to