[SOLVED] After upgrade to PMG 7.0 (Debian Bullseye): Can't save PID to file /var/run/clamav/freshclam.pid

larsen

Well-Known Member
Feb 28, 2020
158
18
58
I noticed this in the logs (journalctl -p 4) after having updated PMG:
Code:
Jul 15 17:10:31 mygateway freshclam[307]: Can't save PID to file /var/run/clamav/freshclam.pid: No such file or directory
Jul 15 17:10:31 mygateway systemd[1]: clamav-freshclam.service: Failed with result 'exit-code'.
Temporary workaround is to
Code:
mkdir /run/clamav
but this directory vanishes on reboot.
 
can you post a complete journal output from a single boot?
also what does

systemctl status clamav-daemon

say?
AFAICS, thats the service responsible for creating the directory, since it has a

Code:
ExecStartPre=-/bin/mkdir -p /run/clamav
 
Code:
systemctl status clamav-daemon
(snip)
  Condition: start condition failed at Fri 2021-07-16 12:52:56 CEST; 4min 39s ago
             └─ ConditionPathExistsGlob=/var/lib/clamav/main.{c[vl]d,inc} was not met

mygateway:~# ll /var/lib/clamav
total 55M
-rw-r--r-- 1 clamav clamav 55M 2021-07-15 17:15 daily.cvd
-rw-r--r-- 1 root   root    69 2021-07-13 10:29 mirrors.dat
 

Attachments

can you try to run 'freshclam -v' ?
do you know how the 'main.cvd' got deleted ?
 
No idea. While updating to Bullseye perhaps?

freshclam updated the database and finished with
Code:
WARNING: Clamd was NOT notified: Can't connect to clamd through /var/run/clamav/clamd.ctl: No such file or directory

I was then able to start the daemon. After a reboot it was still ok.