Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

logrotate failing running postrotate script

Discussion in 'General Discussion' started by Fireminds Ltd., Jul 17, 2017.

Tags:
  1. Fireminds Ltd.

    Joined:
    Feb 22, 2017
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
  3. Fireminds Ltd.

    Joined:
    Feb 22, 2017
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Hamilton, Bermuda
    cPanel Access Level:
    Root Administrator
    Here is the output:


    [root@server 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
    [root@server 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.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page