1

Topic: connect to /tmp/clamd.socket failed

==== Required information ====
- iRedMail version: 0.9.0
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version: Debian 7
- Related log if you're reporting an issue: N/A
====

Getting these errors every few minutes...

Jan 22 13:19:10 mail amavis[9888]: (09888-18) (!)connect to /tmp/clamd.socket failed, attempt #1: Can't connect to UNIX socket /tmp/clamd.socket: Connection refused
Jan 22 13:19:11 mail amavis[9888]: (09888-18) (!)connect to /tmp/clamd.socket failed, attempt #1: Can't connect to UNIX socket /tmp/clamd.socket: Connection refused
Jan 22 13:19:11 mail amavis[9888]: (09888-18) (!)ClamAV-clamd: All attempts (1) failed connecting to /tmp/clamd.socket, retrying (2)
Jan 22 13:19:17 mail amavis[9888]: (09888-18) (!)connect to /tmp/clamd.socket failed, attempt #1: Can't connect to UNIX socket /tmp/clamd.socket: Connection refused
Jan 22 13:19:17 mail amavis[9888]: (09888-18) (!)ClamAV-clamd av-scanner FAILED: run_av error: Too many retries to talk to /tmp/clamd.socket (All attempts (1) failed connecting to /tmp/clamd.socket) at (eval 114) line 603.\n
Jan 22 13:19:17 mail amavis[9888]: (09888-18) (!)WARN: all primary virus scanners failed, considering backups

I've restarted clamav-daemon and amavisd but these errors pop up randomly.  This is a brand new install with little to no configuration changes related to virus scanning.  /tmp/clamd.socket is there and the owner is clamav so I don't think it's a perms issue.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: connect to /tmp/clamd.socket failed

Try to update ClamAV virus database first:

# freshclam

3

Re: connect to /tmp/clamd.socket failed

I tried that before... below are the logs from doing this again.

Mail is flowing fine and clamav-daemon is definitely running, so could it be a resources issue?  Very low load on the server (8-10 mailboxes) right now.

cat /var/log/clamav/freshclam.log

......
Fri Jan 23 05:31:14 2015 -> ClamAV update process started at Fri Jan 23 05:31:14 2015
Fri Jan 23 05:31:14 2015 -> main.cvd is up to date (version: 55, sigs: 2424225, f-level: 60, builder: neo)
Fri Jan 23 05:31:14 2015 -> daily.cld is up to date (version: 19966, sigs: 1313109, f-level: 63, builder: neo)
Fri Jan 23 05:31:14 2015 -> bytecode.cvd is up to date (version: 245, sigs: 43, f-level: 63, builder: dgoddard)


cat /var/log/mail.log

.....
Jan 23 06:04:30 mail amavis[13616]: (13616-13) (!)connect to /tmp/clamd.socket failed, attempt #1: Can't connect to UNIX socket /tmp/clamd.socket: Connection refused
Jan 23 06:04:31 mail amavis[13616]: (13616-13) (!)connect to /tmp/clamd.socket failed, attempt #1: Can't connect to UNIX socket /tmp/clamd.socket: Connection refused
Jan 23 06:04:31 mail amavis[13616]: (13616-13) (!)ClamAV-clamd: All attempts (1) failed connecting to /tmp/clamd.socket, retrying (2)
Jan 23 06:04:37 mail amavis[13616]: (13616-13) (!)connect to /tmp/clamd.socket failed, attempt #1: Can't connect to UNIX socket /tmp/clamd.socket: Connection refused
Jan 23 06:04:37 mail amavis[13616]: (13616-13) (!)ClamAV-clamd av-scanner FAILED: run_av error: Too many retries to talk to /tmp/clamd.socket (All attempts (1) failed connecting to /tmp/clamd.socket) at (eval 114) line 603.\n
Jan 23 06:04:37 mail amavis[13616]: (13616-13) (!)WARN: all primary virus scanners failed, considering backups

4

Re: connect to /tmp/clamd.socket failed

How much memory do you have on this server? 512MB? If so, you'd better increase it to 1GB.
Amavisd + SpamAssassin + ClamAV requires much memory.

5

Re: connect to /tmp/clamd.socket failed

ZhangHuangbin wrote:

How much memory do you have on this server? 512MB? If so, you'd better increase it to 1GB.
Amavisd + SpamAssassin + ClamAV requires much memory.

I think it has 1GB... but I'll check.  Either way I'll bump that up and see if that does the trick.

Thanks.