[php-maint] Bug#619546: Bug#619546: Bug#619546: php5-fpm init script failing with error code 1 regardless of failure
Arthur Gautier
arthur at ows.fr
Mon Mar 28 07:44:16 UTC 2011
On 03/28/2011 12:06 AM, OverlordQ wrote:
> On 3/27/2011 9:36 AM, Ondřej Surý wrote:
>> tags 619546 +moreinfo
>> thank you
>>
>> Could you please set VERBOSE=yes in /etc/default/rcS and try to
>> reproduce the problem? The installation is OK on my test system.
>>
>
> Strange. I ran it once first:
> ---
> thedarkcitadel:/home/ovrlrdq# aptitude full-upgrade
> The following partially installed packages will be configured:
> php5-fpm
> No packages will be installed, upgraded, or removed.
> 0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
> Need to get 0 B of archives. After unpacking 0 B will be used.
> Setting up php5-fpm (5.3.6-4) ...
> invoke-rc.d: initscript php5-fpm, action "start" failed.
> dpkg: error processing php5-fpm (--configure):
> subprocess installed post-installation script returned error exit status 1
> configured to not write apport reports
> Errors were encountered while
> processing:
> php5-fpm
> E: Sub-process /usr/bin/dpkg returned an error code (1)
> A package failed to install. Trying to recover:
> Setting up php5-fpm (5.3.6-4) ...
> invoke-rc.d: initscript php5-fpm, action "start" failed.
> dpkg: error processing php5-fpm (--configure):
> subprocess installed post-installation script returned error exit status 1
> Errors were encountered while processing:
> php5-fpm
> --
>
> Decidedly broken, modified rcS to set verbose:
>
> --
> thedarkcitadel:/home/ovrlrdq# nano /etc/default/rcS
> --
>
> then ran it again
>
> --
> thedarkcitadel:/home/ovrlrdq# aptitude full-upgrade
> The following partially installed packages will be configured:
> php5-fpm
> No packages will be installed, upgraded, or removed.
> 0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
> Need to get 0 B of archives. After unpacking 0 B will be used.
> Setting up php5-fpm (5.3.6-4) ...
> Starting PHP5 FastCGI Process Manager: php5-fpm.
>
> thedarkcitadel:/home/ovrlrdq#
> --
>
> And that worked.
>
> With verbose off and php5-fpm running:
>
> --
> thedarkcitadel:/home/ovrlrdq# /etc/init.d/php5-fpm stop
> thedarkcitadel:/home/ovrlrdq# echo $?
> 1
> --
>
> With verbose on and php5-fpm running:
>
> --
> thedarkcitadel:/home/ovrlrdq# /etc/init.d/php5-fpm stop
> Stopping PHP5 FastCGI Process Manager: php5-fpm.
> thedarkcitadel:/home/ovrlrdq# echo $?
> 0
> --
>
Hi ! :)
Got the exact same issue, this occurs if you upgrade from
php5-fpm_5.3.6-2_i386.deb
Here is the log to reproduce:
# dpkg -i --force-depends /var/cache/apt/archives/php5-fpm_5.3.6-2_i386.deb
(Reading database ... 228735 files and directories currently installed.)
Preparing to replace php5-fpm 5.3.6-2 (using
.../php5-fpm_5.3.6-2_i386.deb) ...
Unpacking replacement php5-fpm ...
dpkg: php5-fpm: dependency problems, but configuring anyway as you
requested:
php5-fpm depends on php5-common (= 5.3.6-2); however:
Version of php5-common on system is 5.3.6-4.
Setting up php5-fpm (5.3.6-2) ...
Installing new version of config file /etc/php5/fpm/pool.d/www.conf ...
Configuration file `/etc/init.d/php5-fpm'
==> Deleted (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** php5-fpm (Y/I/N/O/D/Z) [default=N] ? Y
Installing new version of config file /etc/init.d/php5-fpm ...
update-rc.d: warning: php5-fpm stop runlevel arguments (0 1 6) do not
match LSB Default-Stop values (none)
[28-Mar-2011 09:30:55] WARNING: [pool www] pm.start_servers is not set.
It's been set to 20.
[28-Mar-2011 09:30:55] WARNING: [pool superbaloo] pm.start_servers is
not set. It's been set to 3.
[28-Mar-2011 09:30:55] NOTICE: configuration file
/etc/php5/fpm/php-fpm.conf test is successful
Starting PHP5 FPM....
Processing triggers for man-db ...
# dpkg -i --force-depends /var/cache/apt/archives/php5-fpm_5.3.6-4_i386.deb
(Reading database ... 228735 files and directories currently installed.)
Preparing to replace php5-fpm 5.3.6-2 (using
.../php5-fpm_5.3.6-4_i386.deb) ...
[28-Mar-2011 09:31:11] WARNING: [pool www] pm.start_servers is not set.
It's been set to 20.
[28-Mar-2011 09:31:11] WARNING: [pool superbaloo] pm.start_servers is
not set. It's been set to 3.
[28-Mar-2011 09:31:11] NOTICE: configuration file
/etc/php5/fpm/php-fpm.conf test is successful
Stopping PHP5 FPM....
Unpacking replacement php5-fpm ...
Setting up php5-fpm (5.3.6-4) ...
Installing new version of config file /etc/init.d/php5-fpm ...
Installing new version of config file /etc/php5/fpm/pool.d/www.conf ...
update-rc.d: warning: php5-fpm stop runlevel arguments (0 1 6) do not
match LSB Default-Stop values (none)
[28-Mar-2011 09:31:12] WARNING: [pool superbaloo] pm.start_servers is
not set. It's been set to 3.
invoke-rc.d: initscript php5-fpm, action "start" failed.
dpkg: error processing php5-fpm (--install):
subprocess installed post-installation script returned error exit status 1
Processing triggers for man-db ...
Errors were encountered while processing:
php5-fpm
The problem is that /etc/init.d/php5-fpm is returning 1.
# bash -x /etc/init.d/php5-fpm start
+ PATH=/sbin:/usr/sbin:/bin:/usr/bin
+ DESC='PHP5 FastCGI Process Manager'
+ NAME=php5-fpm
+ DAEMON=/usr/sbin/php5-fpm
+ DAEMON_ARGS='--fpm-config /etc/php5/fpm/php-fpm.conf'
+ PIDFILE=/var/run/php5-fpm.pid
+ TIMEOUT=30
+ SCRIPTNAME=/etc/init.d/php5-fpm
+ '[' -x /usr/sbin/php5-fpm ']'
+ '[' -r /etc/default/php5-fpm ']'
+ . /lib/init/vars.sh
++ '[' -f /etc/default/rcS ']'
++ . /etc/default/rcS
+++ TMPTIME=0
+++ SULOGIN=no
+++ DELAYLOGIN=no
+++ UTC=yes
+++ VERBOSE=no
+++ FSCKFIX=no
+++ RAMRUN=no
+++ RAMLOCK=no
++ '[' -r /proc/cmdline ']'
+++ cat /proc/cmdline
++ for ARG in '$(cat /proc/cmdline)'
++ case $ARG in
++ for ARG in '$(cat /proc/cmdline)'
++ case $ARG in
++ for ARG in '$(cat /proc/cmdline)'
++ case $ARG in
++ '[' '' ']'
+ . /lib/lsb/init-functions
++ FANCYTTY=
++ '[' -e /etc/lsb-base-logging.sh ']'
++ true
+ case "$1" in
+ '[' no '!=' no ']'
+ do_check
++ /usr/sbin/php5-fpm --fpm-config /etc/php5/fpm/php-fpm.conf -t
++ grep '\[ERROR\]'
+ FPM_ERROR=
+ '[' -n '' ']'
+ return 0
+ case "$?" in
+ do_start
+ start-stop-daemon --start --quiet --pidfile /var/run/php5-fpm.pid
--exec /usr/sbin/php5-fpm --test
+ start-stop-daemon --start --quiet --pidfile /var/run/php5-fpm.pid
--exec /usr/sbin/php5-fpm -- --fpm-config /etc/php5/fpm/php-fpm.conf
[28-Mar-2011 09:36:03] WARNING: [pool superbaloo] pm.start_servers is
not set. It's been set to 3.
+ case "$?" in
+ '[' no '!=' no ']'
# echo $?
1
The thing i don't get is: While i get a warning on my php-fpm
configuration. The start-stop-daemon still returns 0 :
# start-stop-daemon --start --quiet --pidfile /var/run/php5-fpm.pid
--exec /usr/sbin/php5-fpm -- --fpm-config /etc/php5/fpm/php-fpm.conf
[28-Mar-2011 09:40:31] WARNING: [pool superbaloo] pm.start_servers is
not set. It's been set to 3.
# echo $?
0
Hope this may helps :)
By the way, rm /etc/init.d/php5-fpm && aptitude reinstall php5-fpm fixed
the problem for me :)
--
Arthur Gautier
More information about the pkg-php-maint
mailing list