HTTP Anti-Virus Proxy

Official HAVP Support Forum
Registration disabled, I'm tired of spambots. E-mail havp@hege.li if you have questions.
HAVP project is pretty much frozen/abandoned at this time anyway.
It is currently 22 Jun 2014 09:52

All times are UTC + 2 hours [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: HAVP & log rotation
PostPosted: 25 Sep 2006 10:13 
Offline

Joined: 16 Sep 2006 07:25
Posts: 20
Every morning, at approximately the same time, HAVP dies with no error messages.

This event appears to coincide with log rotation - i.e. as soon as I realise it has died I go to check havp.log and it is blank and recent entries are in havp.log.1.gz.

Does HAVP handle its own log rotation?

If log rotation is being handled by my Debian system, would the closing / renaming / etc of the log file cause HAVP to crash?
(hopefully this is a case of just needing to do a controlled log rotation with daemon restart)

Thanks in advance for your help.

Os


Top
 Profile  
 
 Post subject:
PostPosted: 25 Sep 2006 14:50 
Offline
HAVP Developer

Joined: 27 Feb 2006 18:12
Posts: 687
Location: Finland
I guess you are using debian package if rotation is done? Havp itself doesn't do it.

Version 0.82 can do log rotation. When you send HUP signal, it reopens the files. Though you should not compress the old ones right away (logrotate has delaycompress option), as it could take a little time for old processes to stop writing there.

In any case, I tested and HAVP doesn't crash here if you move and compress the current logfiles.

Cheers,
Henrik


Top
 Profile  
 
 Post subject: HAVP & log rotation
PostPosted: 15 Oct 2006 12:28 
Offline

Joined: 16 Sep 2006 07:25
Posts: 20
Sending the HUP signal does not appear to work in the debian maintained version of HAVP. In fact the "reload" function is commented out in the init.d script.

#reload)
#
# If the daemon can reload its config files on the fly
# for example by sending it SIGHUP, do it here.
#
# If the daemon responds to changes in its config file
# directly anyway, make this a do-nothing entry.
#
# echo "Reloading $DESC configuration files."
# start-stop-daemon --stop --signal 1 --quiet --pidfile \
# /var/run/$NAME.pid --exec $DAEMON
#;;

I have changed the debian logrotate script so that it restarts havp after logrotation by adding

postrotate
invoke-rc.d havp restart
endscript

While generally this works, it recently failed with the following error:

Restarting havp: Starting HAVP Version: 0.82
Could not create server (already running?)
Exiting..
invoke-rc.d: initscript havp, action "restart" failed.
error: error running shared postrotate script for /var/log/havp/access.log /var/log/havp/havp.log
run-parts: /etc/cron.daily/logrotate exited with return code 1

Any ideas on how I could prevent the restart from failing would be greatly appreciated - (perhaps I need to set a pause between starting and stopping the havp daemon, or maybe the init.d script needs to be modified to wait until the havp daemon has completely been killed before starting a new one)

Os


Top
 Profile  
 
 Post subject: Re: HAVP & log rotation
PostPosted: 15 Oct 2006 12:48 
Offline
HAVP Developer

Joined: 27 Feb 2006 18:12
Posts: 687
Location: Finland
Osiris X wrote:
Sending the HUP signal does not appear to work in the debian maintained version of HAVP. In fact the "reload" function is commented out in the init.d script.


Why don't you just do:

postrotate
killall -HUP havp
endscript

HUP signal does work. If reload is commented out in init-script, then don't use it (the script). :)

Cheers,
Henrik


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 2 hours [ DST ]


Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group