Hello Guys,
I'm facing a strange problem with freshclam and log rotation using
logrotate. Let me explain ....
Altough i'm not using pre-compiled RPMs, i took some files from the
RPMs. One of these files is the /etc/logrotate.d/freshclam. I did some
adjusts on the user/group, so my file looks like:
#
# Rotate FreshClam daemon log file
#
/var/log/clamav/freshclam.log {
missingok
create 640 vscan vscan
postrotate
/bin/kill -HUP `cat /var/run/clamav/freshclam.pid 2> /dev/null`
2> /dev/null || true
endscript
}
It's working, freshclam.log is getting correctly rotated. The
problem is that after log rotation, i cannot call freshclam from console
anymore.
[EMAIL PROTECTED] ~]# freshclam
ERROR: Problem with internal logger.
[EMAIL PROTECTED] ~]#
Altough freshclam IS working, as I can see activity on the
freshclam.log file, i only get the 'problem with internal logger' when
calling it from the console. A simple stop/start on the service seems to
solve the problem. After stop/start, freshclam keeps running on the
background and can be called from the console as well.
I dont know if this can be the reason for the problem .... watching
the file descriptors through lsof, i can see the freshclam.log file
descriptor:
[EMAIL PROTECTED] ~]# lsof -n | grep "freshclam\.log"
freshclam 20602 vscan 0wW REG 8,3 2076 24510465
/var/log/clamav/freshclam.log
[EMAIL PROTECTED] ~]#
After stop/start, it looks like:
[EMAIL PROTECTED] ~]# lsof -n | grep "freshclam\.log"
freshclam 20360 vscan 3w REG 8,3 2436 24510465
/var/log/clamav/freshclam.log
[EMAIL PROTECTED] ~]#
The different seems to be on the FD field. Before the stop/start it
looks wW, which will give the 'problem with internal logger' error, but
will keep freshclam working fine on background. After stop/start, FD
field will look 3w, which will keep freshclam working both on background
and console.
I have googled and found some users complaining about problems with
logging, but the problems were related to permission on
file/directories, which is not my case. I have checked/rechecked and
things seems fine.
Is this kind of problem known ? Is there any tip/hint on how to
avoid/solve it ?
Thanks for your attentions guys.
--
Atenciosamente / Sincerily,
Leonardo Rodrigues
Solutti Tecnologia
http://www.solutti.com.br
Minha armadilha de SPAM, NÃO mandem email
[EMAIL PROTECTED]
My SPAMTRAP, do not email it
_______________________________________________
http://lurker.clamav.net/list/clamav-users.html