Page 1 of 1

systemd - Issues when restarting clamd service

PostPosted: Dec 8th, '13, 02:30
by linuxdad
OK, can someone please explain the systemctl for me? Apparently the /etc/init.d/{daemon script} has changed from other distributions.

I am trying to restart the clamd daemon, a Mageia provided package. Here is what I am performing and receiving:

Code: Select all
[root@ns init.d]# service clamd restart
Restarting clamd (via systemctl):  Job for clamd.service failed. See 'systemctl status clamd.service' and 'journalctl -n' for details.
                                                                [FAILED]


So investigating the error message, here is what I see
Code: Select all
[root@ns ~]# systemctl status clamd.service
clamd.service - LSB: An AntiVirus Server
          Loaded: loaded (/etc/rc.d/init.d/clamd)
          Active: activating (start) since Sat, 2013-12-07 19:22:57 EST; 12s ago
         Control: 7829 (clamd)
          CGroup: name=systemd:/system/clamd.service
                  â 5833 clamd
                  â 7829 /bin/sh /etc/rc.d/init.d/clamd start
                  â 7844 /bin/bash -c ulimit -S -c 0 >/dev/null 2>&1 ; clam...
                  â 7845 clamd

Dec 07 19:22:56 ns.IT-Security-inc.com systemd[1]: Starting LSB: An AntiVirus...
Dec 07 19:22:57 ns.IT-Security-inc.com clamd[7845]: clamd daemon 0.97.8 (OS: ...
Dec 07 19:22:57 ns.IT-Security-inc.com clamd[7845]: Running as user defang (U...
Dec 07 19:22:57 ns.IT-Security-inc.com clamd[7845]: Log file size limited to ...
Dec 07 19:22:57 ns.IT-Security-inc.com clamd[7845]: Reading databases from /v...
Dec 07 19:22:57 ns.IT-Security-inc.com clamd[7845]: Not loading PUA signatures.
Dec 07 19:22:57 ns.IT-Security-inc.com clamd[7845]: Bytecode: Security mode s...
Dec 07 19:23:08 ns.IT-Security-inc.com clamd[7845]: Loaded 3007090 signatures.


Unfortunately the same clamd daemon is still running. The restart does not appear to work. What is interfering with this?

Re: Cannot Restart service....

PostPosted: Dec 8th, '13, 20:05
by doktor5000
Well restart works, but some job started by clamd didn't come back with return code 0 probably, that's what systemd tells you exactly:
Job for clamd.service failed. See 'systemctl status clamd.service' and 'journalctl -n' for details.



Please use a wider terminal so the output is not truncated and run again
Code: Select all
systemctl -n75 -a status clamd.service
or use
Code: Select all
journalctl -a --no-pager -n75 -u clamd
to see the last 75 lines of clamd related logs.