• 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

Question php issue

Stephan Griesel

Basic Pleskian
i am having this issue on my server with new versions of php, as soon as i go back to older version then everything works again. here is the situation: if i change to php 5.5.9 or later 7.0.10 then i get "service temporarily unavailable", if i change back to older php version then everything works again. what is the reason it is doing this and how can i fix it?
 
Hi Stephan Griesel,

sometimes the Plesk - "phpinimng" - usage, might result in issues/errors/problems. It is therefore a very good idea to inspect your psa - log - files, in order to see the root cause of your issue/error/problem.


Sometimes, it is as well a good idea to change the log - level, to get more informations in psa - log - files:



In some rare cases, the Plesk - "phpinimng" - usage results in a left-over of the previous installed PHP - FPM - configuration - file for a specific domain or sub-domain, located at "/etc/php5/fpm/pool.d/*" or "/opt/plesk/php/X.X/etc/php-fpm.d/*", which results in addition to a socket creation at "/var/www/vhosts/system/DOMAIN.COM-or-SUBDOMAIN.DOMAIN.COM/php-fpm.sock" for a ( maybe ) wrong PHP - version.
IF this rare issue/error/problem appears, you should see an error - message as well in the depending PHP - error - log, located at "/var/log/php5-fpm.log" or at "/var/log/plesk-phpXX-fpm/error.log".

To solve such ( rare ) issues, pls. DELETE the depending ( left-over ) files, as for example:

rm /var/www/vhosts/system/DOMAIN.COM-or-SUBDOMAIN.DOMAIN.COM/php-fpm.sock

rm /etc/php5/fpm/pool.d/SUBDOMAIN.DOMAIN.COM-or-DOMAIN.COM.conf
OR
rm /opt/plesk/php/X.X/etc/php-fpm.d/SUBDOMAIN.DOMAIN.COM-or-DOMAIN.COM.conf

... and restart the depending PHP - FPM - services from the command line:

service php5-fpm restart && service plesk-phpXX-fpm restart
Pls. note, that the subdomain-or-domain - specific PHP-FPM - configuration file will be created at each PHP - version change. ;)
 
thank you ufhh01! saved those 2 links for the logs, will have a look at them first before posting something on forum again. as you explained it looks like it is phpinimng that is causing the problems, see log below:

stderr:

invoke-rc.d: initscript plesk-php56-fpm, action "status" failed.
invoke-rc.d: initscript plesk-php56-fpm, action "status" failed.
Service plesk-php56-fpm is down after attempt to start it

[2016-09-22 06:51:18] ERR [panel] phpinimng failed: invoke-rc.d: initscript plesk-php56$
invoke-rc.d: initscript plesk-php56-fpm, action "status" failed.
Service plesk-php56-fpm is down after attempt to start it

[2016-09-22 06:51:24] ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/phpinimn$
[2016-09-22 06:51:24] ERR [1] '/opt/psa/admin/bin/phpinimng' '--type' 'fpm' '--service'$

please confirm if i must delete the depending left over files as per your previous post:

To solve such ( rare ) issues, pls. DELETE the depending ( left-over ) files, as for example:

rm /var/www/vhosts/system/DOMAIN.COM-or-SUBDOMAIN.DOMAIN.COM/php-fpm.sock

rm /etc/php5/fpm/pool.d/SUBDOMAIN.DOMAIN.COM-or-DOMAIN.COM.conf
OR
rm /opt/plesk/php/X.X/etc/php-fpm.d/SUBDOMAIN.DOMAIN.COM-or-DOMAIN.COM.conf


... and restart the depending PHP - FPM - services from the command line:

service php5-fpm restart && service plesk-phpXX-fpm restart
 
Hi Stephan Griesel,

investigations are done based on facts, not by guessing. Pls. read again, what I wrote above and investigate, WHY the service "plesk-php56-fpm" is down, after trying to restart it use the depending log - file and locate possible double configuration - files and sockets, as already suggested, BEFORE you are trying to delete them!

Service plesk-php56-fpm is down after attempt to start it
 
I had a look at the error log for php56 after changing it back again and now it seems to work?

[25-Sep-2016 20:19:40] NOTICE: fpm is running, pid 21282
[25-Sep-2016 20:19:41] NOTICE: ready to handle connections

I will continue troubleshooting tomorrow again, changing to 5.9 and see what output showing in logs. Where can I see the 5.9.9 logs? I only see the folders for 5.6 and 7?
 
Hi Stephan Griesel,

I think that you "stand on the hose" ( => german expression translated into english "auf dem Schlauch stehen" - I don't know if that makes sense in english :p )...


Let's assume, that you use a Debian/Ubuntu - based system and your vendor's PHP version is "5.5.9". As already stated, depending "SUBDOMAIN.DOMAIN.COM-or-DOMAIN.COM" - PHP-FPM - configuration files would then being stored at "/etc/php5/fpm/pool.d/SUBDOMAIN.DOMAIN.COM-or-DOMAIN.COM.conf" and the depending socket would be created at "/var/www/vhosts/system/DOMAIN.COM-or-SUBDOMAIN.DOMAIN.COM/php-fpm.sock".
Let's assume further, that you now change from your vendor's PHP - version to the Plesk - PHP - version "5.6" and again, you choosed PHP-FPM as your handler.

The Plesk's utility "phpinimng" should now DELETE the old "/etc/php5/fpm/pool.d/SUBDOMAIN.DOMAIN.COM-or-DOMAIN.COM.conf" and create a new one at "/opt/plesk/php/5.6/etc/php-fpm.d/SUBDOMAIN.DOMAIN.COM-or-DOMAIN.COM.conf" and should as well restart the vendor's PHP-FPM-service ( => php5-fpm ) and the depending Plesk PHP-FPM-service ( in my example it's plesk-php56-fpm ).

BUT ( !!! ) - and now comes the possible issue ( !!! ) - the Plesk - service "plesk-php56-fpm" is being restartet BEFORE the vendor's PHP-FPM - service "php5-fpm" and the result is, that the Plesk - service "plesk-php56-fpm" CAN'T CREATE the socket at "/var/www/vhosts/system/DOMAIN.COM-or-SUBDOMAIN.DOMAIN.COM/php-fpm.sock", because it has already been created and is therefore existent from the vendor's PHP-FPM - version. The result is an error - message, which you already mentioned: "Service plesk-php56-fpm is down after attempt to start it". If you experience this issue, pls. INVESTIGATE, if the root cause for a non-starting Plesk - service "plesk-php56-fpm" is a left-over "/etc/php5/fpm/pool.d/SUBDOMAIN.DOMAIN.COM-or-DOMAIN.COM.conf"

ls -l /etc/php5/fpm/pool.d
ls -l /var/www/vhosts/system/DOMAIN.COM-or-SUBDOMAIN.DOMAIN.COM

If the outputs for this commands over the command line are now still for example:
-rw-r--r-- 1 root root 147 Jan 1 00:01 SUBDOMAIN.DOMAIN.COM-or-DOMAIN.COM.conf
and
srw-rw---- 1 root psaserv 0 Jan 1 00:01 php-fpm.sock

... then you have to follow the suggestions above:
To solve such ( rare ) issues, pls. DELETE the depending ( left-over ) files, as for example:

rm /var/www/vhosts/system/DOMAIN.COM-or-SUBDOMAIN.DOMAIN.COM/php-fpm.sock

rm /etc/php5/fpm/pool.d/SUBDOMAIN.DOMAIN.COM-or-DOMAIN.COM.conf
OR
rm /opt/plesk/php/X.X/etc/php-fpm.d/SUBDOMAIN.DOMAIN.COM-or-DOMAIN.COM.conf

... and restart the depending PHP - FPM - services from the command line:

service php5-fpm restart && service plesk-phpXX-fpm restart




 
Got the issue now again @UFHH01 and now your post is making sense. The socket has already been created on another domain, not sure why it is showing to different domain as to the one's PHP version I am trying to change. Here is the error.log. I am using Ubuntu 14.04.4.

[05-Oct-2016 08:57:05] NOTICE: configuration file /opt/plesk/php/5.6/etc/php-fpm.conf test is successful
[05-Oct-2016 08:57:05] ERROR: An another FPM instance seems to already listen on /var/www/vhosts/system/{domain}/php-fpm.sock
[05-Oct-2016 08:57:05] ERROR: FPM initialization failed
[05-Oct-2016 08:57:09] NOTICE: configuration file /opt/plesk/php/5.6/etc/php-fpm.conf test is successful
[05-Oct-2016 08:57:09] ERROR: An another FPM instance seems to already listen on /var/www/vhosts/system/{domain}/php-fpm.sock
[05-Oct-2016 08:57:09] ERROR: FPM initialization failed
 
Back
Top