Debian 8 - Nginx + PHP7-FPM - Pool does not exist when adding new domain Topic is solved

Debian/Ubuntu related topics
danimalweb
Posts: 8
Joined: Mon Nov 09, 2015 2:09 am

Debian 8 - Nginx + PHP7-FPM - Pool does not exist when adding new domain

Postby danimalweb » Sat Nov 26, 2016 8:07 pm

Debian 8 - R17 - Fresh Install

I've installed PHP-7.0-fpm, everything is going great, I've created the templates, updated vesta.conf with the new backend name, all good. I can stop / start / restart the service from the web GUI.

When I create the domain name I get the error message:

"php-fpm pool doesn't exist"

Looking at the domain.sh line 87 I see:

Code: Select all

pool=$(find /etc/php* -type d \( -name "pool.d" -o -name "*fpm.d" \))
    if [ ! -e "$pool" ]; then
        check_result $E_NOTEXIST "php-fpm pool doesn't exist"
    fi


Running:

Code: Select all

$(find /etc/php* -type d \( -name "pool.d" -o -name "*fpm.d" \))


Results in:

Code: Select all

bash: /etc/php/7.0/fpm/pool.d: Is a directory


and the file "www.conf" exists inside this dir.

Any idea why Vesta cannot find the pool?

Running:

Code: Select all

service php7.0-fpm status


shows everything is working fine:

Code: Select all

● php7.0-fpm.service - The PHP 7.0 FastCGI Process Manager
   Loaded: loaded (/lib/systemd/system/php7.0-fpm.service; enabled)
   Active: active (running) since Fri 2016-11-25 12:58:41 PST; 11h ago
     Docs: man:php-fpm7.0(8)
 Main PID: 418 (php-fpm7.0)
   Status: "Processes active: 0, idle: 2, Requests: 0, slow: 0, Traffic: 0req/sec"
   CGroup: /system.slice/php7.0-fpm.service
           ├─418 php-fpm: master process (/etc/php/7.0/fpm/php-fpm.conf)
           ├─468 php-fpm: pool www
           └─469 php-fpm: pool www

Nov 25 12:58:41 localdev03.example.com systemd[1]: Starting The PHP 7.0 FastCGI Process Manager...
Nov 25 12:58:41 localdev03.example.com systemd[1]: Started The PHP 7.0 FastCGI Process Manager.


I also updated:

Code: Select all

/usr/local/vesta/data/templates/web/php7.0-fpm/socket.tpl


From

Code: Select all

/var/run/php5-%backend%.sock
to

Code: Select all

/var/run/php/php7.0-%backend%.sock


Thanks.

mephivio
Posts: 157
Joined: Thu Mar 27, 2014 7:35 am
Location: France

Re: Debian 8 - Nginx + PHP7-FPM - Pool does not exist when adding new domain

Postby mephivio » Mon Nov 28, 2016 2:47 pm

i have the same problem
Vesta Team, any idea ?

mephivio
Posts: 157
Joined: Thu Mar 27, 2014 7:35 am
Location: France

Re: Debian 8 - Nginx + PHP7-FPM - Pool does not exist when adding new domain

Postby mephivio » Mon Nov 28, 2016 3:28 pm

I suppose i found the soluce
if you previously had Php5, just verify you remove it on /etc
Because you should have a pool.d directory for php5 too and the vesta script find 2 directories and doesn't know how to play with ...

if you want to have a copy of your php5 distrib, just rename /etc/php5/fpm/pool.d to /etc/php5/fpm/pool1.d
and try again ....

tell me if all is working fine now

danimalweb
Posts: 8
Joined: Mon Nov 09, 2015 2:09 am

Re: Debian 8 - Nginx + PHP7-FPM - Pool does not exist when adding new domain  Topic is solved

Postby danimalweb » Mon Nov 28, 2016 4:28 pm

Yep your right. Vesta was finding both pools.

Removing /etc/php5 did the trick.

Thanks.

Meow
Posts: 3
Joined: Tue Mar 28, 2017 8:28 am

Re: Debian 8 - Nginx + PHP7-FPM - Pool does not exist when adding new domain

Postby Meow » Fri Mar 31, 2017 10:41 pm

Is vesta's install script currently installing nginx-php7-fpm on a clean debian 8 minimal?
Or do we have to manually install 7 first or last?
I did see vesta picks php7-fpm on ubuntu 16.04, tested that, but does it also on deb 8 now?

Lesiu
Posts: 5
Joined: Thu Jul 27, 2017 10:20 am

Re: Debian 8 - Nginx + PHP7-FPM - Pool does not exist when adding new domain

Postby Lesiu » Mon Jul 31, 2017 11:45 am

No, vesta doesn't install php7 at all. You have to do it yourself.

mehargags
Moderators
Posts: 743
Joined: Sat Sep 06, 2014 9:58 pm

Re: Debian 8 - Nginx + PHP7-FPM - Pool does not exist when adding new domain

Postby mehargags » Wed Sep 20, 2017 2:40 pm

Hi,
I was just installing an Apache-less VestaCP on Debian 8.7 and I installed PHP 7.1 side-by-side to PHP 5.6

I'd like to keep both PHP versions and edit manually (or create template later) to use PHP 5 or PHP 7 anytime.

But encountered this same problem of vestaCP Error: php-fpm pool doesn't exist

I'm not sure which file to edit in this comments above
v-restart-web-backend , v-add-web-domain-backend , v-add-web-domain , v-add-domain

as I can't find what exact place you need to put theproposed change

Code: Select all

php_fpm=$(ls /etc/init.d/php*-fpm* 2>/dev/null |cut -f 4 -d /)
if [ -z "$php_fpm" ]; then
    service $WEB_BACKEND restart >/dev/null 2>&1
else
    service $php_fpm restart >/dev/null 2>&1
fi


Please let me know solutions for this

Falzo
Posts: 41
Joined: Mon Mar 28, 2016 8:49 am

Re: Debian 8 - Nginx + PHP7-FPM - Pool does not exist when adding new domain

Postby Falzo » Wed Sep 20, 2017 2:56 pm

mehargags wrote:Hi,
as I can't find what exact place you need to put theproposed change

Code: Select all

php_fpm=$(ls /etc/init.d/php*-fpm* 2>/dev/null |cut -f 4 -d /)
if [ -z "$php_fpm" ]; then
    service $WEB_BACKEND restart >/dev/null 2>&1
else
    service $php_fpm restart >/dev/null 2>&1
fi




i̶t̶ ̶i̶s̶ ̶i̶n̶ ̶/̶u̶s̶r̶/̶l̶o̶c̶a̶l̶/̶v̶e̶s̶t̶a̶/̶f̶u̶n̶c̶/̶d̶o̶m̶a̶i̶n̶.̶s̶h̶ ̶f̶r̶o̶m̶ ̶l̶i̶n̶e̶ ̶8̶5̶ ̶;̶-̶)̶

sorry, I did not read correctly and there let me fool by the pool detection part... the correct answer to the question where that special proposed change has to be done is /usr/local/vesta/bin/v-restart-web-backend , line 53 ...

so I'd replace the single line

Code: Select all

service $WEB_BACKEND restart >/dev/null 2>&1


with that block mentioned in https://github.com/serghey-rodin/vesta/issues/1025

also see the comment of lupul there about the additional symlinks and maybe adjust the part with the ls command accordingly...


Return to “Debian/Ubuntu”



Who is online

Users browsing this forum: No registered users and 3 guests