logrotate problem
Frank Wiles
frank at wiles.org
Mon Mar 7 08:45:11 CST 2005
On Fri, 4 Mar 2005 16:30:53 -0600
"Brian Densmore" <DensmoreB at ctbsonline.com> wrote:
> 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?
If Apache exits oddly and doesn't clean up it's .pid file the init
scripts get confused.
As long as a /etc/init.d/apache-ssl reload works your logrotate
should continue to work.
---------------------------------
Frank Wiles <frank at wiles.org>
http://www.wiles.org
---------------------------------
More information about the Kclug
mailing list