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

Falko Timme

About Falko Timme

Falko Timme is an experienced Linux administrator and founder of Timme Hosting, a leading nginx business hosting company in Germany. He is one of the most active authors on HowtoForge since 2005 and one of the core developers of ISPConfig since 2000. He has also contributed to the O'Reilly book "Linux System Administration".

Share this page:

Suggested articles

1 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.