clamd@scan.service start operation timed out. Terminating

Bugs in eFa 4
Post Reply
doggy101
Posts: 51
Joined: 21 May 2013 20:07
Location: Netherlands

clamd@scan.service start operation timed out. Terminating

Post by doggy101 » 12 Nov 2019 13:10

after upgrading to Stable 4.0 EFA the Spamfilter stopped working and messages are piling up.

The start-up result is done.
Nov 12 13:57:02 EFAmailscanner CROND[14028]: (root) CMD (/usr/sbin/eFa-Monitor-cron >/dev/null 2>&1)
Nov 12 13:57:02 EFAmailscanner CROND[14029]: (root) CMD (/usr/sbin/checkreboot.sh)
Nov 12 13:57:30 EFAmailscanner MailScanner[14406]: Cannot find Socket (/var/run/clamd.socket/clamd.sock) Exiting!
Nov 12 13:57:30 EFAmailscanner MailScanner[4734]: Virus Scanning: No virus scanners worked, so message batch will be tried again
Nov 12 13:57:58 EFAmailscanner systemd[1]: clamd@scan.service start operation timed out. Terminating.
Nov 12 13:57:58 EFAmailscanner systemd[1]: Failed to start Generic clamav scanner daemon.
-- Subject: Unit clamd@scan.service has failed

is the something changed in permissions ?
found an article which stated that the issue is caused by
/run/clamd.scan 0710 clamscan virusgroup permission, I adjusted it to clamscan:clamscan but that did not work

Any sugestions?

User avatar
shawniverson
Posts: 2898
Joined: 13 Jan 2014 23:30
Location: Rushville, Indiana, USA
Contact:

Re: clamd@scan.service start operation timed out. Terminating

Post by shawniverson » 12 Nov 2019 13:57

Can you check the override file located here?

Code: Select all

/etc/systemd/system/clamd@scan.service.d/override.conf
It should be set at 300. Try increasing it to 600 and report back please.
Version eFa 4.0.0 now available!

doggy101
Posts: 51
Joined: 21 May 2013 20:07
Location: Netherlands

Re: clamd@scan.service start operation timed out. Terminating

Post by doggy101 » 12 Nov 2019 16:10

it's allready on 900

doggy101
Posts: 51
Joined: 21 May 2013 20:07
Location: Netherlands

Re: clamd@scan.service start operation timed out. Terminating

Post by doggy101 » 12 Nov 2019 16:12

and cpu is going through the roof
clamscan 87.2 % /usr/sbin/clamd -c /etc/clamd.d/scan.conf

User avatar
shawniverson
Posts: 2898
Joined: 13 Jan 2014 23:30
Location: Rushville, Indiana, USA
Contact:

Re: clamd@scan.service start operation timed out. Terminating

Post by shawniverson » 12 Nov 2019 16:45

It will until signatures are loaded into memory.

How many CPUs do you have?
Version eFa 4.0.0 now available!

User avatar
shawniverson
Posts: 2898
Joined: 13 Jan 2014 23:30
Location: Rushville, Indiana, USA
Contact:

Re: clamd@scan.service start operation timed out. Terminating

Post by shawniverson » 12 Nov 2019 16:48

doggy101 wrote:
12 Nov 2019 16:10
it's allready on 900
Increase it to 1200 and report back. For some reason your machine is taking an extraordinary amount of time to load all the signatures.

Also check and make sure you have at least 2 CPUs and 8GB of memory.
Version eFa 4.0.0 now available!

doggy101
Posts: 51
Joined: 21 May 2013 20:07
Location: Netherlands

Re: clamd@scan.service start operation timed out. Terminating

Post by doggy101 » 12 Nov 2019 18:31

changed to 2CPU and 8GB, struggling with root access to get the value of 900 adjusted,

cpu and memory boost did not solve the issue

Nov 12 19:22:23 EFAmailscanner MailScanner[5935]: Cannot find Socket (/var/run/clamd.socket/clamd.sock) Exiting!
Nov 12 19:22:23 EFAmailscanner MailScanner[3950]: Virus Scanning: No virus scanners worked, so message batch will be tried again
Nov 12 19:22:34 EFAmailscanner systemd[1]: clamd@scan.service start operation timed out. Terminating.
Nov 12 19:22:34 EFAmailscanner systemd[1]: Failed to start Generic clamav scanner daemon.
-- Subject: Unit clamd@scan.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li ... temd-devel
--
-- Unit clamd@scan.service has failed.
--
-- The result is failed.
Nov 12 19:22:34 EFAmailscanner systemd[1]: Unit clamd@scan.service entered failed state.
Nov 12 19:22:34 EFAmailscanner systemd[1]: clamd@scan.service failed.

doggy101
Posts: 51
Joined: 21 May 2013 20:07
Location: Netherlands

Re: clamd@scan.service start operation timed out. Terminating

Post by doggy101 » 12 Nov 2019 18:52

changing to 1200 did not solve the issue..

anything else to look for?

Nov 12 19:50:35 EFAmailscanner systemd[1]: clamd@scan.service start operation timed out. Terminating.
Nov 12 19:50:35 EFAmailscanner systemd[1]: Failed to start Generic clamav scanner daemon.
-- Subject: Unit clamd@scan.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li ... temd-devel
--
-- Unit clamd@scan.service has failed.
--
-- The result is failed.
Nov 12 19:50:35 EFAmailscanner systemd[1]: Unit clamd@scan.service entered failed state.
Nov 12 19:50:35 EFAmailscanner systemd[1]: clamd@scan.service failed.

doggy101
Posts: 51
Joined: 21 May 2013 20:07
Location: Netherlands

Re: clamd@scan.service start operation timed out. Terminating

Post by doggy101 » 12 Nov 2019 19:16


User avatar
shawniverson
Posts: 2898
Joined: 13 Jan 2014 23:30
Location: Rushville, Indiana, USA
Contact:

Re: clamd@scan.service start operation timed out. Terminating

Post by shawniverson » 13 Nov 2019 07:01

doggy101 wrote:
12 Nov 2019 19:16
could this be something?
https://serverfault.com/questions/94852 ... ind-socket
No, systemd is terminating clamd due to timeout. So we can assume it is stalling. This is not a socket problem. You never reach socket initialization phase.

We can verify the socket as follows:

/etc/tmpfiles.d/clamd.socket.conf:

Code: Select all

d /var/run/clamd.socket 0750 clamscan mtagroup -
/etc/clamd.d/scan.conf:

Code: Select all

LocalSocket /var/run/clamd.socket/clamd.sock
ll -Z /var/run/

Code: Select all

...
drwxr-x---. clamscan  mtagroup       system_u:object_r:antivirus_var_run_t:s0 clamd.socket
...
If the above checks out I want you to disable clamav-unofficial-sigs as follows:

Code: Select all

sudo sed -i "/^user_configuration_complete=/ c\user_configuration_complete=no" /etc/clamav-unofficial-sigs/user.conf
sudo rm -rf /var/lib/clamav/*
sudo freshclam
sudo systemctl start clamd@scan
Report back whether clamd starts after relieving it of the extra signatures...
Version eFa 4.0.0 now available!

doggy101
Posts: 51
Joined: 21 May 2013 20:07
Location: Netherlands

Re: clamd@scan.service start operation timed out. Terminating

Post by doggy101 » 13 Nov 2019 17:09

On:
ll -Z /var/run

Code: Select all

drwxr-x---. clamscan mtagroup system_u:object_r:antivirus_var_run_t:s0 clamd.socket

I got:

[root@EFAmailscanner ~]# ll -Z /var/run
lrwxrwxrwx. root root system_u:object_r:var_run_t:s0 /var/run -> ../run

so it didn't check out :-)

User avatar
shawniverson
Posts: 2898
Joined: 13 Jan 2014 23:30
Location: Rushville, Indiana, USA
Contact:

Re: clamd@scan.service start operation timed out. Terminating

Post by shawniverson » 13 Nov 2019 17:20

My bad, missed a slash

Code: Select all

ll -Z /var/run/
Version eFa 4.0.0 now available!

doggy101
Posts: 51
Joined: 21 May 2013 20:07
Location: Netherlands

Re: clamd@scan.service start operation timed out. Terminating

Post by doggy101 » 13 Nov 2019 19:03

[root@EFAmailscanner ~]# ll -Z /var/run/
-rw-r--r--. root root system_u:object_r:auditd_var_run_t:s0 auditd.pid
drwxr-x---. chrony chrony system_u:object_r:chronyd_var_run_t:s0 chrony
drwx--x---. clamscan clamscan system_u:object_r:antivirus_var_run_t:s0 clamd.s can
drwxr-x---. clamscan mtagroup system_u:object_r:antivirus_var_run_t:s0 clamd.s ocket
Last edited by doggy101 on 13 Nov 2019 19:43, edited 1 time in total.

doggy101
Posts: 51
Joined: 21 May 2013 20:07
Location: Netherlands

Re: clamd@scan.service start operation timed out. Terminating

Post by doggy101 » 13 Nov 2019 19:36

thanks all is fine again :-)

much appreciated ....

Post Reply