I have been looking around for the solution to this all over, but to no avail. Here's what I have.
I'm running woody on a production system. I did some upgrades (apt-get -u upgrade) and things went fine. But I've noticed a new problem with my log files. I'm not sure if anything in the upgrade had something to do with it.
The files were rotated last on what looks like 2005-08-21. As usual the current log file got renamed to *.log.1 and a new log file was created. For example, apache access log was access.log and was backed up to access.log.1 and a new access.log was created.
Well, here is the problem. The new log file was created but it's not being used. Everything is getting logged into the *.log.1 file and nothing to the new *.log file. This is happening with ALL log files that have been rotated. I've tried running logrotate manually but that doesn't seem to make a difference. I've not modified my logrotate conf file or cron or anything related since well before this started happening.
Any ideas and/or help here would be greatly appreciated.
Aaron
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Log files log.1 and log rotating
-
- Debian Developer, Site Admin
- Posts: 483
- Joined: 2004-04-06 18:19
- Location: Utrecht, NL
- Contact:
Apache needs to reopen the logfiles -- otherwise the logging file descriptor will move along with the roted logfiles.
TYpically, in your logrotate.d/apache config file, you'll therefore have something like:
Inside the stanza for your apache logs.
TYpically, in your logrotate.d/apache config file, you'll therefore have something like:
Code: Select all
postrotate
/etc/init.d/apache reload > /dev/null
endscript
By manually reloading, do you mean re-installing or doing a manual stop & start? If you mean the stop/restart, yes. I've tried that and I've tried rebooting and manually running logrotate, but nothing changes.
I'm also getting the same behavior in the kernel.log, cups log, auth log, daemon log, debug log, etc., etc.
I'm also getting the same behavior in the kernel.log, cups log, auth log, daemon log, debug log, etc., etc.
-
- Debian Developer, Site Admin
- Posts: 483
- Joined: 2004-04-06 18:19
- Location: Utrecht, NL
- Contact:
kernel log, daemon log, syslog and the likes are all controlled by syslog, and not by logrotate. Anyway, rebooting and then services still writing to access.log.0 instead of access.log? I can't believe that, to be honest, unless you put that in your apache.conf. Please try to get clear what stage exactly goes wrong, or it'll be very hard to give help. Also note that logrotate will typically not rotate unless really a day has passed, no matter how often you invoke it.