Freshclam - 无法完成 main.cvd 的下载

Freshclam - 无法完成 main.cvd 的下载

几周前安装 Ubuntu 18.04 后,我尝试安装 clamav,我在之前的 Kubuntu 14.10 系统中有效使用它。clamav 安装的第一步进展顺利,但当我尝试使用 freshclam 命令下载签名数据库 main.cvd 时,我无法继续。我总是在下载过程到达 86% 时准确收到错误消息“!无法从 db.it.clamav.net 下载 main.cvd”。我尝试更改镜像下载站点(.it、.fr)并将超时时间从 30 增加到 120,并在几天后重新运行该命令,但没有任何结果。以下是我从终端收到的一系列消息:

fla-user@FLA-DESKTOP:~$ sudo freshclam -v
Thu Sep 27 20:58:18 2018 -> *Current working dir is /var/lib/clamav
Thu Sep 27 20:58:18 2018 -> *Max retries == 2
Thu Sep 27 20:58:18 2018 -> ClamAV update process started at Thu Sep 27 20:58:18 2018
Thu Sep 27 20:58:18 2018 -> *Using IPv6 aware code
Thu Sep 27 20:58:18 2018 -> *Querying current.cvd.clamav.net
Thu Sep 27 20:58:18 2018 -> *TTL: 702
Thu Sep 27 20:58:18 2018 -> *Software version from DNS: 0.100.1
Thu Sep 27 20:58:18 2018 -> *Retrieving http://db.it.clamav.net/main.cvd
Thu Sep 27 20:58:18 2018 -> *Trying to download http://db.it.clamav.net/main.cvd (IP: 104.16.189.138)
Thu Sep 27 21:01:44 2018 -> ^getfile: Download interrupted: Connection reset by peer (IP: 104.16.189.138)
Thu Sep 27 21:01:44 2018 -> ^Can't download main.cvd from db.it.clamav.net
Thu Sep 27 21:01:44 2018 -> *Querying main.0.92.0.0.6810BD8A.ping.clamav.net
Thu Sep 27 21:01:44 2018 -> *Can't query main.0.92.0.0.6810BD8A.ping.clamav.net
Thu Sep 27 21:01:44 2018 -> Trying again in 5 secs...
Thu Sep 27 21:01:49 2018 -> ClamAV update process started at Thu Sep 27 21:01:49 2018
Thu Sep 27 21:01:49 2018 -> *Using IPv6 aware code
Thu Sep 27 21:01:49 2018 -> *Querying current.cvd.clamav.net
Thu Sep 27 21:01:49 2018 -> *TTL: 877
Thu Sep 27 21:01:49 2018 -> *Software version from DNS: 0.100.1
Thu Sep 27 21:01:49 2018 -> *Retrieving http://db.it.clamav.net/main.cvd
Thu Sep 27 21:01:49 2018 -> *Trying to download http://db.it.clamav.net/main.cvd (IP: 104.16.187.138)
Thu Sep 27 21:05:27 2018 -> !getfile: Download interrupted: Connection reset by peer (IP: 104.16.187.138)
Thu Sep 27 21:05:27 2018 -> !Can't download main.cvd from db.it.clamav.net
Thu Sep 27 21:05:27 2018 -> *Querying main.0.92.0.0.6810BB8A.ping.clamav.net
Thu Sep 27 21:05:27 2018 -> *Can't query main.0.92.0.0.6810BB8A.ping.clamav.net
Thu Sep 27 21:05:27 2018 -> Giving up on db.it.clamav.net...
Thu Sep 27 21:05:27 2018 -> ClamAV update process started at Thu Sep 27 21:05:27 2018
Thu Sep 27 21:05:27 2018 -> *Using IPv6 aware code
Thu Sep 27 21:05:27 2018 -> *Querying current.cvd.clamav.net
Thu Sep 27 21:05:27 2018 -> *TTL: 659
Thu Sep 27 21:05:27 2018 -> *Software version from DNS: 0.100.1
Thu Sep 27 21:05:27 2018 -> *Retrieving http://database.clamav.net/main.cvd
Thu Sep 27 21:05:27 2018 -> *Trying to download http://database.clamav.net/main.cvd (IP: 104.16.186.138)
Thu Sep 27 21:08:54 2018 -> !getfile: Download interrupted: Connection reset by peer (IP: 104.16.186.138)
Thu Sep 27 21:08:54 2018 -> !Can't download main.cvd from database.clamav.net
Thu Sep 27 21:08:54 2018 -> *Querying main.0.92.0.0.6810BA8A.ping.clamav.net
Thu Sep 27 21:08:54 2018 -> *Can't query main.0.92.0.0.6810BA8A.ping.clamav.net
Thu Sep 27 21:08:54 2018 -> Giving up on database.clamav.net...
Thu Sep 27 21:08:54 2018 -> Update failed. Your network may be down or none of the mirrors listed in /etc/clamav/freshclam.conf is working. Check https://www.clamav.net/documents/official-mirror-faq for possible reasons.

有人能帮我解决这个问题吗?提前谢谢了。

弗拉维奥

答案1

我遇到了类似的问题:clamav-freshclam 服务因这些超时故障而填满了 /var/log/clamav/freshclam.log,当我关闭该服务并手动运行 freshclam 时,它会运行到一半然后失败。我发现在配置文件 /etc/clamav/freshclam.conf 中有两个超时指令,一个名为 ConnectTimeout,另一个名为 RecieveTimeout,默认情况下这两个指令都设置为 30。我将 ConnectTimeout 更改为 10(没有理由等待超过 10 秒的连接)并将接收超时设置为 120(需要更多时间通过我贫血的 DSL 连接下载定义文件),现在 freshclam 和 clamav-freshclam 服务都能够正确更新。

答案2

删除您可能拥有的任何垃圾源并以正确的方式安装 ClamAv 可能会解决问题。

1.按: Ctrl+Alt+T

2.在终端中输入:sudo gedit /etc/apt/sources.list

3.删除所有可能存在的垃圾源,查看底部并小心查看两次然后删除,节省

4.在终端:

sudo apt-get update
sudo apt-get install --reinstall clamav
sudo rm -r /var/log/clamav/freshclam.log
sudo /etc/init.d/clamav-freshclam start
sudo freshclam

答案3

几周后,我不再尝试解决 freshclam 下载问题,出乎意料但又很肯定的是,我发现签名文件 main.cvd 已在后台自动完全下载。所以现在我可以正常使用 clamscan 命令和 GUI ClamTK 应用程序。

我不知道问题是什么(可能与通信服务器有关),也不知道如何以及何时解决它,但现在一切都正常了。

答案4

对我来说,问题似乎是下载量太大。它试图下载 103.95 MB,但每次 30 秒后就超时,只能下载 86 MB。

我使用的是 i7、16 GB 和 256 SSD,所以我认为这不是我的机器的问题。这可能与它们加载到下载文件中的签名数量有关。

相关内容