Logrotation does not work: duplicate log entry.

Created:

2016-11-16 13:23:32 UTC

Modified:

2017-08-08 13:14:14 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Logrotation does not work: duplicate log entry.

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 12.0 for Linux

Symptoms

Following error appears during statistic calculating:

# /usr/local/psa/admin/bin/statistics --calculate-one --domain-name example.com
WARNING during statistics_collector execution: : statistics[29859]: Log rotation `/usr/local/psa/logrotate/sbin/logrotate /usr/local/psa/etc/logrotate.conf -s /usr/local/psa/var/logrotate.status' failed with code 1.
Stdout:
Stderr:error: _.test.tld:5 duplicate log entry for /var/www/vhosts/system/example.com/logs/access_log.processed

Cause

This issue is caused by excess configuratin file with "*" symbol under /usr/local/psa/etc/logrotate.d directory:

    # ls -la /usr/local/psa/etc/logrotate.d | grep *.test.tld
-rw-r--r-- 1 root root 462 Feb 4 18:15 *.example.com
-rw-r--r-- 1 root root 462 Feb 5 06:30 _.example.com
-rw-r--r-- 1 root root 459 Feb 16 02:23 forum.example.com
-rw-r--r-- 1 root root 489 Feb 15 22:03 mail.example.com

Resolution

To resolve this issue move this unnecessary configuration file from /usr/local/psa/etc/logrotate.d directory:

# mv /usr/local/psa/etc/logrotate.d/\\*.example.com /tmp
Have more questions? Submit a request
Please sign in to leave a comment.