PHP-FPM service fails to start: pool sub.domain.com the prefix '/var/www/vhosts/system/sub.domain.tld' does not exist or is not a directory

Refers to:

  • Plesk 12.5 for Linux
  • Plesk 11.5 for Linux

Created:

2016-11-16 12:45:09 UTC

Modified:

2016-12-28 13:08:34 UTC

1

Was this article helpful?


Have more questions?

Submit a request

PHP-FPM service fails to start: pool sub.domain.com the prefix '/var/www/vhosts/system/sub.domain.tld' does not exist or is not a directory

Symptoms

When a domain 'domain.tld' with a 'sub' subdomain gets renamed to 'domain.com', PHP-FPM service fails to start. '/var/log/php5-fpm.log' contains errors:

ERROR: [pool sub.domain.com] the prefix '/var/www/vhosts/system/sub.domain.tld' does not exist or is not a directory
ERROR: failed to post process the configuration

Cause

This is an internal issue with ID #PPPM-1685 , which is planned to be fixed in future product updates.

When domain gets renamed, old configuration file for a subdomain is not removed or renamed, but a new one is being created instead. This causes PHP-FPM to fail.

Workaround

  1. Download custom fix attached :

    # cd /root/
    # wget http://kb.plesk.com/Attachments/kcs-31170/patch.tar.gz
  2. Unpack the archive:

    # tar zxvf /root/patch.tar.gz
  3. Create a backup of /usr/local/psa/admin/plib/Smb/Plesk/Bridge/Domain.php and /usr/local/psa/admin/plib/PHosting/Apache.php files:

    # mv /usr/local/psa/admin/plib/Smb/Plesk/Bridge/Domain.php /usr/local/psa/admin/plib/Smb/Plesk/Bridge/Domain.php.orig
    # mv /usr/local/psa/admin/plib/PHosting/Apache.php /usr/local/psa/admin/plib/PHosting/Apache.php.orig
  4. Place unpacked custom fix files to:

    # cp /root/plib/Smb/Plesk/Bridge/Domain.php /usr/local/psa/admin/plib/Smb/Plesk/Bridge/Domain.php
    # cp /root/plib/PHosting/Apache.php /usr/local/psa/admin/plib/PHosting/Apache.php
  5. Restart php5-fpm service:

    # service php5-fpm restart

If above does not fix the issue, use following workaround (keep custom fix files applied).

  1. Access Plesk database:

213928465 How to access Plesk database?

  1. Find out what domain was renamed recently:

    mysql> select la.date,la.object_id,lc.old_value,lc.new_value from log_actions la LEFT JOIN actions act ON act.id=la.action_id left join log_components lc on la.id=lc.action_id where lc.old_value like '%domain.tld%' and act.name in('site_update','domain_update');
    +---------------------+-----------+-----------+-----------+
    | date | object_id | old_value | new_value |
    +---------------------+-----------+-----------+-----------+
    | 2014-05-30 16:39:41 | 1297 |domain.tld |domain.com |
    +---------------------+-----------+-----------+-----------+
  2. Check which subdomain(s) has(have) PHP-FPM enabled:

    mysql> select d.id,d.name,wssp.value as `PHP-FPM enabled` from domains d JOIN dom_param dp on (d.id=dp.dom_id and dp.param='webServerSettingsId') JOIN WebServerSettingsParameters wssp on (dp.val=wssp.webServerSettingsId and wssp.name='nginxServePhp') where d.parentDomainId=1297;
    +------+---------------+-----------------+
    | id | name | PHP-FPM enabled |
    +------+---------------+-----------------+
    | 1302 | sub.domain.com | true |
    | 1795 | 1.domain.com | true |
    | 2539 | 2.domain.com | false |
    +------+---------------+-----------------+
  3. Remove stale configuration files for the renamed subdomains (the ones that have 'PHP-FPM enabled' true):

    # rm -rf  /etc/php5/fpm/fpm.d/{sub,1}.domain.tld

    NOTE! use the old domain name here, not new. Otherwise you will remove correct configs.

  4. Restart PHP-FPM:

    # service php5-fpm restart
Have more questions? Submit a request
Please sign in to leave a comment.