lloyd_tennison

Well-Known Member
Mar 12, 2004
697
1
168
Yet I have:

Code:
# see "man logrotate" for details
# rotate log files weekly
weekly

# keep 4 weeks worth of backlogs
rotate 4

# create new (empty) log files after rotating old ones
create

# uncomment this if you want your log files compressed
compress
as the start of my logrotate.conf. The logs rotate - just do not compress.

Thoughts?

Correction: Some logs do rotate and compress. No Exim logs do.


/etc/logrotate.d/exim is as follows:

Code:
/var/log/exim_mainlog {
    create 0640 mailnull mail
    compress
    postrotate
    /usr/bin/killall -HUP exim
    endscript
}
/var/log/exim_paniclog {
    missingok
    create 0640 mailnull mail
    compress
    postrotate
    /usr/bin/killall -HUP exim
    endscript
}
/var/log/exim_rejectlog {
    create 0640 mailnull mail
    compress
    postrotate
    /usr/bin/killall -HUP exim
    endscript
}
which also clearly says compress.
 
Last edited:

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
33
473
Go on, have a guess
Just to check, is this line in your /etc/logrotate.conf:

include /etc/logrotate.d

I don't have compress enabled in logrotate.conf and my exim logs are always rotated with the directive within /etc/logrotate.d/exim
 

lloyd_tennison

Well-Known Member
Mar 12, 2004
697
1
168
Yes, it is, and all the other logs rotate that have commands in that directory.
 

nathacof

Member
Feb 28, 2007
17
0
151
I have a customer who is on a Virtual Private Server.

[email protected] [/var/log]# cat /etc/fedora-release
Fedora Core release 4 (Stentz)
[email protected] [/var/log]#

cPanel v. 10.2.0

Same problem /etc/logrotate.d/exim follows:

[email protected] [/var/log]# cat /etc/logrotate.d/exim
/var/log/exim_mainlog {
create 0640 mailnull mail
compress
postrotate
/usr/bin/killall -HUP exim
endscript
}
/var/log/exim_paniclog {
missingok
create 0640 mailnull mail
compress
postrotate
/usr/bin/killall -HUP exim
endscript
}
/var/log/exim_rejectlog {
create 0640 mailnull mail
compress
postrotate
/usr/bin/killall -HUP exim
endscript
}

[email protected] [/var/log]#


Excerpt from /var/log/messages :

Apr 30 05:56:01 h101606 logrotate: ALERT exited abnormally with [1]
May 1 05:56:01 h101606 logrotate: ALERT exited abnormally with [1]
May 2 05:56:01 h101606 logrotate: ALERT exited abnormally with [1]
May 3 05:56:02 h101606 logrotate: ALERT exited abnormally with [1]
May 4 05:56:02 h101606 logrotate: ALERT exited abnormally with [1]
May 5 05:56:01 h101606 logrotate: ALERT exited abnormally with [1]
May 6 05:56:01 h101606 logrotate: ALERT exited abnormally with [1]
May 7 05:56:01 h101606 logrotate: ALERT exited abnormally with [1]
[email protected] [/var/log]#

[email protected] [/var/log]# cat /etc/cron.daily/logrotate
#!/bin/sh
export TMPDIR=/var/spool/logrotate/tmp

/usr/sbin/logrotate /etc/logrotate.conf
EXITVALUE=$?
if [ $EXITVALUE != 0 ]; then
/usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
fi
exit 0
[email protected] [/var/log]#

Problem is these logs all indicate that HTTP logs could not be found and the errors are not actually associated with exim's logrotate configuration.

[email protected] [/etc/logrotate.d]# logrotate -vf /etc/logrotate.conf
reading config file /etc/logrotate.conf
including /etc/logrotate.d
reading config file exim
reading config info for /var/log/exim_mainlog
reading config info for /var/log/exim_paniclog
reading config info for /var/log/exim_rejectlog
reading config file httpd
error: error accessing /var/log/httpd: No such file or directory
error: httpd:1 glob failed for /var/log/httpd/*log
[1]+ Done updatedb
[email protected] [/etc/logrotate.d]#

Here is my /etc/logrotate.conf

[email protected] [/etc/logrotate.d]# cat /etc/logrotate.conf
# see "man logrotate" for details
# rotate log files weekly
weekly

# keep 4 weeks worth of backlogs
rotate 4

# create new (empty) log files after rotating old ones
create

# uncomment this if you want your log files compressed
compress

# RPM packages drop log rotation information into this directory
include /etc/logrotate.d

# no packages own wtmp, or btmp -- we'll rotate them here
/var/log/wtmp {
monthly
create 0664 root utmp
rotate 1
}
/var/log/btmp {
missingok
monthly
create 0600 root utmp
rotate 1
}
# system-specific logs may be also be configured here.
[email protected] [/etc/logrotate.d]#


Just to be clear everything appears to be working. Except for the rotation and compression of the log files.... which indicates that nothing is actually working.

Any ideas on this?
 

nathacof

Member
Feb 28, 2007
17
0
151
Well we see the problem then.

When logrotate hits an invalid configuration it halts without continuing

duh

thanks!
 
Thread starter Similar threads Forum Replies Date
N Site Performance Analytics 0
Similar threads
logrotate rotating domlogs