Error: Debian/Ubuntu - ClamAV-clamd: Can't connect to UNIX socket /var/run/clamav/clamd.ctl

You get the following errors in your mail log (/var/log/mail.log) on Debian/Ubuntu:

Jul 28 22:04:28 server1 amavis[31819]: (31819-19) (!)ClamAV-clamd: Can't connect to UNIX socket /var/run/clamav/clamd.ctl: 2, retrying (2)
Jul 28 22:04:34 server1 amavis[31819]: (31819-19) (!!)ClamAV-clamd av-scanner FAILED: run_av error: Too many retries to talk to /var/run/clamav/clamd.ctl (Can't connect to UNIX socket /var/run/clamav/clamd.ctl: No such file or directory) at (eval 88) line 309.
Jul 28 22:04:34 server1 amavis[31819]: (31819-19) (!!)WARN: all primary virus scanners failed, considering backups



The package clamav-daemon is missing. Install it as follows:

apt-get install clamav-daemon

On Ubuntu you have to prepend the command with sudo if you are not logged in as root:

sudo apt-get install clamav-daemon
Share this page:

Suggested articles

4 Comment(s)

Add comment


By: philgardner

This solution is inadequate. This error message can occur even if clamav-daemon is installed and running, e.g. an error in clamd.conf.

By: Ed

Agree with Phil, this is showing when running "clamdscan /directory" for me eventhough clamav-daemon is installed

By: Muhammad Khan

Missing index "calendarobject_calid_index" in table "oc_calendarobjects_props" Sir how to do this?

By: AlexSr

Using the --reinstall paramenter helped me to fix this issue on my server