Page 1 of 1

Fresh install, failing with virus scanning

Posted: 19 Jun 2019 18:43
by friday1970
Fresh install. (Actually, the second time since the first failed with the same error).

As soon as new email arrives and gets past the greylisting period, it gets stuck in queue. I see the following errors in maillog

Jun 19 12:17:31 XXXXXXX MailScanner[1080]: Cannot find Socket (/var/run/clamd.socket/clamd.sock) Exiting!
Jun 19 12:17:31 XXXXXXX MailScanner[15348]: Virus Scanning: No virus scanners worked, so message batch will be tried again

I've also noticed that clamd is taking up 100% of my CPU.

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
20829 clamscan 20 0 421320 309756 3280 R 100.0 8.0 0:56.98 clamd

And when I go to /var/run/clamd.socket/ directory, I see no files there.


I don't even know where to look or what to fix.

Re: Fresh install, failing with virus scanning

Posted: 19 Jun 2019 21:41
by henk

Re: Fresh install, failing with virus scanning

Posted: 19 Jun 2019 23:22
by friday1970
It's not the install that failed, and I should have been more clear about that.

I added:

TimeoutSec=900

to the bottom of:

/usr/lib/systemd/system/clamd@.service

And that seemed to get clamd up and running. Running systemctl status clamd@scan.service shows it running:
clamd@scan.service - Generic clamav scanner daemon
Loaded: loaded (/usr/lib/systemd/system/clamd@scan.service; enabled; vendor preset: disabled)
Active: active (running)

However, now I get this message with every email:

Jun 19 21:09:48 XXXXXX MailScanner[6173]: Virus Scanning: Clamd found 1 infections
Jun 19 21:09:48 XXXXXX MailScanner[6173]: Virus Scanning: No virus scanners worked, so message batch will be tried again
Jun 19 21:09:53 XXXXXX MailScanner[6168]: Clamd::ERROR:: COULD NOT CONNECT TO CLAMD, RECOMMEND RESTARTING DAEMON :: .

Ugh.... I've tried uncommening the socket stuff in scan.conf in /etc/clamd.d. But still the same result. Any ideas? I'm assuming everyone using the kickstarter will see this, seeing as how I did just that twice with the same clamd error.

Re: Fresh install, failing with virus scanning

Posted: 20 Jun 2019 15:06
by friday1970
I tried the solutions listed here: viewtopic.php?t=3128
enable_yararules was set to yes
Didn't work for me, even after a reboot.

Still getting this error:
Clamd::ERROR:: COULD NOT CONNECT TO CLAMD, RECOMMEND RESTARTING DAEMON :: .
Jun 20 11:00:09 XXXXXX MailScanner[6252]: Virus Scanning: Clamd found 1 infections
Jun 20 11:00:09 XXXXXX MailScanner[6252]: Virus Scanning: No virus scanners worked, so message batch will be tried again

Re: Fresh install, failing with virus scanning

Posted: 22 Jun 2019 08:19
by shawniverson
How much memory do you have?

Re: Fresh install, failing with virus scanning

Posted: 26 Jun 2019 14:36
by friday1970
4gigs

However, I'm wondering if my Atom(TM) CPU D510 could be part of the problem. Let me try another install using a spare core i5 box with 8gig.

Re: Fresh install, failing with virus scanning

Posted: 05 Jul 2019 14:41
by gh0stwizard
Checkout dmesg output. Probably the clamd process was killed by kernel (OOM).

Re: Fresh install, failing with virus scanning

Posted: 31 Jul 2019 17:27
by friday1970
So, I decided to use a newer system. Core I5, 8gigs, SATA SSD.
No errors to report.
So, am I safe to assume that the Atom CPU just isnt powerful enough to process the clamav stuff? There is some timeout for the daemon to start, and I tried to adjust it for the Atom CPU. And it just would not work.
Reinstalling on a faster system worked flawlessly.

Re: Fresh install, failing with virus scanning

Posted: 31 Jul 2019 20:47
by shawniverson
clamav is definitely timeout sensitive.

In fact, so much so that I am working on an issue to resolve this.