Some logs are not found in Log Manager

Created:

2016-11-16 13:09:31 UTC

Modified:

2017-04-24 11:56:02 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Some logs are not found in Log Manager

Applicable to:

  • Plesk 12.5 for Linux

Symptoms

  1. A log file is not present in Log Manager but it exists in /var/www/vhosts/example.com/logs/ , grows in size and is not zeroed after log rotation.

  2. Log file is not present in Log Manager and in file system.

Cause

Broken structure of virtual hosts:

  1. Log file is removed from /var/www/vhosts/system/example.com/logs/ but exists in /var/www/vhosts/example.com/logs/ :

    # ll /var/www/vhosts/example.com/logs/access_log
    -rw-r--r-- 2 root root 0 Apr 4 13:06 /var/www/vhosts/example.com/logs/access_log

    # ll /var/www/vhosts/system/example.com/logs/access_log
    ls: cannot access /var/www/vhosts/system/example.com/logs/access_log: No such file or directory
  2. Log file is removed both from /var/www/vhosts/system/example.com/logs/ and /var/www/vhosts/example.com/logs/ :

    # ll /var/www/vhosts/example.com/logs/access_log
    ls: cannot access /var/www/vhosts/example.com/logs/access_log: No such file or directory

    # ll /var/www/vhosts/system/example.com/logs/access_log
    ls: cannot access /var/www/vhosts/system/example.com/logs/access_log: No such file or directory

Resolution

For both cases resolution is the same:

  1. Recreate /var/www/vhosts/system/example.com/logs/ structure of the domain and restore the missing log file:
    # plesk repair web example.com

Note: Web-server will be restarted after the execution of the command above.

  1. Wait for the Daily Maintenance task to finish or execute the following command to restore the connection between /var/www/vhosts/system/example.com/logs/ and /var/www/vhosts/example.com/logs/access_log :
    # /usr/local/psa/bin/sw-engine-pleskrun /usr/local/psa/admin/plib/DailyMaintainance/script.php -f ExecuteStatistics
Have more questions? Submit a request
Please sign in to leave a comment.