Clamd being killed

Hi guys,

        I have a freshly installed iworx server that kills clamd within a min or two of starting. I see absolutely nothing in the logs relating to this and am wondering if anyone has any idea before I open a ticket. The server is a freshly installed openvz container with centos 7 minimal template installed and nothing other than release version interworx installed. Installation completed without issue and I have destroyed and rebuilt the server with both centos 6 and 7 multiple times and the same result each time.
[root@alpha ~]# systemctl status clamd.service -l
* clamd.service - SYSV: clamd is an antivirus daemon.
   Loaded: loaded (/etc/rc.d/init.d/clamd)
   Active: failed (Result: signal) since Wed 2016-08-31 16:02:01 UTC; 1h 47min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 30920 ExecStop=/etc/rc.d/init.d/clamd stop (code=exited, status=0/SUCCESS)
  Process: 30487 ExecStart=/etc/rc.d/init.d/clamd start (code=exited, status=0/SUCCESS)
 Main PID: 30490 (code=killed, signal=KILL)

Aug 31 16:01:19 alpha clamd[30490]: HWP3 support enabled.
Aug 31 16:01:19 alpha clamd[30490]: Self checking every 600 seconds.
Aug 31 16:01:19 alpha clamd[30490]: Listening daemon: PID: 30490
Aug 31 16:01:19 alpha clamd[30490]: MaxQueue set to: 100
Aug 31 16:01:21 alpha clamd[30487]: Starting Clam AV daemon: [  OK  ]
Aug 31 16:01:21 alpha systemd[1]: Started SYSV: clamd is an antivirus daemon..
Aug 31 16:02:01 alpha systemd[1]: clamd.service: main process exited, code=killed, status=9/KILL
Aug 31 16:02:01 alpha clamd[30920]: Stopping Clam AV daemon: [FAILED]
Aug 31 16:02:01 alpha systemd[1]: Unit clamd.service entered failed state.
Aug 31 16:02:01 alpha systemd[1]: clamd.service failed.

Restarting the clam daemon either from within iworx or from ssh, as root, results in the service starting, runs for around 1 min and then is killed as above. Any thought or ideas would be much appreciated.

Hi vertical

One thing comes to mind - how much memory do you have available

Also, openvz, I could be wrong but I think this needs second level quotas enabling, unless I’m thinking of a different distro

Clamd usually works first time

I would open a support ticket though if you have enough memory, drive space and quotas are enabled

If you do not mind, appreciate if you could update your thread when resolved

Many thanks

John

Hi John,
Second level quota’s are indeed enabled and it has 3GB of ram of which less than 200MB is being used and around another 400MB cached. I was thinking along those lines as well that maybe the OOM killer was the culprit but that doesn’t seem to be the case. I have used this server in the past with the same resources and templates but with Virtualmin and clamd had no issues so it’s not specific to the server or clam.

Hi vertical

Many thanks, and to be honest, I expected your server to be more then adequate but just needed to check

One last thought, did you do a completely new install of centos before installing IW-cp

If not, IW requires a complete and full fresh install of distro for it to work correctly - think here if you did not, parts maybe left over causing clamd to fail

I’m guessing you did fresh install from scratch so I would open a support ticket and let IW have a look

I hope that helps and sorry I could not be more help

Many thanks

John

Hi guys,

        Just to update this thread, the issue was not with Interworx or Clamav. I had this setup on an openvz container with nodewatch installed on the master. Every time the clamd service would start, the resource spike tripped nodewatch and it killed the process inside the container which explains why there was nothing in the server logs other than the kill sig. White listed the clamd service for that container and problem solved.