Symptoms:
The ea-php##-php-fpm services fails to start and when the status of a service is checked you will see the following errors:
systemctl status ea-php72-php-fpm.service
● ea-php72-php-fpm.service - The PHP FastCGI Process Manager
Loaded: loaded (/usr/lib/systemd/system/ea-php72-php-fpm.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2021-01-21 13:36:49 EST; 1min 39s ago
Process: 6376 ExecStart=/opt/cpanel/ea-php72/root/usr/sbin/php-fpm --nodaemonize (code=exited, status=78)
Main PID: 6376 (code=exited, status=78)
Jan 21 13:36:48 myserver.host.tld systemd[1]: Starting The PHP FastCGI Process Manager...
Jan 21 13:36:48 myserver.host.tld php-fpm[6376]: [21-Jan-2021 13:36:48] WARNING: Nothing matches the include pattern '/opt/cpanel/ea-php72/root/etc/php-...t line 8.
Jan 21 13:36:48 myserver.host.tld php-fpm[6376]: [21-Jan-2021 13:36:48] ERROR: No pool defined. at least one pool section must be specified in config file
Jan 21 13:36:48 myserver.host.tld php-fpm[6376]: [21-Jan-2021 13:36:48] ERROR: failed to post process the configuration
Jan 21 13:36:48 myserver.host.tld php-fpm[6376]: [21-Jan-2021 13:36:48] ERROR: FPM initialization failed
Jan 21 13:36:49 myserver.host.tld systemd[1]: ea-php72-php-fpm.service: main process exited, code=exited, status=78/n/a
Jan 21 13:36:49 myserver.host.tld systemd[1]: Failed to start The PHP FastCGI Process Manager.
Jan 21 13:36:49 myserver.host.tld systemd[1]: Unit ea-php72-php-fpm.service entered failed state.
Jan 21 13:36:49 myserver.host.tld systemd[1]: ea-php72-php-fpm.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
Description:
This is usually the result of empty configuration files existing in PHP-FPM's configuration folder . If an empty PHP-FPM configuration file exist and there are no pool settings defined in that file, then PHP-FPM service throws the above error and fails to start.
Workaround:
You should be able to search for all the empty files in PHP-FPM configuration folders with the following command:
find /opt/cpanel/ea-php**/root/etc/php-fpm.d/ -type f -name "*conf*" -print | xargs file | grep -Ei empty
/opt/cpanel/ea-php73/root/etc/php-fpm.d/empty.tld.conf: empty
After you have found the empty file(s), you need to move that file away or alternatively remove it and then restart the service with the following command:
/scripts/restartsrv_apache_php_fpm --start
The service should start successfully and the status of the service should be reported as running.
Comments
0 comments
Article is closed for comments.