When the server crashes the file /tmp/clam.sock already exists. A Test if the file exists before clam is started with the init script would be good, and on demand remove the sock file before starting clam. Reproducible: Always Steps to Reproduce: 1. Start Clamd 2. Hit reset ;) 3. try to start Clamd again Actual Results: clamd doenst start Expected Results: remove the clam.sock file and then start clam.
Just hit this same issue. I propose something like this in the start() function: if [ -e "/var/amavisd/clamd" ]; then rm -f /var/amavisd/clamd fi and ofcourse you should replace the hardlink to the socket file with something defined in the conf file.
This bug seems to be the same as Bug 32448
Please uncomment the 'FixStaleSocket' line in default /etc/clamav.conf file. If(when) clamd crashes, it fails to release the /tmp/clamd local socket. Making the option default to being enabled would eliminate this. The workaround is to manually delete /tmp/clamd and restart /etc/init.d/clamd.
This is fixed in latest versions.