• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

logrotate stopped on 28. Sept?

Powie

Regular Pleskian
On many servery with plesk panel 12 I found the issue, that logrotate, especially for mail.info and others, hast stopped working on Sept 28.

If i start the logrotate script manually nothing happens

-> /usr/local/psa/logrotate/sbin/logrotate /usr/local/psa/etc/logrotate.conf

Is this known issue??

-> Plesk 12, MU 22 on Debian Wheezy
 
The command: logrotate -vf /etc/logrotate.conf will point to failures.
 
yes I know.... Its stupid....

Code:
rotating pattern: /var/log/mail.info /var/log/mail.warn /var/log/mail.err /var/log/mail.log /var/log/daemon.log /var/log/kern.log /var/log/auth.log /var/log/user.log /var/log/lpr.log /var/log/cron.log /var/log/debug /var/log/messages  forced from command line (10 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/mail.info
  log /var/log/mail.info does not exist -- skipping
considering log /var/log/mail.warn
  log does not need rotating
considering log /var/log/mail.err
  log does not need rotating
considering log /var/log/mail.log
  log does not need rotating
considering log /var/log/daemon.log
  log does not need rotating
considering log /var/log/kern.log
  log does not need rotating
considering log /var/log/auth.log
  log does not need rotating
considering log /var/log/user.log
  log does not need rotating
considering log /var/log/lpr.log
  log does not need rotating
considering log /var/log/cron.log
  log /var/log/cron.log does not exist -- skipping
considering log /var/log/debug
  log does not need rotating
considering log /var/log/messages
  log does not need rotating
not running postrotate script, since no logs were rotated

have checked all servers and it seems that this problem exists now on all Virtual Machines
 
Please check your logrotate files in "/etc/logrotate.d/" and "/usr/local/psa/etc/logrotate.d/", because as you can see, some errors occure because of non - existent logs. You may investigate that some logs are not named ".log" any more, but "log", without any point - separator - please have a look to "/var/log/" with the command: ls -lt /var/log/* - this will list all files, arranged by folders and sorted by the latest timestamp, so you can see, which files exist and when they were last used.

You could modify the files with sed ( for example ):

sed -i 's/.log/*log/g' /etc/logrotate.d/*

... but be aware, that this modication will change ALL ".log" definitions without asking if you really want to do that - so this suggestions should only be used, if you are sure about the change!


Additional information:
As far that I know, some vendors changed the standard ".log" - definitions to "*log" in some packages, to reach a more global linux standard instead of having specific standards for several distributions. This should make it easier for users switching from one to another distribution, or in case of patches/updates/upgrades and/or dist-upgrades.
 
Back
Top