Bug 771572

Summary: httpd fails to start using systemd / systemctl (starts manually ok)
Product: [Fedora] Fedora Reporter: Patrick Sefton <plgs>
Component: systemdAssignee: systemd-maint
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 15CC: johannbg, lpoetter, metherid, notting, plautrba, systemd-maint
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-01-04 11:50:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Patrick Sefton 2012-01-04 07:42:56 UTC
Description of problem:
httpd fails to start using systemd / systemctl (after upgrade from F14 to F15) but starting httpd manually works

Version-Release number of selected component (if applicable):
httpd-2.2.21-1.fc15 (x86_64)
systemd-26-13.fc15 (x86_64)

How reproducible:
Always

Steps to Reproduce:
1. # systemctl start httpd.service
  
Actual results:
# systemctl start httpd.service
Job failed. See system logs and 'systemctl status' for details.

Expected results:
httpd starts normally (asks for SSL passphrase, as expected)

Additional info:
# httpd -k start
works

# httpd
works

# systemctl status httpd.service
httpd.service - LSB: start and stop Apache HTTP Server
	  Loaded: loaded (/etc/rc.d/init.d/httpd)
	  Active: failed since Wed, 04 Jan 2012 17:32:32 +1000; 2min 12s ago
	 Process: 2825 ExecStart=/etc/rc.d/init.d/httpd start (code=exited, status=1/FAILURE)
	  CGroup: name=systemd:/system/httpd.service

/var/log/httpd/error_log for fail case:
[Wed Jan 04 17:38:14 2012] [notice] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Wed Jan 04 17:38:14 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Jan 04 17:38:14 2012] [notice] SSL FIPS mode disabled

/var/log/httpd/error_log for success case (manual start):
[Wed Jan 04 17:39:50 2012] [notice] Digest: generating secret for digest authentication ...
[Wed Jan 04 17:39:50 2012] [notice] Digest: done
[Wed Jan 04 17:39:51 2012] [notice] SSL FIPS mode disabled
[Wed Jan 04 17:39:51 2012] [notice] Apache/2.2.21 (Unix) DAV/2 PHP/5.3.8 mod_ssl/2.2.21 OpenSSL/1.0.0e-fips configured -- resuming normal operations

Comment 1 Patrick Sefton 2012-01-04 11:49:39 UTC
Adding
SSLPassPhraseDialog exec:/usr/local/bin/httpd-ask-password
to /etc/httpd/ssl.conf

and then following a number of SELinux alert suggestions / solutions to correct permissions for systemd-ask-password and systemd-tty-ask-password-agent

fixed this for me.

Comment 2 Patrick Sefton 2012-01-04 11:50:27 UTC

*** This bug has been marked as a duplicate of bug 707917 ***