ClamD 服务无法启动

ClamD 服务无法启动

我目前正在关注这个指导然而ClamAV在我的机器上设置时AlmaLinux 9.3第11步我无法启动clamd@service并想知道其他人是否也遇到过这个问题,因为我无法从其他来源找到太多信息。

[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.

我根据建议的终端输出执行了以下命令:

$ 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.

答案1

将您的/etc/clamd.d/scan.conf内容复制/etc/clamd.d/service.conf到该文件并在步骤 11 中进行修改。

他们调用的 systemd 单元有一个实例名称 ,@它作为单元传递给变量并引用为%i。因此,当您尝试调用 时systemctl start clamd@service,它正在引用/etc/clamd.d/service.conf每个不存在的单元文件。

如果我们创建了设备正在寻找的配置文件,它就应该启动。

作为参考,单元文件是/usr/lib/systemd/system/[email protected]

相关内容