Giter Club home page Giter Club logo

Comments (3)

rhermanek avatar rhermanek commented on July 29, 2024

Hi @philippe-docourt
What version are you using and can you give details on how to reproduce this issue? I cannot replicate it, in my instances I have not yet encountered this issue and every time the Update is running it ends with:
"Clamd successfully notified about the update."

from clamav-rest.

philippe-docourt avatar philippe-docourt commented on July 29, 2024

Hi @rhermanek,
I'm running the container with docker run -p 9000:9000 -itd --name clamav-rest ajilaag/clamav-rest and then I check the log with docker exec -it clamav-rest /bin/sh -c 'cat /var/log/clamav/freshclam.log'.

In fact I let the container run for 3 hours and I have this (full log):

--------------------------------------
ClamAV update process started at Fri Jul 29 15:59:08 2022
WARNING: DNS Update Info disabled. Falling back to HTTP mode.
Trying to retrieve CVD header from https://database.clamav.net/daily.cvd
OK
daily database available for download (remote version: 26615)
Testing database: '/var/lib/clamav/tmp.207ed62282/clamav-86348777e9bd3da33225b93ba0b418e7.tmp-daily.cvd' ...
Database test passed.
daily.cvd updated (version: 26615, sigs: 1992518, f-level: 90, builder: raynman)
Trying to retrieve CVD header from https://database.clamav.net/main.cvd
OK
main database available for download (remote version: 62)
Testing database: '/var/lib/clamav/tmp.207ed62282/clamav-97e438c990dee262ef5a93ced5b385a6.tmp-main.cvd' ...
Database test passed.
main.cvd updated (version: 62, sigs: 6647427, f-level: 90, builder: sigmgr)
Trying to retrieve CVD header from https://database.clamav.net/bytecode.cvd
OK
bytecode database available for download (remote version: 333)
Testing database: '/var/lib/clamav/tmp.207ed62282/clamav-d97167d73ffcc044d1f0c7fc14d730bd.tmp-bytecode.cvd' ...
Database test passed.
bytecode.cvd updated (version: 333, sigs: 92, f-level: 63, builder: awillia2)
WARNING: Clamd was NOT notified: Can't connect to clamd through /run/clamav/clamd.sock: No such file or directory
--------------------------------------
freshclam daemon 0.104.3 (OS: Linux, ARCH: x86_64, CPU: x86_64)
ClamAV update process started at Sun Aug 21 18:23:58 2022
daily database available for update (local version: 26615, remote version: 26634)
Testing database: '/var/lib/clamav/tmp.1cd4298b20/clamav-3492857394631d9cab3ec2feb8aab31b.tmp-daily.cld' ...
Database test passed.
daily.cld updated (version: 26634, sigs: 1998006, f-level: 90, builder: raynman)
main.cvd database is up-to-date (version: 62, sigs: 6647427, f-level: 90, builder: sigmgr)
bytecode.cvd database is up-to-date (version: 333, sigs: 92, f-level: 63, builder: awillia2)
WARNING: Clamd was NOT notified: Can't connect to clamd through /run/clamav/clamd.sock: No such file or directory
--------------------------------------

As a side note, it appears that freshclam does not run every hour (24 times per day by default as mentioned in the documentation/readme). After a check, docker exec -it clamav-rest /bin/sh -c 'echo $SIGNATURE_CHECKS' tells me that the check occurs only twice which explains why I only see one update after 3 hours :-)

from clamav-rest.

rhermanek avatar rhermanek commented on July 29, 2024

Wow, this took me way too long to figure out.
Ok, the reason why it gets an error at first ist because we start freshclam during the docker build which of course cannot connect to clamd because it has not yet been started (using the entrypoint shell script). However, in future updates it will notify correctly:


ClamAV update process started at Fri Jul 29 15:59:08 2022
WARNING: DNS Update Info disabled. Falling back to HTTP mode.
Trying to retrieve CVD header from https://database.clamav.net/daily.cvd
OK
daily database available for download (remote version: 26615)
Testing database: '/var/lib/clamav/tmp.207ed62282/clamav-86348777e9bd3da33225b93ba0b418e7.tmp-daily.cvd' ...
Database test passed.
daily.cvd updated (version: 26615, sigs: 1992518, f-level: 90, builder: raynman)
Trying to retrieve CVD header from https://database.clamav.net/main.cvd
OK
main database available for download (remote version: 62)
Testing database: '/var/lib/clamav/tmp.207ed62282/clamav-97e438c990dee262ef5a93ced5b385a6.tmp-main.cvd' ...
Database test passed.
main.cvd updated (version: 62, sigs: 6647427, f-level: 90, builder: sigmgr)
Trying to retrieve CVD header from https://database.clamav.net/bytecode.cvd
OK
bytecode database available for download (remote version: 333)
Testing database: '/var/lib/clamav/tmp.207ed62282/clamav-d97167d73ffcc044d1f0c7fc14d730bd.tmp-bytecode.cvd' ...
Database test passed.
bytecode.cvd updated (version: 333, sigs: 92, f-level: 63, builder: awillia2)
WARNING: Clamd was NOT notified: Can't connect to clamd through /run/clamav/clamd.sock: No such file or directory
--------------------------------------
freshclam daemon 0.104.3 (OS: Linux, ARCH: x86_64, CPU: x86_64)
ClamAV update process started at Sat Jul 30 13:04:22 2022
daily.cvd database is up-to-date (version: 26615, sigs: 1992518, f-level: 90, builder: raynman)
main.cvd database is up-to-date (version: 62, sigs: 6647427, f-level: 90, builder: sigmgr)
bytecode.cvd database is up-to-date (version: 333, sigs: 92, f-level: 63, builder: awillia2)
--------------------------------------
Received signal: wake up
ClamAV update process started at Sun Jul 31 01:04:22 2022
daily.cvd database is up-to-date (version: 26615, sigs: 1992518, f-level: 90, builder: raynman)
main.cvd database is up-to-date (version: 62, sigs: 6647427, f-level: 90, builder: sigmgr)
bytecode.cvd database is up-to-date (version: 333, sigs: 92, f-level: 63, builder: awillia2)
--------------------------------------
...
--------------------------------------
Received signal: wake up
ClamAV update process started at Wed Aug  3 13:04:22 2022
daily database available for update (local version: 26615, remote version: 26616)
Testing database: '/var/lib/clamav/tmp.7040353f68/clamav-ad175d18ee56351ab8914034c25345b9.tmp-daily.cld' ...
Database test passed.
daily.cld updated (version: 26616, sigs: 1993363, f-level: 90, builder: raynman)
main.cvd database is up-to-date (version: 62, sigs: 6647427, f-level: 90, builder: sigmgr)
bytecode.cvd database is up-to-date (version: 333, sigs: 92, f-level: 63, builder: awillia2)
Clamd successfully notified about the update.

So we can close this issue regarding clamd not being able to get notified.

Thanks for the input regarding the signature-checks default value, I will change that.

from clamav-rest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.