• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue PHP-FPM 7.4.9 Error again

eslammahmoud

New Pleskian
Text Error in Signal Domain

Error: phpinimng failed: Job for plesk-php74-fpm.service failed because the control process exited with error code. See "systemctl status plesk-php74-fpm.service" and "journalctl -xe" for details.
ERROR:php_fpm:Failed to start plesk-php74-fpm service, pause before retry
Job for plesk-php74-fpm.service failed because the control process exited with error code. See "systemctl status plesk-php74-fpm.service" and "journalctl -xe" for details.
Failed to start plesk-php74-fpm service

sadasdasdasd.png


Text Error In Start Services


Unable to start service: Unable to manage service by phpinimng: ('start', 'plesk-php74-fpm'). Error: Job for plesk-php74-fpm.service failed because the control process exited with error code. See "systemctl status plesk-php74-fpm.service" and "journalctl -xe" for details. Failed to start plesk-php74-fpm service


screencapture-vmi413842-contaboserver-net-8443-admin-services-list-2020-09-04-13_06_11.png
 
It looks like that one or multiple domain socket files "php-fpm.sock" are corrupted.

Try to manually remove socket file /var/www/vhosts/system/example.com/php-fpm.sock:

# rm -f /var/www/vhosts/system/lese7tak.com/php-fpm.sock
 
It looks like that one or multiple domain socket files "php-fpm.sock" are corrupted.

Try to manually remove socket file /var/www/vhosts/system/example.com/php-fpm.sock:

# rm -f /var/www/vhosts/system/lese7tak.com/php-fpm.sock
php-fpm.sock corrupted in all server

Not only this range

The entire server has the same error
 
You can get list of all domains that use "PHP x.x by OS vendor, PHP-FPM" handler:

# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin psa -Ne "select dom_id from hosting where php_handler_id= 'fpm' " > /root/dom_with_fpm.txt

Then use the following bash script to recreate php.sock files for domains by switching php handler to fastcgi and back to fpm managed by Apache:
Code:
#!/bin/bash

## convert domain IDs to domain names ##
file1="/root/dom_with_fpm.txt"
while IFS= read -r line
do
MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin psa -Ne "select name from domains where id=$line " >> /root/dom_with_fpm_names.txt
done <"$file1"

## recreate php.sock files for domains by switching php handler to fastcgi and back to fpm ##
file2="/root/dom_with_fpm_names.txt"
while IFS= read -r line
do
plesk bin domain -u $line -php_handler_id fastcgi -nginx-serve-php false;
plesk bin domain -u $line -php_handler_id fpm -nginx-serve-php false;
done <"$file2"

Note: If there are many domains that use handler "PHP x.x by OS vendor, PHP-FPM managed by Apache." it can take some time for the script to finish. For example: for 450 domains script was executing 3 hours.
 
Back
Top