Daily task breaks domain configurations

Refers to:

  • Plesk 11.5 for Linux

Created:

2016-11-16 12:55:30 UTC

Modified:

2016-12-21 19:32:56 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Daily task breaks domain configurations

Symptoms

Daily task breaks domain configurations:

     /usr/local/psa/bin/sw-engine-pleskrun /usr/local/psa/admin/plib/DailyMaintainance/script.php -f ExecuteApacheConfigRotation

Apache crashed with error in the /var/log/httpd/error_log
[notice] SIGHUP received. Attempting to restart httpd: Syntax error on line 223 of /etc/httpd/conf/httpd.conf: Syntax error on line 8 of /etc/httpd/conf.d/zz010_psa_httpd.conf: Could not open configuration file /etc/httpd/conf/plesk.conf.d/vhosts/domain.tld.conf: No such file or directory

Cause

Duplicated domainVhost records in psa database for domain.

Resolution

Make sure that Configuration table in psa database contains only one domainVhost instance per domain:

    mysql> select id,name,file from Configurations where file like '%domain.tld%' and name='domainVhost'\\G
*************************** 1. row ***************************
id: 1542
name: domainVhost
file: /data/vhosts/system/domain.tld/conf/139678140.11139100_httpd.conf
*************************** 2. row ***************************
id: 1543
name: domainVhost
file: /data/vhosts/system/domain.tld/conf/123456.145371235_httpd.conf

As you can see from example above, domain has 2 instances of domainVhost . That is not correct and should be fixed as below:

  1. Create backup of psa database:

    # mysqldump -uadmin -p`cat /etc/psa/.psa.shadow ` psa >psa.dump
  2. Delete information about domain in Configurations table:

    mysql> delete from Configurations where file like '%domain.tld%';
    Query OK, 3 rows affected (0.00 sec)
  3. Reconfigure domain:

    /usr/local/psa/admin/sbin/httpdmng --reconfigure-domain domain.tld
Have more questions? Submit a request
Please sign in to leave a comment.