• 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.

Issue Strange behaviour with log rotation / checkbox greyed out

gennolo

Basic Pleskian
Server operating system version
Centos 7.9
Plesk version and microupdate number
18.0.55 #1
I recently discovered that one of my servers ran out of disk space. Upon investigation,
I found that the logs for both configured domains were not rotating, leading to significantly large access and error logs.

Interestingly, the option to modify log rotation settings in Plesk is disabled (greyed out) for all domains.xYK4X0e.png

To try to address this, I referred to Plesk's Knowledge Base and executed the following command for all domains:

Code:
plesk bin domain -u example.com -log-rotate true

After running the command, I noticed that the checkboxes in Plesk's configuration were enabled (but still greyed out) . All associated options remain inaccessible.

Furthermore, when I examined the domain configuration files in /usr/local/psa/etc/logrotate.d, some files displayed a "rotate 0" setting.

Any clue on how to fix this to restore the default settings with rotation by size for all domains and force a log rotation ?
 
The subscription settings may not allow a subscriber to modify these settings. Please check the service plan associated with the subscription for this option:

Permissions > Log Rotation Management

Or sync the subscription with the existing service plan if it already allowed log rotation configuration.
 
@Peter Debik thanks for your quick comeback.

I should have mentioned that I access Plesk as an administrator, the service plan on which the domains are linked is the "Default domain"
where the ability to rotate logs is enabled by default.

If I go into "Logs and statistics" in the service plan I have the log rotation part grayed out - like it happens in domain settings :


SLm1YDfoBc.png
 
Sorry for the multiple post but I just came across this issue

And I think I have the same problem.

Launching

Code:
/usr/local/psa/logrotate/sbin/logrotate -v /usr/local/psa/etc/logrotate.d/example.com

produces this output :

Code:
reading config file /usr/local/psa/etc/logrotate.d/example.com
Reading state from file: /var/lib/logrotate.status
Allocating hash table for state file, size 64 entries
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state

Handling 4 logs

rotating pattern: /var/www/vhosts/system/example.com/logs/*.processed  after 1 days (1 rotations)
empty log files are rotated, old logs are removed
considering log /var/www/vhosts/system/example.com/logs/access_log.processed
  log /var/www/vhosts/system/example.com/logs/access_log.processed has multiple (2) hard links. Rotation of files with multiple hard links is not allowed for /var/www/vhosts/system/example.com/logs/*.processed  -- skipping.
considering log /var/www/vhosts/system/example.com/logs/access_ssl_log.processed
  log /var/www/vhosts/system/example.com/logs/access_ssl_log.processed has multiple (2) hard links. Rotation of files with multiple hard links is not allowed for /var/www/vhosts/system/example.com/logs/*.processed  -- skipping.
considering log /var/www/vhosts/system/example.com/logs/xferlog_regular.processed
  log /var/www/vhosts/system/example.com/logs/xferlog_regular.processed has multiple (2) hard links. Rotation of files with multiple hard links is not allowed for /var/www/vhosts/system/example.com/logs/*.processed  -- skipping.

rotating pattern: /var/www/vhosts/system/example.com/logs/error_log  after 1 days (1 rotations)
empty log files are rotated, old logs are removed
considering log /var/www/vhosts/system/example.com/logs/error_log
  log /var/www/vhosts/system/example.com/logs/error_log has multiple (2) hard links. Rotation of files with multiple hard links is not allowed for /var/www/vhosts/system/example.com/logs/error_log  -- skipping.

rotating pattern: /var/www/vhosts/system/example.com/logs/proxy_error_log  after 1 days (1 rotations)
empty log files are rotated, old logs are removed
considering log /var/www/vhosts/system/example.com/logs/proxy_error_log
  log /var/www/vhosts/system/example.com/logs/proxy_error_log has multiple (2) hard links. Rotation of files with multiple hard links is not allowed for /var/www/vhosts/system/example.com/logs/proxy_error_log  -- skipping.

rotating pattern: /var/www/vhosts/system/example.com/logs/php-fpm_error.log  after 1 days (1 rotations)
empty log files are rotated, old logs are removed
considering log /var/www/vhosts/system/example.com/logs/php-fpm_error.log
  log /var/www/vhosts/system/example.com/logs/php-fpm_error.log does not exist -- skipping

However I understand that the bug has been fixed time ago and I am using the latest version of Plesk.
 
Please do not mix different issues in the same thread, because it makes it extremely hard to pinpoint solutions and for others to understand what a thread is about. Regarding the "hard links" issue you can run
sed -i '/copytruncate/a allowhardlink' /usr/local/psa/etc/logrotate.d/*
to fix it.

Regarding the log rotation permission issue: The setting can be found on the "Permissions" tab of the subscription settings.
 
I confirm that launching :

Code:
sed -i '/copytruncate/a allowhardlink' /usr/local/psa/etc/logrotate.d/*

fixed the ability to rotate the logs.

Anyway there are still interface issues - Permission to manage Log rotation is ON in subscription setting.

t7Ac72HHSc.png


But Log rotation options are disabled in all domains of this subscription :

6FkCMjL3g1.png
 
Back
Top