logrotate problem

Brian Densmore DensmoreB at ctbsonline.com
Fri Mar 4 16:30:53 CST 2005


> -----Original Message-----
> From: Frank Wiles
> 
> On Fri, 4 Mar 2005 15:04:18 -0600
> "Brian Densmore" wrote:
> 
> ...
> > 
> > I'm getting a system email with the following text.
> > 
> > /etc/cron.daily/logrotate:
> > error running shared postrotate script for 
> /var/log/apache-ssl/*.log 
> > run-parts: /etc/cron.daily/logrotate exited with return code 1
> > 
> > Two things of note. First the log.1 files seems to be the active log
> > files. Secondly the current log files have an older date, the same
> > date as when I think the logrotate started failing on the apache-ssl
> > files. ...
>
>   What is in /etc/logrotate.d/apache or the related logrotate config
>   file? 

dunsmuir:/etc/logrotate.d# cat apache-ssl
/var/log/apache-ssl/*.log {
        weekly
        missingok
        rotate 52
        compress
        delaycompress
        notifempty
        create 640 <uid> <uid2>
        sharedscripts
        postrotate
                /etc/init.d/apache-ssl reload > /dev/null
        endscript
}

*******************
Hmmm ... 

ran "/etc/init.d/apache-ssl reload" manually.

Which causes this to happen:

dunsmuir:/etc/logrotate.d# /etc/init.d/apache-ssl reload
Reloading apache-ssl configurationNo /usr/sbin/apache-ssl found running; none killed. failed

hmm ...
dunsmuir:/etc/logrotate.d# ps aux
USER       PID %CPU %MEM   VSZ  RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.1  1260   72 ?        S     2004   0:33 init [2]
root         2  0.0  0.0     0    0 ?        SW    2004   0:36 [keventd]
root         3  0.0  0.0     0    0 ?        SWN   2004   5:06 [ksoftirqd_CPU0]
root         4  0.0  0.0     0    0 ?        SW    2004  37:15 [kswapd]
root         5  0.0  0.0     0    0 ?        SW    2004   0:00 [bdflush]
...
<uid>    32273  0.0  0.1  3004   72 ?        S    Feb25   0:00 /usr/lib/apache-ssl/gcache 33 /var/run/gcache
<uid>    32274  0.0  2.2 110168 844 ?        S    Feb25   2:03 /usr/sbin/apache-ssl
<uid>    32275  0.0  5.6 110140 2104 ?       S    Feb25   2:10 /usr/sbin/apache-ssl
<uid>    32276  0.0 19.5 110812 7304 ?       S    Feb25   2:55 /usr/sbin/apache-ssl
<uid>    32277  0.0 18.3 110564 6860 ?       S    Feb25   2:09 /usr/sbin/apache-ssl


This also failed, sort of :

dunsmuir:/etc/logrotate.d# /etc/init.d/apache-ssl restart
Reloading apache-ssl modulesstart-stop-daemon: warning: failed to kill 12457: No such process
No process in pidfile `/var/run/apache-ssl.pid' found running; none killed.
Reading key for server www.amason.net:443
Launching... /usr/lib/apache-ssl/gcache
pid=20301

I killed all processes related to apache-ssl and started it from scratch.

What would cause something like that?

Thanks,

Brian





More information about the Kclug mailing list