Article ID: 119299, created on Dec 24, 2013, last review on May 6, 2014

  • Applies to:
  • Plesk Automation 11.5

Symptoms

  1. You get mail message with error:

    /etc/cron.daily/logrotate:
    
    error: stat of /var/log/saas.http.log failed: No such file or directory
    error: stat of /var/log/apsc.http.log failed: No such file or directory
    
  2. Logrotate task failed with error:

    [root@ppa ~]# sh -x /etc/cron.daily/logrotate
    + /usr/sbin/logrotate /etc/logrotate.conf
    error: stat of /var/log/saas.http.log failed: No such file or directory
    error: stat of /var/log/apsc.http.log failed: No such file or directory
    + EXITVALUE=1
    + '[' 1 '!=' 0 ']'
    + /usr/bin/logger -t logrotate 'ALERT exited abnormally with [1]'
    + exit 0
    
  3. In /etc/logrotate.d/syslog you can find following settings:

    /var/log/saas.http.log {
            rotate 28
            daily
            compress
            dateext
        postrotate
            /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
            /bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || true
        endscript
    }
    
    /var/log/apsc.http.log {
            rotate 28
            daily
            compress
            dateext
        postrotate
            /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
            /bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || true
        endscript
    

Cause

Required log files are missing on the server.

Resolution

  1. Manually create required files, and set proper permissions:

    [root@ppa ~]# touch /var/log/saas.http.log
    [root@ppa ~]# touch /var/log/apsc.http.log
    [root@ppa ~]# chmod 600 /var/log/saas.http.log
    [root@ppa ~]# chmod 600 /var/log/apsc.http.log
    
  2. Check that logrotate can be executed without errors:

    [root@ppa ~]# sh -x /etc/cron.daily/logrotate
    + /usr/sbin/logrotate /etc/logrotate.conf
    + EXITVALUE=0
    + '[' 0 '!=' 0 ']'
    + exit 0
    

Search Words

saas.http.log

/var/log/apsc.http.log

logrotate

run-parts /etc/cron.daily

33a70544d00d562bbc5b17762c4ed2b3 e0aff7830fa22f92062ee4db78133079 caea8340e2d186a540518d08602aa065

Email subscription for changes to this article
Save as PDF