clamd.service commands in debian8

dkzr

Verified User
Joined
Oct 17, 2013
Messages
98
Location
The Netherlands
Hi,

After a clamd update it refused to start on my Debian8 server.

I think there are some (debian?) configuration errors in the clamd.service file?

The ExecStartPre commands /usr/bin/mkdir and /usr/bin/chown should be /bin/mkdir and /bin/chown on my machine.

On my machine, the --nofork=yes option for clamd is not recognized.
 
+1

Debian 8 server + clamav 0.99.2


● clamd.service - Generic clamav scanner daemon
Loaded: loaded (/etc/systemd/system/clamd.service; enabled)
Active: failed (Result: start-limit) since Wed 2016-05-04 11:27:03 CEST; 40s ago
Process: 5101 ExecStart=/usr/local/sbin/clamd --nofork=yes (code=exited, status=1/FAILURE)
Process: 5098 ExecStartPre=/usr/bin/chown -R clamav:clamav /var/run/clamd (code=exited, status=203/EXEC)
Process: 5095 ExecStartPre=/usr/bin/mkdir -p /var/run/clamd (code=exited, status=203/EXEC)
Main PID: 5101 (code=exited, status=1/FAILURE)

May 04 11:27:03 host.xxx systemd[1]: Unit clamd.service entered failed state.
May 04 11:27:03 host.xxx systemd[1]: clamd.service holdoff time over, scheduling restart.
May 04 11:27:03 host.xxx systemd[1]: Stopping Generic clamav scanner daemon...
May 04 11:27:03 host.xxx systemd[1]: Starting Generic clamav scanner daemon...
May 04 11:27:03 host.xxx systemd[1]: clamd.service start request repeated too quickly, refusing to start.
May 04 11:27:03 host.xxx systemd[1]: Failed to start Generic clamav scanner daemon.
May 04 11:27:03 host.xxx systemd[1]: Unit clamd.service entered failed state.
May 04 11:27:06 host.xxx systemd[1]: Starting Generic clamav scanner daemon...
May 04 11:27:06 host.xxx systemd[1]: clamd.service start request repeated too quickly, refusing to start.
May 04 11:27:06 host.xxx systemd[1]: Failed to start Generic clamav scanner daemon.
 
Last edited:
Not just Debian. CentOS7 too:

May 4 14:33:08 vps03 systemd: Starting Generic clamav scanner daemon...
May 4 14:33:08 vps03 systemd: Started Generic clamav scanner daemon.
May 4 14:33:08 vps03 clamd: /usr/local/sbin/clamd: unrecognized option `--nofork=yes'
May 4 14:33:08 vps03 clamd: ERROR: Unknown option passed
May 4 14:33:08 vps03 clamd: ERROR: Can't parse command line options
May 4 14:33:08 vps03 systemd: clamd.service: main process exited, code=exited, status=1/FAILURE
May 4 14:33:08 vps03 systemd: Unit clamd.service entered failed state.
May 4 14:33:08 vps03 systemd: clamd.service failed.
May 4 14:33:08 vps03 systemd: clamd.service holdoff time over, scheduling restart.

Editing /etc/systemd/system/clamd.service and removing --nofork=yes solves it but I don't know if removing it has any impact on something else
 
Last edited:
Fixed in CB 2.0 rev. 1543. A quick fix for now:
Code:
perl -pi -e 's|nofork|foreground|g' /etc/systemd/system/clamd.service
systemctl daemon-reload
systemctl restart clamd.service
 
confirmed, after the auto update lastnight clam broke on my centos7 install, same problem as above. Above fix works.
 
Last edited:
Back
Top