Logrotate: glob finding old rotated logs failed

6,513

The problem was solved using

logrotate -f /etc/logrotate.d/syslog

without "v" option.

Share:
6,513

Related videos on Youtube

AndresM
Author by

AndresM

Updated on September 18, 2022

Comments

  • AndresM
    AndresM over 1 year

    I am having problems with logrotate. The configuration is the following

    /var/log/cron
    /var/log/maillog
    /var/log/messages
    /var/log/secure
    /var/log/spooler
    /var/log/unused.log
    /var/log/kern.log
    /var/log/daemon.log
    {
        #Modified by CGSL!
        compress
        dateext
        maxage 90
        rotate 100
        missingok
        notifempty
        size +4096k
        create 640 root root
        sharedscripts
        postrotate
            /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
        endscript
    }
    

    I am interested in rotating the /var/log/daemon.log, the output of executing

    logrotate -fv /etc/logrotate.d/syslog
    

    is

    reading config file /etc/logrotate.d/syslog
    reading config info for /var/log/cron
    /var/log/maillog
    /var/log/messages
    /var/log/secure
    /var/log/spooler
    /var/log/unused.log
    /var/log/kern.log
    /var/log/daemon.log
    
    
    Handling 1 logs
    
    rotating pattern: /var/log/cron
    /var/log/maillog
    /var/log/messages
    /var/log/secure
    /var/log/spooler
    /var/log/unused.log
    /var/log/kern.log
    /var/log/daemon.log
     forced from command line (100 rotations)
    empty log files are not rotated, old logs are removed
    considering log /var/log/cron
      log needs rotating
    considering log /var/log/maillog
      log needs rotating
    considering log /var/log/messages
      log needs rotating
    considering log /var/log/secure
      log needs rotating
    considering log /var/log/spooler
      log does not need rotating
    considering log /var/log/unused.log
      log needs rotating
    considering log /var/log/kern.log
      log needs rotating
    considering log /var/log/daemon.log
      log needs rotating
    rotating log /var/log/cron, log->rotateCount is 100
    dateext suffix '-20190411'
    glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
    rotating log /var/log/maillog, log->rotateCount is 100
    dateext suffix '-20190411'
    glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
    rotating log /var/log/messages, log->rotateCount is 100
    dateext suffix '-20190411'
    glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
    destination /var/log/messages-20190411.gz already exists, skipping rotation
    rotating log /var/log/secure, log->rotateCount is 100
    dateext suffix '-20190411'
    glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
    rotating log /var/log/unused.log, log->rotateCount is 100
    dateext suffix '-20190411'
    glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
    rotating log /var/log/kern.log, log->rotateCount is 100
    dateext suffix '-20190411'
    glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
    glob finding old rotated logs failed
    rotating log /var/log/daemon.log, log->rotateCount is 100
    dateext suffix '-20190411'
    glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
    glob finding old rotated logs failed
    set default create context
    

    What does this error mean?

    glob finding old rotated logs failed
    
  • Bastien974
    Bastien974 over 3 years
    How is hiding the verbose option the solution ?