After install Ispconfig amavis start but not work and show this error: Code: Dec 31 19:20:18 vps1 amavis[28095]: (28095-01) (!)connect to /var/run/clamav/clamd.sock failed, attempt #1: Can't connec t to a UNIX socket /var/run/clamav/clamd.sock: File o directory non esistente Dec 31 19:20:19 vps1 amavis[28095]: (28095-01) (!)connect to /var/run/clamav/clamd.sock failed, attempt #1: Can't connect to a UNIX socket /var/run/clamav/clamd.sock: File o directory non esistente Dec 31 19:20:19 vps1 amavis[28095]: (28095-01) (!)ClamAV-clamd: All attempts (1) failed connecting to /var/run/clamav/clamd.sock, retrying (2) Dec 31 19:20:25 vps1 amavis[28095]: (28095-01) (!)connect to /var/run/clamav/clamd.sock failed, attempt #1: Can't connect to a UNIX socket /var/run/clamav/clamd.sock: File o directory non esistente Dec 31 19:20:25 vps1 amavis[28095]: (28095-01) (!)ClamAV-clamd av-scanner FAILED: run_av error: Too many retries to talk to /var/run/clamav/clamd.sock (All attempts (1) failed connecting to /var/run/clamav/clamd.sock) at (eval 131) line 613.\n Dec 31 19:20:25 vps1 amavis[28095]: (28095-01) (!)WARN: all primary virus scanners failed, considering backups The cause is the amavis sock option not configured like clamd service: Code: [[email protected] ~]# grep clamd.sock /etc/clamd.d/amavisd.conf /etc/amavisd/amavisd.conf /etc/clamd.d/amavisd.conf:LocalSocket /var/run/clamd.amavisd/clamd.sock /etc/amavisd/amavisd.conf: \&ask_daemon, ["CONTSCAN {}\n", "/var/run/clamav/clamd.sock"], If I correct the CONTSCAN sock option into /etc/amavisd/amavisd.conf all work fine, but when I update ISPC or rerun ISPC service configuration (/usr/local/ispconfig/server/scripts/update_stable.sh) the option come back point to a missing folder (/var/run/clamav/) and file (/var/run/clamav/clamd.sock) Why is this happening? There is some solution to this problem? Many thanks Dario
Seems as if CentOS changed their paths again. CentOS is not really longtime stable regarding software paths, sometimes they change them within minor version releases. What you can try is this: ln -s /var/run/clamd.amavisd /var/run/clamav
Yes, For now I have use your work around But it is only a work around .... and when I reboot the machine the symlink is removed The question is: why ISPconfig setup configure two different sock path into /etc/clamd.d/amavisd.conf and /etc/amavisd/amavisd.conf ? I have try to change the amavisd.conf sock path, but when I run an update or simple rerun ISPC service configuration (/usr/local/ispconfig/server/scripts/update_stable.sh) the option come back. Thanks for your reply. Dario
I found what is the problem: Other day, I have install Centos 7.2 and before run ISPconfig setup, I have run a "yum update" ... my Centos 7.2 it has become a Centos 7.3 !! Code: [[email protected] install]# cat /etc/redhat-release CentOS Linux release 7.3.1611 (Core) This is a Centos "Feature": When a new version is come, it's not possible run update and not switch to the new version. Your setup, at the moment, still does not recognize this new version, and modify the configuration's file like a Centos 7.0, and not like a 7.2 I have change at the moment the /etc/redhat-release to 7.2, rerun setup and all work fine. Then I must wait a new setup version, compatible with Centos 7.3, and for now I leave the redhat-release set to 7.2 If you want help, I can help you to modify the ISPC setup procedure to adapt it to new Centos 7.3 Version. Let me know. Thanks! Dario
ISPConfig is not setting up to paths, ispconfig is setting the path in amavisd.conf and that's the path the centOS 7.x was using until they decided to change the path again. When the symlink is removed on reboot, then change the path in /etc/clamd.d/amavisd.conf to match the one from /etc/amavisd/amavisd.conf
Please make a bugreport in the ISPConfig bugtracker with the altered paths and we will add support for the new paths in the next release.
Centos 7 change this (and some other) path into 7.2, and you have already adapted your setup procedures for the 7.2 and this modify work also for 7.3. If I force the Centos version to 7.2 your setup and my server work fine The problem is that the ISPC setup considers the 7.2 as an exception, and treats 7.3 as 7.0 The best solution is treats the version >7.0 or 7.1 like it do for the 7.2 version. Into next day I report a bugreport in the ISPConfig bugtracker with my proposal solution. Thanks Dario
Could you explain more about where in /etc/amavisd/amavisd.conf this change needs to be? Is it in the: ['ClamAV-clamd', \&ask_daemon, ["CONTSCAN {}\n", "/var/run/clamav/clamd.sock"], Having the same issues, Does that mean I should change $unix_socketname = "$MYHOME/amavisd.sock"; # amavisd-release or amavis-milter to $unix_socketname = "/var/run/clamd.amavisd/clamd.sock"; # amavisd-release or amavis-milter
I have fill this proposal with a simple patch[1] that works for me Thanks Dario [1] - https://git.ispconfig.org/ispconfig/ispconfig3/issues/4411#note_59204
Thanks! I will test it here and it will become part of the next release. I've planned to prepare the 3.1.2 release in the next 2 weeks.