Symptoms
-
Unable to switch PHP handler for a subscription or create a new domain in Plesk:
Error: phpinimng failed: invoke-rc.d: initscript plesk-phpXX-fpm, action "status" failed. invoke-rc.d: initscript plesk-phpXX-fpm, action "status" failed. Service plesk-phpXX-fpm is down after attempt to start it
-
The following error occurred when trying to rename the domain via Domains > example.com > Hosting settings:
PLESK_ERROR: Error: phpinimng failed: configuration test '/opt/plesk/php/x.x/sbin/php-fpm --test' failed with code 78, and message: ERROR: [pool example.com] the prefix '/var/www/vhosts/system/example.com' does not exist or is not a directory ERROR: failed to post process the configuration ERROR: FPM initialization failed
-
The
plesk-phpXX-fpm
service is down and cannot be started. Error in/var/log/plesk-phpXX-fpm/error.log
:ERROR: [pool example.com] the prefix '/var/www/vhosts/system/example.com' does not exist or is not a directory
ERROR: failed to post process the configuration
ERROR: FPM initialization failed -
Site fails to open with 502 Bad Gateway error or 503 Service Unavailable
-
Migration fails:
ERR [util_exec] proc_close() failed ['/usr/local/psa/admin/bin/phpinimng' '--virtual-host' 'example.com' '--override' '/var/www/vhosts/system/example.com/conf/php.ini' '--type' 'fpm' '--cgi-bin' '/opt/plesk/php/XX/sbin/php-fpm' '--sysuser' 'johndoe' '--service' 'plesk-phpXX-fpm' '--poold' '/opt/plesk/php/XX/etc/php-fpm.d' '--no-reload'] with exit code [1]
An error occurred during domain creation: An error occurred during changing of hosting settings: phpinimng failed: configuration test '/opt/plesk/php/XX/sbin/php-fpm --test' failed with code 78, and message:
ERROR: [pool example.com] the prefix '/var/www/vhosts/system/example.com' does not exist or is not a directory
ERROR: failed to post process the configuration
ERROR: FPM initialization failed -
The PHP configuration file for the affected domain is present on the server:
# ls -la /opt/plesk/php/X.X/etc/php-fpm.d/example.com.conf
-rw-r--r-- 1 root root 1294 May 3 19:54 /opt/plesk/php/X.X/etc/php-fpm.d/example.com.conf
Cause
The domain was removed incompletely.
Resolution
Click on a section to expand
To find and remove redundant files for the affected domain:
-
Connect to the server via SSH
Note: in case of the migration, connect to the destination server.
-
Check if the domain web content files and configuration file exist on the server, if the domain is registered in Plesk database:
# ls -al /var/www/vhosts/system/example.com
# httpd -D DUMP_VHOSTS | grep example.com
# plesk db "select * from domains where name like '%example%'"
-
If domain web content files do not exist on the server and the domain is not registered in Plesk database, remove its configuration file and restart the affected PHP service:
# rm /opt/plesk/php/X.X/etc/php-fpm.d/example.com.conf
# service plesk-phpXX-fpm restart -
If the files exist on the server and the domain…