Freshclam Cron error after Clamav Update

Forum for getting help with Project Gamera, Spamassassin, Clamav, qmail-scanner and other anti-spam tools.
User avatar
JnascECSI
Forum Regular
Forum Regular
Posts: 306
Joined: Mon Apr 14, 2008 8:29 am
Location: Rhode Island

Freshclam Cron error after Clamav Update

Unread post by JnascECSI »

After updating to clamav-0.9.4-2.el5.art yesterday, we have been getting the following error every hour on the cron task. Any ideas what could be wrong? This was'nt happening the day before when the intial 9.4 was released.

Code: Select all

/etc/cron.hourly/freshclam:

ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).
ERROR: /var/log/clamav/freshclam.log is locked by another process
Also does'nt fix the issue after restarting the deamon.

Code: Select all

[xxxxx@xxxxx ~]# freshclam
ERROR: /var/log/clamav/freshclam.log is locked by another process
ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).
[xxxxx@xxxxx ~]# rpm -q clamav
clamav-0.96.4-2.el5.art
[xxxxx@xxxxx ~]# service clamd restart
Stopping Clam AntiVirus Daemon:                            [  OK  ]
Starting Clam AntiVirus Daemon:                            [  OK  ]
[xxxxx@xxxxx ~]# freshclam
ERROR: /var/log/clamav/freshclam.log is locked by another process
ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).
[xxxxx@xxxxx ~]#
James Nascimento
Chief Information Officer
East Commerce Solutions, Inc.
22 Morris Lane
East Providence, RI 02914
Ph. 800-527-5395 x263
Fax. 888-999-5891
faris
Long Time Forum Regular
Long Time Forum Regular
Posts: 2321
Joined: Thu Dec 09, 2004 11:19 am

Re: Freshclam Cron error after Clamav Update

Unread post by faris »

The "locked by another process" just means that freshclam is already running (I think). Maybe it would be worth checking to see if there might not be a freshclam process that's hung somehow?

I've just updated it on 4 systems and one of them issued that error but only once - it was fine moments later. And I had run it immediately after updating....I think it was just slow to update automatically.

Faris.
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Re: Freshclam Cron error after Clamav Update

Unread post by breun »

The updated packages replace the configuration files, which specify the user clamd runs as. Supposedly, running 'asl -s -f' fixes this (only on ASL servers of course), but I tend to just manually set 'User root' in /etc/clamd.conf ('qscand' on non-ASL qmail-scanner server) and I recursively chown /var/clamav and /var/log/clamav to root:root (or qscand:qscand on non-ASL qmail-scanner servers) and then restart clamd.

Run 'freshclam' afterwards to verify you get no more errors.

I think the clam* packages could do a better job of not messing with a working setup.
Lemonbit Internet Dedicated Server Management
User avatar
JnascECSI
Forum Regular
Forum Regular
Posts: 306
Joined: Mon Apr 14, 2008 8:29 am
Location: Rhode Island

Re: Freshclam Cron error after Clamav Update

Unread post by JnascECSI »

Thanks guys,
I rebooted a couple times and retarted clamd also a couple times and it seems to have went away.
James Nascimento
Chief Information Officer
East Commerce Solutions, Inc.
22 Morris Lane
East Providence, RI 02914
Ph. 800-527-5395 x263
Fax. 888-999-5891
Post Reply