HTTP Anti-Virus Proxy
http://havp.hege.li/forum/

Could not lock Scannerfile: /var/tmp/havp/havp-XXXXXX
http://havp.hege.li/forum/viewtopic.php?f=3&t=381
Page 1 of 1

Author:  niit-tech [ 31 Aug 2008 21:09 ]
Post subject:  Could not lock Scannerfile: /var/tmp/havp/havp-XXXXXX

I am using havp-0.89 in SLES 10 SP1 box.
I am getting "Could not lock Scannerfile" in havp error.log file.

I have used havp before, but never find this kind of error previously. In the forum, I have gone through the discussion related to "Could not lock Scannerfile" where the administrator is using tmpfs filesystem.

For your information, I am using ClamAV scanner with "AllowSupplementaryGroups" to yes in clamd.conf and added clamav user to havp group. In the /etc/fstab file I have the following entry -
/dev/sda9 /var/tmp/havp ext3 acl,user_xattr,mand 1 2

The /var/log/havp, /var/tmp/havp and /var/run/havp are assigned with 770 permission where user and group ownership is given to havp user and havp group respectively.

As per the /var/log/havp/access.log file, it seemed, havp is working good.

Now my question is, how to get rid of this "Could not lock Scannerfile" error? What could be the impact, in case I failed to remove this error?

Please be noted, while working with havp-0.87, things were absolutely perfect with another SLES system.

Please Help :?

Author:  syl [ 02 Sep 2008 14:29 ]
Post subject:  Re: Could not lock Scannerfile: /var/tmp/havp/havp-XXXXXX

Hi,

I think your profile is that you don't rotate your havp log in /var/log/havp/access.log and error.log.

To solve it :
create the following file :
Code:
vi /etc/logrotate.d/havp


and put the following line into it:
/var/log/havp/*log {
rotate 6
size=100k
missingok
daily
sharedscripts
compress
postrotate
/etc/init.d/havp restart
endscript
}


And then to try it with the command line:
Code:
logrotate -f /etc/logrotate.d/havp

Author:  niit-tech [ 02 Sep 2008 21:03 ]
Post subject:  Re: Could not lock Scannerfile: /var/tmp/havp/havp-XXXXXX

Hello syl

Thank for your response.

But I am not clear, how it is related with log rotation? My question is why this particular error is continuously coming in the log? Is that mean, my havp is not working 100% perfectly?

If log rotation is enabled, or if I delete log after stopping havp and start it once again, I think, my problem will not be solved.

Is there any way out? Please explain.

Thanks and Regards

Author:  brian2019 [ 10 Sep 2008 07:04 ]
Post subject:  Re: Could not lock Scannerfile: /var/tmp/havp/havp-XXXXXX

I found the best way to do it was on a loopback device, as opposed to ramdisk. Try creating a loopback device

opback filesystem instead.

#create a file for the loopback filesystem
dd if=/dev/zero of=/havpfs bs=1024 count=30720
#check of /dev/loop0 is free then use it.. if its in use, try loop1, loop2 etc..
losetup /dev/loop0
#attach the virtual filesystem to the loopback device
losetup /dev/loop0 /havpfs
#check the attaching worked ok.
losetup /dev/loop0
#make a filesystem on the loopback device
mkfs.ext3 -m -1 -v /dev/loop0
#make a dir to mount the filesystem
mkdir /mnt/havp
#mount the filesystem
mount -t ext3 /dev/loop0 /mnt/havp -o mand async noatime
#add to fstab for mounting on reboot
/dev/loop0 /havp tmpfs mand,async,noatime 0 0

note the permissions seem to lose on reboot,
One change I made to the havp start script (/etc/init.d/havp) was to chown
the mandatory lock partition, as the owner was not persistant across reboots

start)
echo "Starting HAVP ..."
if [ ! -f $HAVP_BIN ]; then
echo "Error: $HAVP_BIN not found"
exit 5
fi
chown -R clamav /mnt/havp
$HAVP_BIN -c $HAVP_CONFIG
exit $?
;;

Page 1 of 1 All times are UTC + 2 hours [ DST ]
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/