[artix-general] [artix-genera][dinit] freshclam-dinit "waits-for" adjustment?

Javier je-vv at e.email
Sat Dec 2 08:26:34 CET 2023


Currently freshclam-dinit has:

> waits-for = pseudofs

However that leads to unsolvable errors at boot:

> ERROR: Can't save PID to file /run/clamav/freshclam.pid: No such file or directory
> ERROR: Can't save PID to file /run/clamav/freshclam.pid: No such file or directory
> ERROR: Can't save PID to file /run/clamav/freshclam.pid: No such file or directory
> ERROR: Can't save PID to file /run/clamav/freshclam.pid: No such file or directory

And the service getting stopped.

A bit better value for "waits-for" is:

> waits-for = network

That also leads the service to fail at boot with:

> ClamAV update process started at Fri Dec  1 23:58:27 2023
> WARNING: Can't query current.cvd.clamav.net
> WARNING: Invalid DNS reply. Falling back to HTTP mode.
> Trying to retrieve CVD header from https://database.clamav.net/daily.cvd
> WARNING: remote_cvdhead: Download failed (6) WARNING:  Message: Couldn't resolve host name
> WARNING: Failed to get daily database version information from server: https://database.clamav.net
> ERROR: check_for_new_database_version: Failed to find daily database using server https://database.clamav.net.
> Trying again in 5 secs...
> Trying to retrieve CVD header from https://database.clamav.net/daily.cvd
> WARNING: remote_cvdhead: Download failed (6) WARNING:  Message: Couldn't resolve host name
> WARNING: Failed to get daily database version information from server: https://database.clamav.net
> ERROR: check_for_new_database_version: Failed to find daily database using server https://database.clamav.net.
> Trying again in 5 secs...
> Trying to retrieve CVD header from https://database.clamav.net/daily.cvd
> ERROR: remote_cvdhead: Download failed (6) ERROR:  Message: Couldn't resolve host name
> WARNING: Failed to get daily database version information from server: https://database.clamav.net
> ERROR: check_for_new_database_version: Failed to find daily database using server https://database.clamav.net.
> Giving up on https://database.clamav.net...

And then the service also gets stopped.  However, here the issue is that at the point "network" completes, it's still too early to be able to access to the internet, which is unfortunate, since that is what can be checked to complete before assuming there's access to internet.

Adding:

> MaxAttempts 30

To:

> /etc/clamav/freshclam.conf

Does helps, even 60 can be used if in need.  Though it would be better to really start freshclam at a point when it's really valid to query the internet...

Thanks !

-- 
Javier

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: OpenPGP digital signature
URL: <https://lists.artixlinux.org/archives/artix-general/attachments/20231202/802ac7eb/attachment.sig>


More information about the artix-general mailing list