1

Topic: Clamd exiting (killed)

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): Latest
- Deployed with iRedMail Easy or the downloadable installer? download
- Linux/BSD distribution name and version: Debian 10
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro?
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

I am getting the following errors in syslog and clamd (clamav-daemon) is being killed. This came up in a previous ticket some time ago, but not sure why it is now.

Jul 13 01:14:47 mail amavis[7148]: (07148-03) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to a UNIX socket /var/run/clamav/clamd.ctl: Connection refused
Jul 13 01:14:48 mail amavis[7148]: (07148-03) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to a UNIX socket /var/run/clamav/clamd.ctl: Connection refused
Jul 13 01:14:48 mail amavis[7148]: (07148-03) (!)clamav-socket: All attempts (1) failed connecting to /var/run/clamav/clamd.ctl, retrying (2)
Jul 13 01:14:54 mail amavis[7148]: (07148-03) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to a UNIX socket /var/run/clamav/clamd.ctl: Connection refused
Jul 13 01:14:54 mail amavis[7148]: (07148-03) (!)clamav-socket av-scanner FAILED: run_av error: Too many retries to talk to /var/run/clamav/clamd.ctl (All attempts (1) failed connecting to /var/run/clamav/clamd.ctl) at (eval 113) line 659.\n

When starting clamav-daemon it says the following:

Jul 13 01:32:20 mail clamd[10715]: WARNING: Ignoring deprecated option DetectBrokenExecutables at /etc/clamav/clamd.conf:42
Jul 13 01:32:20 mail clamd[10715]: WARNING: Ignoring deprecated option ScanOnAccess at /etc/clamav/clamd.conf:63
Jul 13 01:32:45 mail clamd[10715]: Tue Jul 13 01:32:45 2021 -> Limits: Global time limit set to 120000 milliseconds.
Jul 13 01:32:45 mail clamd[10715]: Tue Jul 13 01:32:45 2021 -> Limits: Global size limit set to 104857600 bytes.
Jul 13 01:32:45 mail clamd[10715]: Tue Jul 13 01:32:45 2021 -> Limits: File size limit set to 26214400 bytes.
Jul 13 01:32:45 mail clamd[10715]: Tue Jul 13 01:32:45 2021 -> Limits: Recursion level limit set to 16.
Jul 13 01:32:45 mail clamd[10715]: Tue Jul 13 01:32:45 2021 -> Limits: Files limit set to 10000.
Jul 13 01:32:45 mail clamd[10715]: Tue Jul 13 01:32:45 2021 -> Limits: MaxEmbeddedPE limit set to 10485760 bytes.
Jul 13 01:32:45 mail clamd[10715]: Tue Jul 13 01:32:45 2021 -> Limits: MaxHTMLNormalize limit set to 10485760 bytes.
Jul 13 01:32:45 mail clamd[10715]: Tue Jul 13 01:32:45 2021 -> Limits: MaxHTMLNoTags limit set to 2097152 bytes.
Jul 13 01:32:45 mail clamd[10715]: Tue Jul 13 01:32:45 2021 -> Limits: MaxScriptNormalize limit set to 5242880 bytes.
Jul 13 01:32:45 mail clamd[10715]: Tue Jul 13 01:32:45 2021 -> Limits: MaxZipTypeRcg limit set to 1048576 bytes.
Jul 13 01:32:45 mail clamd[10715]: Tue Jul 13 01:32:45 2021 -> Limits: MaxPartitions limit set to 50.
Jul 13 01:32:45 mail clamd[10715]: Tue Jul 13 01:32:45 2021 -> Limits: MaxIconsPE limit set to 100.
Jul 13 01:32:45 mail clamd[10715]: Tue Jul 13 01:32:45 2021 -> Limits: MaxRecHWP3 limit set to 16.
Jul 13 01:32:45 mail clamd[10715]: Tue Jul 13 01:32:45 2021 -> Limits: PCREMatchLimit limit set to 10000.
Jul 13 01:32:45 mail clamd[10715]: Tue Jul 13 01:32:45 2021 -> Limits: PCRERecMatchLimit limit set to 5000.
Jul 13 01:32:45 mail clamd[10715]: Tue Jul 13 01:32:45 2021 -> Limits: PCREMaxFileSize limit set to 26214400.
Jul 13 01:32:45 mail clamd[10715]: Tue Jul 13 01:32:45 2021 -> Archive support enabled.
Jul 13 01:32:45 mail clamd[10715]: Tue Jul 13 01:32:45 2021 -> AlertExceedsMax heuristic detection disabled.
Jul 13 01:32:45 mail clamd[10715]: Tue Jul 13 01:32:45 2021 -> Heuristic alerts enabled.
Jul 13 01:32:45 mail clamd[10715]: Tue Jul 13 01:32:45 2021 -> Portable Executable support enabled.
Jul 13 01:32:45 mail clamd[10715]: Tue Jul 13 01:32:45 2021 -> ELF support enabled.
Jul 13 01:32:45 mail clamd[10715]: Tue Jul 13 01:32:45 2021 -> Mail files support enabled.
Jul 13 01:32:45 mail clamd[10715]: Tue Jul 13 01:32:45 2021 -> OLE2 support enabled.
Jul 13 01:32:45 mail clamd[10715]: Tue Jul 13 01:32:45 2021 -> PDF support enabled.
Jul 13 01:32:45 mail clamd[10715]: Tue Jul 13 01:32:45 2021 -> SWF support enabled.
Jul 13 01:32:45 mail clamd[10715]: Tue Jul 13 01:32:45 2021 -> HTML support enabled.
Jul 13 01:32:45 mail clamd[10715]: Tue Jul 13 01:32:45 2021 -> XMLDOCS support enabled.
Jul 13 01:32:45 mail clamd[10715]: Tue Jul 13 01:32:45 2021 -> HWP3 support enabled.
Jul 13 01:32:45 mail clamd[10715]: Tue Jul 13 01:32:45 2021 -> Self checking every 3600 seconds.

It runs fine for a while and then gets this:

Jul 12 07:00:32 mail systemd[1]: clamav-daemon.service: Main process exited, code=killed, status=9/KILL
Jul 12 07:00:32 mail systemd[1]: clamav-daemon.service: Failed with result 'signal'.

This is from syslog, if I need to look somewhere else let me know.

The old post is https://forum.iredmail.org/topic1043-cl … shing.html . I have not tried deleting bytecode.cld as im not sure if this issue is related to that, as well that ticket was from 11 years ago.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Clamd exiting (killed)

How many memory does this server have?
We mention at least 4GB memory is required for a low traffic mail server in iRedMail installation tutorials, and clamav will take most memory. if no enough memory for clamav, it may be killed by kernel due to OOM ("out of memory") error.

3

Re: Clamd exiting (killed)

I completely forgot I posted this. Figured it out a day later, 2GB on the server but my swap was only 512MB. Upped that to 2GB and havent had a single problem out of it.

Sorry about that.