Bug 916143

Summary: httpd does not start at boot
Product: [Fedora] Fedora Reporter: Gregor Hlawacek <gregor>
Component: httpdAssignee: Joe Orton <jorton>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: jkaluza, jorton, pahan
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: 2013-05-10 05:32:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Gregor Hlawacek 2013-02-27 12:05:20 UTC
Description of problem:

When booting the httpd server is not started. It complains about beeing not able to resolve the domainname. Looks like a race condition with the sequence of starting the network and httpd.

The server starts without problem if done by hand.


Version-Release number of selected component (if applicable):
httpd-2.4.3-15.fc18

How reproducible:

always

Steps to Reproduce:
1. reboot
2.
3.
  
Actual results:
systemctl status httpd
 
httpd.service - The Apache HTTP Server
	  Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled)
	  Active: failed (Result: exit-code) since Wed 2013-02-27 12:48:45 CET; 4min 49s ago
	 Process: 1348 ExecStop=/usr/sbin/httpd $OPTIONS -k graceful-stop (code=exited, status=0/SUCCESS)
	 Process: 1246 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)

Feb 27 12:48:44 ssp-ws081.tnw.utwente.nl systemd[1]: Starting The Apache HTTP Server...
Feb 27 12:48:45 ssp-ws081.tnw.utwente.nl httpd[1246]: AH00557: httpd: apr_sockaddr_info_get() failed for ssp-ws081.tnw.utwente.nl
Feb 27 12:48:45 ssp-ws081.tnw.utwente.nl httpd[1246]: AH00558: httpd: Could not reliably determine the server's fully qualified domai...essage
Feb 27 12:48:45 ssp-ws081.tnw.utwente.nl systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Feb 27 12:48:45 ssp-ws081.tnw.utwente.nl httpd[1348]: AH00557: httpd: apr_sockaddr_info_get() failed for ssp-ws081.tnw.utwente.nl
Feb 27 12:48:45 ssp-ws081.tnw.utwente.nl httpd[1348]: AH00558: httpd: Could not reliably determine the server's fully qualified domai...essage
Feb 27 12:48:45 ssp-ws081.tnw.utwente.nl httpd[1348]: httpd (no pid file) not running
Feb 27 12:48:45 ssp-ws081.tnw.utwente.nl systemd[1]: Failed to start The Apache HTTP Server.
Feb 27 12:48:45 ssp-ws081.tnw.utwente.nl systemd[1]: Unit httpd.service entered failed state



Expected results:

should start at boot

Additional info:

Comment 1 Jan Kaluža 2013-04-15 06:49:32 UTC
You should be able to fix it by enabling this service:

systemctl enable NetworkManager-wait-online.service

Systemd presumes that applications can react on networking changes, but httpd does not support that. There is no way to configure httpd to wait until the IP address you want to use is bound. So if you have configured httpd to listen on specific IP instead of 0.0.0.0, you should ensure it's available when httpd is started by enabling NetworkManager-wait-online.service.

Comment 2 Jan Kaluža 2013-05-10 05:32:32 UTC
I'm closing this one as WONTFIX. There is known workaround for this situation and it's not possible to fix it easily without bigger upstream changes.