2012年12月5日 星期三

台灣的ClamAV Mirror Site同步較慢?

今天看郵件閘道主機的日誌時,一直看到freshclam有如下錯誤訊息:
Dec  5 13:43:12 mail1 freshclam[15030]: daily.cld is up to date (version: 15680, sigs: 290708, f-level: 63, builder: guitar)
Dec  5 13:43:14 mail1 freshclam[15030]: getfile: safebrowsing-40061.cdiff not found on remote server (IP: 120.119.118.1)
Dec  5 13:43:14 mail1 freshclam[15030]: getpatch: Can't download safebrowsing-40061.cdiff from database.clamav.net
Dec  5 13:43:15 mail1 last message repeated 4 times
Dec  5 13:43:15 mail1 freshclam[15030]: Incremental update failed, trying to download safebrowsing.cvd
Dec  5 13:43:27 mail1 freshclam[15030]: Downloading safebrowsing.cvd [100%]
Dec  5 13:43:28 mail1 freshclam[15030]: Mirror 120.119.118.1 is not synchronized.
Dec  5 13:43:28 mail1 freshclam[15030]: Trying again in 5 secs...
Dec  5 13:43:31 mail1 freshclam[15030]: Update process terminated
想說為什麼會不能更新safebrowsing-xxxxx.cdiff, 難道是我們網路有問題,還是防火牆設定有問題。於是直接下指令freshclam查看,發現它一直吐出以下訊息,而且看來一直跑不完的樣子。
# freshclam
ClamAV update process started at Wed Dec  5 13:40:51 2012
main.cld is up to date (version: 54, sigs: 1044387, f-level: 60, builder: sven)
daily.cld is up to date (version: 15680, sigs: 290708, f-level: 63, builder: guitar)
WARNING: getfile: safebrowsing-40061.cdiff not found on remote server (IP: 120.119.118.1)
WARNING: getpatch: Can't download safebrowsing-40061.cdiff from db.tw.clamav.net
WARNING: getfile: safebrowsing-40061.cdiff not found on remote server (IP: 140.128.9.18)
WARNING: getpatch: Can't download safebrowsing-40061.cdiff from db.tw.clamav.net
WARNING: getpatch: Can't download safebrowsing-40061.cdiff from db.tw.clamav.net
WARNING: getpatch: Can't download safebrowsing-40061.cdiff from db.tw.clamav.net
WARNING: getpatch: Can't download safebrowsing-40061.cdiff from db.tw.clamav.net
WARNING: Incremental update failed, trying to download safebrowsing.cvd
Downloading safebrowsing.cvd [100%]
WARNING: Mirror 140.128.9.18 is not synchronized.
Trying again in 5 secs...
 
查一下,發現ClamAV的更新是由全球許多Mirror Site在做,而台灣看來只有兩個Site(clamav-mirrors) 。一時突發奇想,也許我們那兩個單位的機器同時都出了點問題,因為我去看了一下freshclam.log發現好像幾個月之前,就會偶爾有錯誤訊息出現。
所以決定改用別的國家的Mirror Site試試看,雖然遠了一點,慢了一點。我將/usr/local/etc/freshclam.conf裡的設定改了一下:
本來是 DatabaseMirror db.tw.clamav.net
改成 DatabaseMirror db.de.clamav.net
意思就是不用台灣的Mirror Site, 改用德國的Mirror Site.

再跑一次freshclam, 結果:
# freshclam
ClamAV update process started at Wed Dec  5 13:46:11 2012
main.cld is up to date (version: 54, sigs: 1044387, f-level: 60, builder: sven)
daily.cld is up to date (version: 15680, sigs: 290708, f-level: 63, builder: guitar)
Empty script safebrowsing-40061.cdiff, need to download entire database
Downloading safebrowsing.cvd [100%]
safebrowsing.cvd updated (version: 40061, sigs: 1301136, f-level: 63, builder: google)
bytecode.cld is up to date (version: 202, sigs: 40, f-level: 63, builder: neo)
Database updated (2636271 signatures) from db.de.clamav.net (IP: 62.201.161.84)
Clamd successfully notified about the update.
果然,這樣就成功的完成更新了。

張貼留言