Comments (3)
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.
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.
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)
- Data directory
- Clamav Vulnerability HOT 1
- Authentication
- Security updates needed HOT 2
- HTTP/2 clear (h2c) support HOT 7
- Feature: Support proxy in entrypoint for freshclam HOT 1
- Bug: service does not return proper status when file size is greater than `MAX_FILE_SIZE` value
- Is there /health check for this REST API?
- Register scanHandlerBody function
- Dependency Dashboard
- Fail update, and fail create tmp file
- Start Antivirus Service than check for Virus updates
- how to define data directory (Volume)
- The SSL certificate is invalid HOT 2
- Updating the signature database HOT 1
- ClamAV vulnerability HOT 2
- Non-root support HOT 5
- Suggestion: wrap multipart scan response in json array brackets, include faulty status for missing filename
- Scanned filename in clamd logs HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clamav-rest.