CentOS Bug Tracker
CentOS Website

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001163 [CentOS-4] Other major always 2006-01-05 22:19 2007-01-04 11:38
Reporter dtam View Status public  
Assigned To
Priority normal Resolution open  
Status assigned   Product Version 4.2 - i386
Summary 0001163: Logrotate is not roatating logs properly
Description When logrotates the logs, say messages

messages.1
...
...

It will keep writing to the messages.1 on first rotation and then following rotation messages.2 will be the logfile being written too.

So it really doesn't rotate properly
Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0003089)
dtam (reporter)
2006-01-24 18:23

wondering if there was any update on this logrotate issue?
(0003090)
jhughes@hughesjr.com (administrator)
2006-01-25 02:50

I am not sure what your issue is ... here is what my logrotate does:

-rw------- 1 root root 9517 Jan 24 18:07 messages
-rw------- 1 root root 94165 Jan 21 18:06 messages.1
-rw------- 1 root root 22025 Jan 14 09:24 messages.2
-rw------- 1 root root 38135 Jan 7 09:24 messages.3
-rw------- 1 root root 94381 Dec 31 19:32 messages.4

messages is always current ... after a rotate, what is messages becomes messages.1 ... messages.1 -> .2, .2 -> .3, .3 -> .4, and .4 goes away.

All active logging always goes into a messages ... .1 is always the most recent archived file, etc.

Is this not the behavior you see?
(0003093)
dtam (reporter)
2006-01-25 16:25

Basically the logs rotates, correctly like yours, but syslog doesn't get restarted on the weekly rotation so what happens is after it rotates:

-rw------- 1 root root 0 Jan 22 04:02 maillog
-rw------- 1 root root 23388353 Jan 25 08:16 maillog.1

messages.1 will continue to be the file that keeps getting written to and next week it will rotate but messages will be written to maillog.2 and so on til it reaches maillog.4 and it just keeps writing it to maillog.4

I have no idea why it is not restarting syslog as the logrotate.d/syslog file looks correct.
(0004321)
socheat (reporter)
2007-01-04 10:20

Not sure if this was ever resolved, but I had this same problem, and I discovered it was because my /tmp partition was mounted 'noexec'. This prevented the postrotate script from running.
(0004322)
jhughes@hughesjr.com (administrator)
2007-01-04 11:22

AH ... OK, that would definitely do it :)

That is not a bug though, it is a difference in configuration from how the package was designed to operate.

The only thing I can think of to fix that is to change the TMPDIR to /var/tmp ... if that is not mounted as noexec.

Here is an example:

http://www.directadmin.com/forum/showthread.php?threadid=6274 [^]
(0004323)
jhughes@hughesjr.com (administrator)
2007-01-04 11:38

This bug has also been addressed in the fasttrack version of logrotate:

http://www.centos.org/modules/newbb/viewtopic.php?topic_id=6510&start=0#forumpost19819 [^]

- Issue History
Date Modified Username Field Change
2006-01-05 22:19 dtam New Issue
2006-01-05 22:19 dtam Status new => assigned
2006-01-05 22:19 dtam Assigned To => jhughes@hughesjr.com
2006-01-24 18:23 dtam Note Added: 0003089
2006-01-25 02:50 jhughes@hughesjr.com Note Added: 0003090
2006-01-25 16:25 dtam Note Added: 0003093
2007-01-04 10:20 socheat Note Added: 0004321
2007-01-04 11:22 jhughes@hughesjr.com Note Added: 0004322
2007-01-04 11:38 jhughes@hughesjr.com Note Added: 0004323


Copyright © 2000 - 2009 Mantis Group
Powered by Mantis Bugtracker