• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Logrotate for error_log does not work for migrated domains

Kurt Ludikovsky

Basic Pleskian
Problem:

Logrotation does not work for error_log for domains migrated from a previous version.
Plesk Version 12.5

When I checked my error_log's I found that those where not rotated and have reached huge sizes.
Whilel only the error log's where not rotated, the other log's (e.g. access_log, xfer_log, ..) seemed ok.
I futhermore figured out that non of the 'newer' domains where affected. 'Newer', as created on this installation. Only domains migrated from a previous installation (and version) where affected.

Resolution:

When trying to figure out the reason I got trough some KB articles here, and finally found KB Article 129196 which brought me to the solution.
Running the command's
Code:
/usr/local/psa/logrotate/sbin/logrotate -v -f /usr/local/psa/etc/logrotate.conf  2> logrotate.debug
grep 'error:' logrotate.debug
and analysing the output brought the following errors
Code:
error: error creating output file /var/www/vhosts/system/domain.tld/logs/error_log.1: File exists
only for the migrated domains.

A previously attempt to rename the error_log.1 in the
Code:
var/www/vhosts/domain.tld/logs/
directory did not yield a result.

After the renaming and re-running of the manual logrotate all seems ok now in the var/www/vhosts/system/domain.tld/logs/ directory. The log's in the var/www/vhosts/domain.tld/logs/ are not up to date yet, but this is minor, and might be ok after a scheduled run.

Hope this helps somebody.
 
Hello Kurt,

I cannot get to reproduce your issue. Could you provide more details about your environment like OS, Plesk version, MU for source and destination servers and version of Plesk Migrator.
 
Hello, Mr.D

It's Version 12.5.30 Update #53, zuletzt aktualisiert: 29. Nov. 2016 14:26:24 and a Debian 7

I migrated from a 11.5 System I think, because that's already some time ago.

What I found, was that the error_log.1 file, which was transfered, prohibits the execution of the logrotate. But this is only true for the error_log, I could not see the same issue with the access_log .
I just deleted (renamed) the error_log.1 and logrotate seems to work now.

I discovered the root by comparing newly created domains, where the problem did no arise, to the transfered ones. The major difference with the error_log.1 file.

Maybe a simple test, create a error_log.1 file in a log-directory (I don't know which one, as I don't understand the difference between the /var/www/vhosts/system/domain.tld/logs and the /var/www/vhosts/domain.tld/logs directory completely.
 
Back
Top