# service php-fpm start Job for php-fpm.service failed. See 'systemctl status php-fpm.service' and 'journalctl -n' for details. # systemctl status php-fpm.service php-fpm.service - The PHP FastCGI Process Manager Loaded: loaded (/usr/lib/systemd/system/php-fpm.service; enabled) Active: failed (Result: exit-code) since Wed, 2013-04-24 11:40:37 CST; 10s ago Process: 1302 ExecStart=/usr/sbin/php-fpm ${PHP_FPM_OPTIONS} (code=exited, status=64) CGroup: name=systemd:/system/php-fpm.service Apr 24 11:40:37 localhost php-fpm[1302]: -y, --fpm-config <file> Apr 24 11:40:37 localhost php-fpm[1302]: Specify alternative path to FastCGI process manager config file. Apr 24 11:40:37 localhost php-fpm[1302]: -t, --test Test FPM configuration and exit Apr 24 11:40:37 localhost php-fpm[1302]: -D, --daemonize force to run in background, and ignore daemonize option from config file Apr 24 11:40:37 localhost php-fpm[1302]: -F, --nodaemonize Apr 24 11:40:37 localhost php-fpm[1302]: force to stay in foreground, and ignore daemonize option from config file Apr 24 11:40:37 localhost php-fpm[1302]: -R, --allow-to-run-as-root Apr 24 11:40:37 localhost php-fpm[1302]: Allow pool to run as root (disabled by default) Apr 24 11:40:37 localhost systemd[1]: Failed to start The PHP FastCGI Process Manager. Apr 24 11:40:37 localhost systemd[1]: Unit php-fpm.service entered failed state I guess the problem comes from unexpaned ${PHP_FPM_OPTIONS}. Reproducible: Steps to Reproduce:
Assignee: bugsquad => oe
I'm for following changes, it works without futher changes. $ svn diff Index: SOURCES/php-fpm.sysconf =================================================================== --- SOURCES/php-fpm.sysconf (revision 411137) +++ SOURCES/php-fpm.sysconf (working copy) @@ -1,3 +1,3 @@ # pass additional options here -PHP_FPM_OPTIONS="" +PHP_FPM_OPTIONS="-D"
CC: (none) => mageia
Personally I think it's better to fix the systemd unit in this case. After all the options in the unit and the config have to match up if it's to work. If you have Type=forking in the unit, then you *have* to have -D in the config... if you have Type=simple in the unit, then you *have* to have -F in the config... So the two are lock stepped and it doesn't make sense IMO to split it up. So for minimal change, I'd just put -D con the command line in the unit and leave the config alone. If it were not release freeze I'd suggest experimenting with Type=simple and -F but it's likely a bit too late to go fiddling!
Of course, I still have another patch against unit: $ svn diff Index: SOURCES/php-fpm.service =================================================================== --- SOURCES/php-fpm.service (revision 411137) +++ SOURCES/php-fpm.service (working copy) @@ -6,8 +6,8 @@ Type=forking PIDFile=/var/run/php-fpm/php-fpm.pid EnvironmentFile=/etc/sysconfig/php-fpm -ExecStart=/usr/sbin/php-fpm ${PHP_FPM_OPTIONS} -ExecReload=/bin/kill -USR2 $MAINPID +ExecStart=/usr/sbin/php-fpm $PHP_FPM_OPTIONS +ExecReload=/usr/bin/kill -USR2 $MAINPID [Install] WantedBy=multi-user.target This patch make it work, also, without change config. Maybe there is something wrong with variable expanding.
Ahh yes that's probably fine then. The ${FOO} syntax is not supported AFAIK, so this makes sense. ${FOO} is a shell things and this is not shell even if it looks a little bit like it! Same with putting shell stuff in the actual EnvironmentFile... Cheers for this!
(In reply to Colin Guthrie from comment #4) > Ahh yes that's probably fine then. The ${FOO} syntax is not supported AFAIK, > so this makes sense. ${FOO} is a shell things and this is not shell even if > it looks a little bit like it! Same with putting shell stuff in the actual > EnvironmentFile... Well, it should be supported according to: http://fedoraproject.org/wiki/Packaging:Systemd#EnvironmentFiles_and_support_for_.2Fetc.2Fsysconfig_files
Ahh I stand corrected :) I guess then it expands to an empty "" on the command line? Either way, thanks for fixing :)
fixed by pushing new build.
Status: NEW => RESOLVEDResolution: (none) => FIXED