• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • 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.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Forwarded to devs Rotation of files with multiple hard links is not allowed

Bitpalast

Plesk addicted!
Plesk Guru
Username:

TITLE

Rotation of files with multiple hard links is not allowed

PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE

CentOS 7.9 and CloudLinux 8.5, probably others, too
Obsidian 18.0.43_build1800220414.18 os_RedHat el8
Obsidian 18.0.43 #1 on CentOS 7.9

PROBLEM DESCRIPTION

as described in Issue - Rotation of files with multiple hard links is not allowed

Log rotation fails with
"log xxx has multiple (2) hard links. Rotating files with multiple hard links is not allowed"

STEPS TO REPRODUCE

Run
/usr/local/psa/logrotate/sbin/logrotate -v /usr/local/psa/etc/logrotate.d/<your_domain_name_here>

ACTUAL RESULT

No log rotation

EXPECTED RESULT

Correct rotation

ANY ADDITIONAL INFORMATION

Can only be resolved by adding "allowhardlink" to the log rotation configuration files.

YOUR EXPECTATIONS FROM PLESK SERVICE TEAM

Confirm bug
 
I have checked the servers here and found that on some servers the "allowhardlink" line was added to /usr/local/psa/etc/logrotate.conf, but on some others it was not added, although none are customized. It seems that for some reason the upgrades were unable to apply it to all logrotate.conf files on all servers.
 
on some servers the "allowhardlink" line was added to /usr/local/psa/etc/logrotate.conf.rpmnew !! but not to logrotate.conf
 
@Peter Debik there were found two issues:
  1. customized logrotate.conf isn't changed during the upgrade to 18.0.43 (fixed in 18.0.44, PPPM-13519)
  2. it isn't possible to perform rotation for a single domain using domain-related logrotate conf instead of a top-level one (filled PPPM-13562)
Thanks.
 
Is it possible that the daily log rotation is calling the individual logrotate.d/ files rather than the global logrotate.conf to effect each site's log rotation? Reason I ask is because we've been running into this issue across several servers and if I try to run the rotation at the site level via "/usr/local/psa/logrotate/sbin/logrotate -v -f /usr/local/psa/etc/logrotate.d/DOMAIN" it will fail with the hardlink error, and the allowhardlink statement is only in the global logrotate.conf file. If I run the same command against logrotate.conf, it will go through each domain successfully as it should.
 
This issue seems to be back since the latest update or the one before (45 or 46). At least for error_log we are experiencing this on some customer accounts. The logs are not rotated.
 
Peter, I think it will be better to submit a new report.
Thanks.
 
I don't have enough data to submit a new bug. I can see that it does not work despite "allowhardlink" in the general logrotate.conf file. All files are rotated, but error_log files are not. Same issue as before:
# /usr/local/psa/logrotate/sbin/logrotate -v /usr/local/psa/etc/logrotate.d/<your_domain_name_here>
(including nightly maintenance) does not rotate the error_log file, but
# logrotate -f /usr/local/psa/etc/logrotate.d/<your_domain_name_here>
does. I am not getting any error entries in the panel log or elsewhere (at least not where I'd know to look for them).
Neither
nor
fit. So not sure how to give developers a good start on it. At the moment I can only say that at least on some servers this is happening.
 
Back
Top