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.

On-going logrotate problems

Discussion in 'General Discussion' started by verdon, Oct 9, 2006.

  1. verdon

    verdon Well-Known Member

    Nov 1, 2003
    Likes Received:
    Trophy Points:
    Northern Ontario, Canada
    cPanel Access Level:
    Root Administrator
    For the last few weeks, I have been getting postrotate errors with my weekly logrotate

    error running postrotate script
    error running postrotate script
    error running postrotate script
    error running shared postrotate script for /etc/httpd/logs/*log 
    error running shared postrotate script for /var/log/messages /var/log/secure /var/log/maillog /var/log/spooler /var/log/boot.log /var/log/cron /var/log/kern.log 
    I have read a number of threads here in regards to this issue, and at some point in the past (I don't really remember, but mod date would suggest about a year ago) I had already modified my /etc/cron.daily/logrotate to allow for the known noexec /tmp issue, as such

    if [ ! -e "/logrotate_tmp" ]; then
    	mkdir /logrotate_tmp
    export TMPDIR=/tmp_logrotate
    /usr/sbin/logrotate /etc/logrotate.conf
    if [ $EXITVALUE != 0 ]; then
        /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
    exit 0
    This hasn't been a problem until recently, and it seems like some things stop logging when it happens and I have to restart the services to get them logging again.

    This of course happens early Sunday morning, and as soon as I see the error in the mail, I manually try running...

    /usr/sbin/logrotate -vf /etc/logrotate.conf


    export TMPDIR=/logrotate_tmp
    /usr/sbin/logrotate -vf /etc/logrotate.conf

    ...but neither produces any errors that I can see.

    Is there some way I can get a verbose output e-mailed to me when logrotate runs by cron? Maybe that will help me track this down.


Share This Page