Webserver, virtual host's configuration files deleted by daily task.

Created:

2016-11-16 13:22:57 UTC

Modified:

2017-04-22 23:06:43 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Webserver, virtual host's configuration files deleted by daily task.

Symptoms

There are following messages appears in the Plesk panel.log and Apache error_log files:

httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 6 of /etc/httpd/conf.d/zz010_psa_httpd.conf:  
Syntax error on line 34 of /usr/local/psa/admin/conf/vhosts_bootstrap.conf: Could not open configuration file /var/www/vhosts/<domain.tld>/conf/14276916490.93818000_httpd.include: No such file or directory

Some webserver config files *_httpd.include disappears and websites stop working after scheduled daily maintenance task execution or manual run

/usr/local/psa/bin/sw-engine-pleskrun /usr/local/psa/admin/plib/DailyMaintainance/script.php -f execute-apache-config-rotation

"Configurations" table of "psa" database contains duplicate records for particular domain(s), on of them refer to non-exiting file

    mysql> SELECT * FROM Configurations WHERE objectId IN (SELECT objectId FROM Configurations WHERE name='domainVhost' GROUP BY objectId HAVING COUNT(*)>=2) AND active='false';

+----+-------------+---------------+--------------------------------------------------------------------+----------------------+------------+----------+--------+--------+-------------+

| id | name | serviceNodeId | file | version | objectType | objectId | status | active | description |
+----+-------------+---------------+--------------------------------------------------------------------+----------------------+------------+----------+--------+--------+-------------+

| 65 | domainVhost | 1 | /var/www/vhosts/<domain.tld>/conf/13735437430.73229600_httpd.include | 13735437430.73229600 | domain | 61 | ok | false | NULL |
| 66 | domainVhost | 1 | /var/www/vhosts/<domain.tld>/conf/14288718430.04694300_httpd.include | 14288718430.04694300 | domain | 61 | ok | true | NULL |
+----+-------------+---------------+--------------------------------------------------------------------+----------------------+------------+----------+--------+--------+-------------+
2 rows in set (0.01 sec)

Cause

Database inconsistency: duplicate records or records about non-existing files in psa.Configurations table.

Resolution

  1. Delete all invalid entries from psa.Configuartions

    mysql> DELETE FROM Configurations WHERE objectId IN (SELECT objectId FROM Configurations WHERE name='domainVhost' GROUP BY objectId HAVING COUNT(*)>=2) AND active='false';
  2. Run the following

    # /usr/local/psa/bin/sw-engine-pleskrun /usr/local/psa/admin/plib/DailyMaintainance/script.php -f execute-apache-config-rotation
Have more questions? Submit a request
Please sign in to leave a comment.