View Issue Details

IDProjectCategoryView StatusLast Update
0001163CentOS-4Otherpublic2013-03-23 20:24
Reporterdtam 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionsuspended 
Product Version4.2 - i386 
Target VersionFixed in Version 
Summary0001163: Logrotate is not roatating logs properly
DescriptionWhen 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
TagsNo tags attached.

Activities

dtam

dtam

2006-01-24 18:23

reporter   ~0003089

wondering if there was any update on this logrotate issue?
JohnnyHughes

JohnnyHughes

2006-01-25 02:50

administrator   ~0003090

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?
dtam

dtam

2006-01-25 16:25

reporter   ~0003093

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.
socheat

socheat

2007-01-04 10:20

reporter   ~0004321

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.
JohnnyHughes

JohnnyHughes

2007-01-04 11:22

administrator   ~0004322

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
JohnnyHughes

JohnnyHughes

2007-01-04 11:38

administrator   ~0004323

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
tigalch

tigalch

2013-03-23 20:24

manager   ~0016937

CentOS4 is EOL.

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-24 18:23 dtam Note Added: 0003089
2006-01-25 02:50 JohnnyHughes 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 JohnnyHughes Note Added: 0004322
2007-01-04 11:38 JohnnyHughes Note Added: 0004323
2013-03-23 20:24 tigalch Note Added: 0016937
2013-03-23 20:24 tigalch Status assigned => closed
2013-03-23 20:24 tigalch Resolution open => suspended