[ale] [HELP] - errors rotating logs
Raptor
raptor at mindspring.com
Sun Nov 7 10:39:50 EST 1999
I've come to the list with this problem before:
> I've gotten some mail to the root account from the system saying,
> "Error rotating logs". It's talking about the logs in /etc/httpd/,
> but I can't figure out what's wrong.
>
> The log files themselves are empty. I don't have the detailed
> information right now, but was wondering if someone could help me
> understand what's going on at a high level. Then, maybe, I could find
> out myself how to solve this problem.
>
> Thanks,
>
> Rick
Here is the answer I received:
>Off the top of my head:
>
>There are two ways to log apache. Everything in seperate files or most
>things in one big shared log file (the default). Your problem is most
>likely that the /etc/logrotate.d/apache file is setup to rotate more log
>files than apache is generating. Try commenting out the sections in
>that file that try to rotate non-existent logs. Or, you could just
>create an empty file for each entry in the /etc/logrotate.d/apache file.
>
>-Jim
I thought it worked, but I just got errors again. Here is the mail I
received to root:
errors occurred while rotating /var/log/httpd/access_log
httpd: no process killed
error running postrotate script
I also looked at the /etc/logrotate.d/apache file as suggested before.
It shows the following for /var/log/httpd/access_log:
/var/log/httpd/access_log {
postrotate
/usr/bin/killall -HUP httpd
endscript
}
Can someone point me in the right direction to finding out what's
wrong? I have a couple of theories, but I don't know if my logic is
sound.
First, is postrotate a script that I can find on my system somewhere
or do the following lines denote it AS the postrotate script itself?
postrotate
/usr/bin/killall -HUP httpd
endscript
If this is the script definition, how can I run it from the command
line to see what errors will happen? Also, if this is the script,
what is it trying to kill? Is it trying to kill all processes being
invoked via httpd?
Lastly, am I getting errors rotating the logs because they are set to
rotate and keep four weeks worth of log files and after that time I
have to delete logs before it can put new ones? I doubt this is the
case. Because what would be the point of having automated log
rotation if it couldn't just overwrite the logs that were already
there? Of course I'm not sure though.
Any help is appreciated.
Thanks,
Rick
More information about the Ale
mailing list