- Plesk for Linux
The following error occurs during statistic recalculation:
# /usr/local/psa/admin/sbin/statistics --calculate-one --domain-name=example.com
WARNING during statistics_collector execution: : statistics_collector: Relinking of virtual host logs `/opt/psa/admin/sbin/relink-vhost-logs --domain-name example.com --sys-user-login user' failed with code 3.
Stderr:'./example.com/logs' already exists, but has wrong access rights. Specify --force to override.
ERROR: Cannot relink logs. Target directory '/var/www/vhosts/example.com/logs' is in invalid state.
drwxr--r-- 4 user user 4096 Sep 6 10:43 /var/www/vhosts/example.com/logs/
The following error can be found in
CONFIG_TEXT: statistics_collector: Relinking of virtual host logs `/usr/local/psa/admin/sbin/relink-vhost-logs --domain-name example.com --sys-user-login user' failed with code 3.#012Stdout:#012Stderr:'./example.com/logs' doesn't exist. Specify --create to create.#012ERROR: Cannot relink logs. Target directory '/var/www/vhosts/example.com/logs' is in invalid state.#012
/var/www/vhosts/example.com/logs/ does not exist or has incorrect permissions and ownership.
- Login to the server over SSH.
- Create the missing directory using the command from the error message with
--forceoptions added, replace jdoe with system user's name and example.com with actual domain's name:
# plesk sbin relink-vhost-logs --domain-name example.com --sys-user-login jdoe --force --create
- Check the directory. It should have the following permissions/ownership:
# ls -ld /var/www/vhosts/example.com/logs/
drwx------ 4 jdoe root 4096 Sep 6 10:43 /var/www/vhosts/example.com/logs/
The error doesn't give any information about what it was expecting and hence why it was an error. In fact, if the resolution is to rerun the command with the force directive, then that can be added into the automation of plesk much easier than providing the information in the error
EDIT: scrap that, found earlier information in the log pertaining to the info needed, but still, why not automatically run the command with force?
Please sign in to leave a comment.