• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • (Plesk for Windows):
    MySQL Connector/ODBC 3.51, 5.1, and 5.3 are no longer shipped with Plesk because they have reached end of life. MariaDB Connector/ODBC 64-bit 3.2.4 is now used instead.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

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