-
Notifications
You must be signed in to change notification settings - Fork 705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
freshclam fails to notify clamd via socket, even though it exists (on Kubernetes) #1268
Comments
Hi, I am sorry we missed this issue previously, has it been resolved? Thanks, |
I use the latest docker image (clamav/clamav), and I've got the same warning message: |
@vienleidl , and you have confirmed that the socket exists? |
This just occurred to me -- If we're talking about this happening immediately on startup, after FYI |
@ragusaa The issue has not been resolved, although I worked around it by using a TCP socket instead of a local socket, even though both @micahsnyder thank you for that, I wasn't entirely clear but I am not talking about the update before As for clamd checking for database changes automatically: I did not notice anything in the clamd log. In fact I left the container running for several days during my attempt to make it work and saw nothing. If I recall correctly, I also checked that the database had not been updated by looking at the output of I checked the manpage of Let me know if you'd like me to double-check that |
If you aren't altering the
Then every 10 minutes, I'd expect one of these two log messages, depending if there is an update:
or
|
You are actually correct, |
Describe the bug
I am trying to run a Kubernetes pod based on the
clamav/clamav-debian
image. I've built my own image based on that one (viaFROM clamav/clamav-debian:latest
, and then replacing some config files and the/init
script with a slightly improved one). The issue should not come from my changes to the /init script, as it happened even before I made those changes (and they have to do with graceful shutdown, and not the actual daemon).The problem is that even though clamd is running, has created a local socket, and that socket exists, when freshclam tries to notify it to reload the virus databases, I get the following error in the freshclam log:
However, the socket file exists, and is owned by the correct user and group.
And in fact, I have configured clamd to use that file as a socket, and to use the user
clamav
(excerpt from/etc/clamav/clamd.conf
):Freshclam is configured to notify clamd (excerpt from
/etc/clamav/freshclam.conf
):Note that by default the image places the socket in
/tmp/clamd.sock
. The/tmp
directory is owned by root, so I changed it to/run/clamav/clamd.sock
, since that directory is owned byclamav
and is mentioned in the/init
script. The issue appeared just the same with the socket in/tmp
(and freshclam then accordingly complained that/tmp/clamd.sock
did not exist, which indicates that it is correctly reading/etc/clamav/clamd.conf
).Curiously, if I SSH into the image and run freshclam manually, it manages to notify clamd to reload the database correctly (I use the same arguments for freshclam used by the
/init
script)! It's only the process started by the init script that fails to do that.I have no idea what to do as I believe I've followed the documentation and the error message seems to be wrong.
How to reproduce the problem
I don't know how the problem can be reproduced, if you have an idea please let me know and I can present a reproduction.
I can reproduce the problem 100% of the time on my setup. I can provide more information if necessary.
The text was updated successfully, but these errors were encountered: