thttpd: broken log rotation

Bug #131363 reported by Jonas
2
Affects Status Importance Assigned to Milestone
thttpd (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: thttpd

I installed ubuntu 7.04 server and added thttpd using apt-get. At first all seemed fine, webpages were served and entries were added to the logfile. However after a few days I noticed that the logfile /var/log/thttpd were empty. It seems like thttpd is not able to handle the transition when the logfile is rotated and stop writing or begin writing to something like /dev/null.

Revision history for this message
Jonas (jonass) wrote :

A brute force workaround that seems to work for me is to replace everything in the postrotate clause in /etc/logrotate.d/thttpd with this:

        /usr/bin/killall thttpd
        /etc/init.d/thttpd restart

The result is:

/var/log/thttpd.log {
    rotate 14
    daily
    compress
    missingok
    delaycompress
    postrotate
        /usr/bin/killall thttpd
        /etc/init.d/thttpd restart
    endscript
}

Revision history for this message
frotz (frotz) wrote :

This might be a symptom of bug #123155. The solution is to edit /etc/init.d/thttpd and replace all lines using grep to match this:

    if ps ax | grep -q "^ *$PID "; then

Notice the space and asterisk before $PID and the space after.

Daniel T Chen (crimsun)
Changed in thttpd:
status: New → Confirmed
era (era)
summary: - thttpd: broken logging
+ thttpd: broken log rotation
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.