0

I am currently following this guide on setting up ClamAV on my AlmaLinux 9.3 machine however at Step 11 I cannot start the clamd@service and wanted to know if anyone else has also had this issue as I cannot find much from other sources.

[root@localhost tester]# sudo systemctl status clamd@service
× [email protected] - clamd scanner (service) daemon
     Loaded: loaded (/usr/lib/systemd/system/[email protected]; disabled; preset: disabled)
     Active: failed (Result: exit-code) since Thu 2023-12-28 12:08:15 GMT; 3min 26s ago
       Docs: man:clamd(8)
             man:clamd.conf(5)
             https://www.clamav.net/documents/
    Process: 6728 ExecStart=/usr/sbin/clamd -c /etc/clamd.d/service.conf (code=exited, status=1/FAILURE)
        CPU: 3ms

Dec 28 12:08:15 localhost.localdomain systemd[1]: [email protected]: Scheduled restart job, restart counter is at 5.
Dec 28 12:08:15 localhost.localdomain systemd[1]: Stopped clamd scanner (service) daemon.
Dec 28 12:08:15 localhost.localdomain systemd[1]: [email protected]: Start request repeated too quickly.
Dec 28 12:08:15 localhost.localdomain systemd[1]: [email protected]: Failed with result 'exit-code'.
Dec 28 12:08:15 localhost.localdomain systemd[1]: Failed to start clamd scanner (service) daemon.

I executed the following command as per the Terminal output recommended:

$ journalctl -xeu [email protected]

░░ The process' exit code is 'exited' and its exit status is 1.
Dec 28 12:45:18 localhost.localdomain systemd[1]: [email protected]: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://access.redhat.com/support
░░
░░ The unit [email protected] has entered the 'failed' state with result 'exit-code'.
Dec 28 12:45:18 localhost.localdomain systemd[1]: Failed to start clamd scanner (service) daemon.
░░ Subject: A start job for unit [email protected] has failed
░░ Defined-By: systemd
░░ Support: https://access.redhat.com/support
░░
░░ A start job for unit [email protected] has finished with a failure.
░░
░░ The job identifier is 7444 and the job result is failed.
Dec 28 12:45:18 localhost.localdomain systemd[1]: [email protected]: Scheduled restart job, restart counter is at 5.
░░ Subject: Automatic restarting of a unit has been scheduled
░░ Defined-By: systemd
░░ Support: https://access.redhat.com/support
░░
░░ Automatic restarting of the unit [email protected] has been scheduled, as the result for
░░ the configured Restart= setting for the unit.
Dec 28 12:45:18 localhost.localdomain systemd[1]: Stopped clamd scanner (service) daemon.
░░ Subject: A stop job for unit [email protected] has finished
░░ Defined-By: systemd
░░ Support: https://access.redhat.com/support
░░
░░ A stop job for unit [email protected] has finished.
░░
░░ The job identifier is 7568 and the job result is done.
Dec 28 12:45:18 localhost.localdomain systemd[1]: [email protected]: Start request repeated too quickly.
Dec 28 12:45:18 localhost.localdomain systemd[1]: [email protected]: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://access.redhat.com/support
░░
░░ The unit [email protected] has entered the 'failed' state with result 'exit-code'.
Dec 28 12:45:18 localhost.localdomain systemd[1]: Failed to start clamd scanner (service) daemon.
░░ Subject: A start job for unit [email protected] has failed
░░ Defined-By: systemd
░░ Support: https://access.redhat.com/support
░░
░░ A start job for unit [email protected] has finished with a failure.
░░
░░ The job identifier is 7568 and the job result is failed.
9
  • Have you looked at the logs? Dec 28, 2023 at 12:33
  • Unfortunately, I am still new to all of this, where would the logs be located? Would be it be something like /var/log/?
    – hymcode
    Dec 28, 2023 at 12:37
  • 1
    Yes. You can find out which log file by using Google rather than waiting for it here. If you're going to use Linux or any other Unix-like OS, you'll need to become familiar with logs. Dec 28, 2023 at 12:41
  • Yes, slowly but surely I hope to familiarise myself with log files and how they are handled in Linux. I tried to Google the issue, but I wasn't able to find anything concrete hence I tried my luck here.
    – hymcode
    Dec 28, 2023 at 12:47
  • Clamd is a tool for detectting Windows viruses, in email. Is this (serving email to Windows users) your use case, or are you wasting time?
    – waltinator
    Dec 28, 2023 at 13:09

1 Answer 1

0

Copy your /etc/clamd.d/scan.conf to /etc/clamd.d/service.conf and make the modifications in step 11 to that file.

The systemd unit they are calling has an instance name, @, which is passed to a variable as the unit and referenced as %i. So, when you are trying to call systemctl start clamd@service, it is referencing /etc/clamd.d/service.conf per the unit file, which does not exist.

If we create the configuration file the unit is looking for, it should start.

For reference, the unit file is /usr/lib/systemd/system/[email protected]

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .