[artix-general] [s6] clamd + freshclam configs and internet connectivity

Chris Cromer cromer at artixlinux.org
Tue Sep 21 08:21:20 CEST 2021


You could try to implement net-online from OpenRC in s6:
https://github.com/OpenRC/openrc/blob/master/init.d/net-online.in

Basically an infinite loop with a configurable timeout that pings a url/ip over and over until it can connect, so that service gets marked as "up" once the ping succeeds.

I am not an s6 expert, so maybe Dudeman guy might have an idea or be able to implement this.

⁣--
Chris Cromer
Artix Linux Developer​

On Sep 20, 2021, 11:23 PM, at 11:23 PM, Javier <je-vv at e.email> wrote:
>Hi,
>
>I'm wondering if I should comment out:
>
>> LogFile /var/log/clamav/clamd.log
>
>from /etc/clamav/clamd.conf, and:
>
>> UpdateLogFile /var/log/clamav/freshclam.log
>
>from /etc/clamav/freshclam.conf
>
>Also I'm wondering if there's a way for s6 services/oneshots to know if
>there's already internet connectivity available (not that the ethernet
>interfaces are up, or that dhcpcd for example is up, but rather that
>there's internet up and running).  I believe since last s6 upgrade
>(last week), now freshclam starts too early, and fills the starting
>console with inability to download the DB...  See logs:
>
>> 2021-09-20 20:14:32.645666876  ERROR: Problem with internal logger
>(UpdateLogFile = /var/log/clamav/freshclam.log).
>> 2021-09-20 20:14:32.645762441  ERROR: initialize: libfreshclam init
>failed.
>> 2021-09-20 20:14:32.645768452  ERROR: Initialization error!
>> 2021-09-20 20:14:32.661246349  ERROR: /var/log/clamav/freshclam.log
>is locked by another process
>> 2021-09-20 20:14:33.516879873  ERROR: Problem with internal logger
>(UpdateLogFile = /var/log/clamav/freshclam.log).
>> 2021-09-20 20:14:33.525522860  ERROR: initialize: libfreshclam init
>failed.
>> 2021-09-20 20:14:33.525591955  ERROR: Initialization error!
>> 2021-09-20 20:14:33.526189974  ERROR: /var/log/clamav/freshclam.log
>is locked by another process
>> 2021-09-20 20:14:34.481701826  ERROR: Problem with internal logger
>(UpdateLogFile = /var/log/clamav/freshclam.log).
>> 2021-09-20 20:14:34.485201946  ERROR: initialize: libfreshclam init
>failed.
>> 2021-09-20 20:14:34.485255360  ERROR: Initialization error!
>> 2021-09-20 20:14:34.485807613  ERROR: /var/log/clamav/freshclam.log
>is locked by another process
>> 2021-09-20 20:14:35.482655430  ERROR: Problem with internal logger
>(UpdateLogFile = /var/log/clamav/freshclam.log).
>> 2021-09-20 20:14:35.482720095  ERROR: initialize: libfreshclam init
>failed.
>> 2021-09-20 20:14:35.482758594  ERROR: Initialization error!
>> 2021-09-20 20:14:35.483257024  ERROR: /var/log/clamav/freshclam.log
>is locked by another process
>> 2021-09-20 20:14:36.483704169  ERROR: Problem with internal logger
>(UpdateLogFile = /var/log/clamav/freshclam.log).
>> 2021-09-20 20:14:36.488522094  ERROR: initialize: libfreshclam init
>failed.
>> 2021-09-20 20:14:36.488574701  ERROR: Initialization error!
>> 2021-09-20 20:14:36.489075278  ERROR: /var/log/clamav/freshclam.log
>is locked by another process
>> 2021-09-20 20:14:37.489173050  ERROR: Problem with internal logger
>(UpdateLogFile = /var/log/clamav/freshclam.log).
>> 2021-09-20 20:14:37.489193288  ERROR: initialize: libfreshclam init
>failed.
>> 2021-09-20 20:14:37.489198444  ERROR: Initialization error!
>> 2021-09-20 20:14:37.489655235  ERROR: /var/log/clamav/freshclam.log
>is locked by another process
>> 2021-09-20 20:14:38.489196317  ERROR: Problem with internal logger
>(UpdateLogFile = /var/log/clamav/freshclam.log).
>> 2021-09-20 20:14:38.489275089  ERROR: initialize: libfreshclam init
>failed.
>> 2021-09-20 20:14:38.489312739  ERROR: Initialization error!
>> 2021-09-20 20:14:38.489830220  ERROR: /var/log/clamav/freshclam.log
>is locked by another process
>> 2021-09-20 20:14:39.486066312  ERROR: Problem with internal logger
>(UpdateLogFile = /var/log/clamav/freshclam.log).
>> 2021-09-20 20:14:39.488542981  ERROR: initialize: libfreshclam init
>failed.
>> 2021-09-20 20:14:39.488600637  ERROR: Initialization error!
>> 2021-09-20 20:14:39.489145708  ERROR: /var/log/clamav/freshclam.log
>is locked by another process
>> 2021-09-20 20:14:40.489017143  ERROR: Problem with internal logger
>(UpdateLogFile = /var/log/clamav/freshclam.log).
>> 2021-09-20 20:14:40.489097324  ERROR: initialize: libfreshclam init
>failed.
>> 2021-09-20 20:14:40.489135807  ERROR: Initialization error!
>> 2021-09-20 20:14:40.489652317  ERROR: /var/log/clamav/freshclam.log
>is locked by another process
>> 2021-09-20 20:14:41.492482369  ERROR: Problem with internal logger
>(UpdateLogFile = /var/log/clamav/freshclam.log).
>> 2021-09-20 20:14:41.495202256  ERROR: initialize: libfreshclam init
>failed.
>> 2021-09-20 20:14:41.495259903  ERROR: Initialization error!
>> 2021-09-20 20:14:41.495833709  ERROR: /var/log/clamav/freshclam.log
>is locked by another process
>> 2021-09-20 20:14:42.492479416  ERROR: Problem with internal logger
>(UpdateLogFile = /var/log/clamav/freshclam.log).
>> 2021-09-20 20:14:42.492561067  ERROR: initialize: libfreshclam init
>failed.
>> 2021-09-20 20:14:42.492599624  ERROR: Initialization error!
>> 2021-09-20 20:14:42.493123969  ERROR: /var/log/clamav/freshclam.log
>is locked by another process
>> 2021-09-20 20:14:43.490707475  ClamAV update process started at Mon
>Sep 20 20:14:43 2021
>> 2021-09-20 20:14:43.495391476  WARNING: Can't query
>current.cvd.clamav.net
>> 2021-09-20 20:14:43.495462233  WARNING: Invalid DNS reply. Falling
>back to HTTP mode.
>> 2021-09-20 20:14:43.495693667  Trying to retrieve CVD header from
>https://database.clamav.net/daily.cvd
>> 2021-09-20 20:14:43.496772814  WARNING: remote_cvdhead: Download
>failed (6) WARNING:  Message: Couldn't resolve host name
>> 2021-09-20 20:14:43.496785468  WARNING: Failed to get daily database
>version information from server: https://database.clamav.net
>> 2021-09-20 20:14:43.496793499  ERROR: check_for_new_database_version:
>Failed to find daily database using server https://database.clamav.net.
>> 2021-09-20 20:14:43.496798150  Trying again in 5 secs...
>> 2021-09-20 20:14:48.497159402  Trying to retrieve CVD header from
>https://database.clamav.net/daily.cvd
>> 2021-09-20 20:14:48.986050859  daily.cld database is up-to-date
>(version: 26298, sigs: 1934493, f-level: 90, builder: raynman)
>> 2021-09-20 20:14:48.986067873  Trying to retrieve CVD header from
>https://database.clamav.net/main.cvd
>> 2021-09-20 20:14:49.221972555  main.cld database is up-to-date
>(version: 62, sigs: 6647427, f-level: 90, builder: sigmgr)
>> 2021-09-20 20:14:49.221988805  Trying to retrieve CVD header from
>https://database.clamav.net/bytecode.cvd
>> 2021-09-20 20:14:49.409622147  bytecode.cld database is up-to-date
>(version: 333, sigs: 92, f-level: 63, builder: awillia2)
>
>On the console what I get to see is that it couldn't download the daily
>DB, not the whole thing...  About conflicting logging, perhaps I
>actually can extend those configs to ALL services/oneshots, if managed
>by s6...  For example, perhaps I should remove:
>
>> log_file             "/var/log/mpd.log
>
>From /etc/mpd.conf, and the same for all other services/oneshots...  Is
>that right?  Also, what about internet connection discovery as a
>dependency to services, which depend on having internet access?
>
>Thanks !
>
>-- 
>Javier
>
>
>------------------------------------------------------------------------
>
>-- 
>artix-general mailing list
>artix-general at artixlinux.org
>https://lists.artixlinux.org/listinfo/artix-general
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.artixlinux.org/archives/artix-general/attachments/20210921/9ff65376/attachment.htm>


More information about the artix-general mailing list