Comment 4 for bug 2046582

Revision history for this message
Christian Ehrhardt  (paelzer) wrote : Re: Clamav recommends install new version from app, then sudo freshclam gives error- cant parse

To be clear, As I understand it, bug 2046581 is about the "Your ClamAV installation is OUTDATED!" message.
And this one is about the complain that the .conf file isn't there.

Running freshclam manually as you did should usually not work and run into this:

ERROR: /var/log/clamav/freshclam.log is locked by another process
ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).
ERROR: initialize: libfreshclam init failed.
ERROR: Initialization error!

Because right after install it works and is active in the background.

root@f:~# systemctl status clamav-freshclam.service
● clamav-freshclam.service - ClamAV virus database updater
     Loaded: loaded (/lib/systemd/system/clamav-freshclam.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2024-01-02 12:01:24 UTC; 11min ago
       Docs: man:freshclam(1)
             man:freshclam.conf(5)
             https://docs.clamav.net/
   Main PID: 3128 (freshclam)
      Tasks: 1 (limit: 38247)
     Memory: 7.0M
        CPU: 20.458s
     CGroup: /system.slice/clamav-freshclam.service
             └─3128 /usr/bin/freshclam -d --foreground=true

Jan 02 12:01:39 f freshclam[3128]: Tue Jan 2 12:01:39 2024 -> daily.cvd updated (version: 27142, sigs: 2050085, f-level: 90, builder: raynman)
Jan 02 12:01:39 f freshclam[3128]: Tue Jan 2 12:01:39 2024 -> main database available for download (remote version: 62)
Jan 02 12:02:03 f freshclam[3128]: Tue Jan 2 12:02:03 2024 -> Testing database: '/var/lib/clamav/tmp.4e9c5b0713/clamav-1136c9f80d7afd14a1faaf58bea4ac66.tmp-main.cvd' ...
Jan 02 12:02:10 f freshclam[3128]: Tue Jan 2 12:02:10 2024 -> Database test passed.
Jan 02 12:02:10 f freshclam[3128]: Tue Jan 2 12:02:10 2024 -> main.cvd updated (version: 62, sigs: 6647427, f-level: 90, builder: sigmgr)
Jan 02 12:02:10 f freshclam[3128]: Tue Jan 2 12:02:10 2024 -> bytecode database available for download (remote version: 334)
Jan 02 12:02:10 f freshclam[3128]: Tue Jan 2 12:02:10 2024 -> Testing database: '/var/lib/clamav/tmp.4e9c5b0713/clamav-5166218e129a54860e985aa9ae7009e1.tmp-bytecode.cvd' ...
Jan 02 12:02:10 f freshclam[3128]: Tue Jan 2 12:02:10 2024 -> Database test passed.
Jan 02 12:02:10 f freshclam[3128]: Tue Jan 2 12:02:10 2024 -> bytecode.cvd updated (version: 334, sigs: 91, f-level: 90, builder: anvilleg)
Jan 02 12:02:10 f freshclam[3128]: Tue Jan 2 12:02:10 2024 -> !NotifyClamd: Can't find or parse configuration file /etc/clamav/clamd.conf

All fine actually ...

Note, even seeing this is fine:
  !NotifyClamd: Can't find or parse configuration file /etc/clamav/clamd.conf

This is for the daemon, which many people have not installed (it consumed disk activity and CPU to scan in background).

If you'd also install the daemon you'd have it
$ apt install clamav-daemon
$ ll /etc/clamav/clamd.conf
-rw-r--r-- 1 root root 1994 Jan 2 12:43 /etc/clamav/clamd.conf

And it is ok to not notify a non installed daemon.

---

Only if you stop the service you can ever start it directly.
And even then it works on a clean install all is fine

root@f:~# systemctl stop clamav-freshclam.service
root@f:~# /usr/bin/freshclam
Tue Jan 2 12:45:29 2024 -> ClamAV update process started at Tue Jan 2 12:45:29 2024
Tue Jan 2 12:45:29 2024 -> ^Your ClamAV installation is OUTDATED!
Tue Jan 2 12:45:29 2024 -> ^Local version: 0.103.9 Recommended version: 0.103.11
Tue Jan 2 12:45:29 2024 -> DON'T PANIC! Read https://docs.clamav.net/manual/Installing.html
Tue Jan 2 12:45:29 2024 -> daily.cvd database is up-to-date (version: 27142, sigs: 2050085, f-level: 90, builder: raynman)
Tue Jan 2 12:45:29 2024 -> main.cvd database is up-to-date (version: 62, sigs: 6647427, f-level: 90, builder: sigmgr)
Tue Jan 2 12:45:29 2024 -> bytecode.cvd database is up-to-date (version: 334, sigs: 91, f-level: 90, builder: anvilleg)
root@f:~# echo $?
0

This is a one-shot, but it worked just fine.

So - considering this bug being about the "can not parse" it is not a problem IMHO.
Setting this aspect to Incomplete