Closed drsdre closed 7 years ago
The issues seems to be related to line 872 of vst-install-ubuntu.sh:
php_fpm=$(ls /etc/init.d/php*-fpm* |cut -f 4 -d /)
The result of this function is two upstart jobs instead of the expected one job:
ls /etc/init.d/php*-fpm* |cut -f 4 -d /
php-fpm
php7.0-fpm
The following changes fixes the situation for me. First of all I'm filtering out the symlinked php-fpm. Second I have added the ability to handle multiple PHP versions by looping through the resultset and thus all php-fpm init job are triggered. But only one php fpm init job can be symlinked, so most likely more changes are required to handle multiple PHP versions.
for php_fpm in $(ls /etc/init.d/php*-fpm* |grep -v "php-fpm"|cut -f 4 -d /); do
ln -s /etc/init.d/$php_fpm /etc/init.d/php-fpm > /dev/null 2>&1
update-rc.d $php_fpm defaults
service $php_fpm start
check_result $? "php-fpm start failed"
done
Similar problem is found when editing php.ini or php-fpm configs (ex: :8083/edit/server/php-fpm/) Script v-change-sys-service-config cannot find the correct service name https://github.com/serghey-rodin/vesta/blob/master/bin/v-change-sys-service-config#L98
if [ "$service" = 'php' ]; then
if [ "$WEB_SYSTEM" = "nginx" ]; then
-- service=$(ls /usr/sbin/php*fpm* |cut -f 4 -d /)
++ service=$(ls /etc/init.d/php*fpm* |cut -f 4 -d /| sort | head -1)
else
service=$WEB_SYSTEM
fi
fi
I've similar problem with a clean ubuntu 14.04.
I can't install vesta because php-fpm issue.
Saving to: ‘/etc/php5/fpm/pool.d/www.conf’
100%[======================================>] 204 --.-K/s in 0s
2017-02-23 01:22:25 (27.9 MB/s) - ‘/etc/php5/fpm/pool.d/www.conf’ saved [204/204]
update-rc.d: warning: start runlevel arguments (none) do not match php5-fpm Default-Start values (2 3 4 5)
update-rc.d: warning: stop runlevel arguments (none) do not match php5-fpm Default-Stop values (0 1 6)
usage: update-rc.d [-n] [-f]
The disable|enable API is not stable and might change in the future. Error: php-fpm start failed
ls -la /etc/init.d/php*-fpm*
-rwxr-xr-x 1 root root 4403 Feb 17 2014 /etc/init.d/php5-fpm
lrwxrwxrwx 1 root root 20 Feb 23 01:05 /etc/init.d/php-fpm -> /etc/init.d/php5-fpm
# php -v
PHP 5.5.9-1ubuntu4.21 (cli) (built: Feb 9 2017 20:54:58)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies
Also happend in the installer when is in this part.
System start/stop links for /etc/init.d/fail2ban already exist.
* Starting authentication failure monitor fail2ban [ OK ]
Error: php-fpm restart failed
Error: can't create domain.com domain
Point to
https://github.com/serghey-rodin/vesta/blob/master/install/vst-install-ubuntu.sh#L1220
I'm not sure what is refering for when try to restart php-fpm
Fixed? Having similar issues as @SnAFKe mentioned
OS: Ubuntu 14.04.5 x64
bash vst-install.sh --nginx yes --phpfpm yes --apache no --named yes --remi yes --vsftpd yes --proftpd no --iptables yes --fail2ban yes --quota yes --exim yes --dovecot yes --spamassassin yes --clamav yes --mysql yes --postgresql yes --hostname panel.123.com --email 123@123.com --password 123
There are some proposed changes to the v-restart-web-backend script;
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
https://github.com/serghey-rodin/vesta/commit/76d518bf864fd6e53a36253c12d8e78d9c61a7a7 This solved my issue
This previous mentioned commit does not work for Ubuntu 16.04 at least. The installer creates a symlink in that folder so it will return two files (as @SnAFKe shown earlier)
$ ls -l /etc/init.d/php*-fpm*
lrwxrwxrwx 1 root root 22 Jul 30 04:11 /etc/init.d/php-fpm -> /etc/init.d/php7.0-fpm
-rwxr-xr-x 1 root root 4987 May 12 02:12 /etc/init.d/php7.0-fpm
So correct fix would either use the created symlink and not scan that folder or ignore symlinks when listing that folder content:
$ ls -l /etc/init.d/php*-fpm* | grep -v ^l | cut -f 4 -d /
php7.0-fpm
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 the proposed change
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 tagging @dpeca @serghey-rodin
I never used php-fpm on production server (except testing long time ago on virtual machine) so my knowledge about php-fpm is very very small :(
Debian 8, Ubuntu 14 officially is not supported php 7x by default On Ubuntu 16x i cant reproduce problem with restarting php-fpm during the installation process
Don't know why this is closed, it's still an issue today, March 22 2018. It fails to install on a brand new Ubuntu 14 minimal.
PUSH THIS!
I have multiple php-fpm versions and face this issue as well.
Operating System (OS/VERSION):
Ubuntu 16.04
VestaCP Version:
R17
Installed Software (what you got with the installer):
bash vst-install.sh --nginx yes --phpfpm yes --apache no --vsftpd no --proftpd no --exim no --dovecot no --spamassassin no --clamav no --named no --iptables yes --fail2ban yes --mysql yes --postgresql no --remi yes --quota no
Steps to Reproduce:
On first run of installation string above, it fails with:
After a reboot, the php7.0-fpm server is started but as the installation process got terminated half way, VestaCP is not reachable.
Forcing the the installation will have it fail again at configuring php fpm 7.0: