logrotate failing running postrotate script

Feb 22, 2017
17
0
1
Hamilton, Bermuda
cPanel Access Level
Root Administrator
Hi All,

I recently just started getting these errors in an email from my server:

/etc/cron.daily/logrotate:
exim: no process killed
error: error running non-shared postrotate script for /var/log/exim_mainlog of '/var/log/exim_mainlog '
exim: no process killed
error: error running non-shared postrotate script for /var/log/exim_paniclog of '/var/log/exim_paniclog '
exim: no process killed
error: error running non-shared postrotate script for /var/log/exim_rejectlog of '/var/log/exim_rejectlog '


The logrotate conf file is all set to default at the moment. Never got these in the past, only recently. Tried running a yum update of logrotate but no updates available. Any ideas what could be the problem?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,216
463
Hello,

Could you run the following commands and let us know the output?

Code:
cat /etc/cron.daily/logrotate
cat /etc/logrotate.conf
Thank you.
 
Feb 22, 2017
17
0
1
Hamilton, Bermuda
cPanel Access Level
Root Administrator
Here is the output:


[[email protected] user]# 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] user]# 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

# use date as a suffix of the rotated file
dateext

# 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 and btmp -- we'll rotate them here
/var/log/wtmp {
monthly
create 0664 root utmp
minsize 1M
rotate 1
}

/var/log/btmp {
missingok
monthly
create 0600 root utmp
rotate 1
}

# system-specific logs may be also be configured here.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,216
463
Hello,

Do you have Exim disabled on this system in "WHM >> Service Manager"? If so, you can empty the /etc/logrotate.d/exim file to avoid those error messages with the following command:

Code:
echo -n > /etc/logrotate.d/exim
Then, if you decide to enable Exim again in the future, repopulate the file with the following commands:

Code:
rm /etc/logrotate.d/exim
/scripts/check_cpanel_rpms --fix
Thank you.