Bug 976666
| Summary: | httpd does not start at boottime | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | A.J. Werkman <aj.werkman> | ||||||
| Component: | httpd | Assignee: | Joe Orton <jorton> | ||||||
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
| Severity: | unspecified | Docs Contact: | |||||||
| Priority: | unspecified | ||||||||
| Version: | 19 | CC: | jkaluza, johannbg, jorton, lnykryn, mschmidt, msekleta, notting, pahan, plautrba, systemd-maint, vpavlin, zbyszek | ||||||
| Target Milestone: | --- | Keywords: | Reopened | ||||||
| Target Release: | --- | ||||||||
| Hardware: | x86_64 | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | httpd-2.4.6-2.fc19 | Doc Type: | Bug Fix | ||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2013-08-09 17:10:27 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: | |||||||||
| Attachments: |
|
||||||||
|
Description
A.J. Werkman
2013-06-21 06:59:23 UTC
Moving against correct component and please try to refrain yourself from fiddling with the priority and severity status on the reports your file. These fields are used internally by developers themselves to scheduler their work load. Please attach the output from journalctl -ba Thanks I think that's the same problem as already described in Bug 916143. I'm quoting my comment from that bug: > 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. The proper fix for that is probably to make httpd aware of network configuration changes, but that needs big changes to happen in httpd upstream and current stable releases (or even httpd's upstream repository) don't contain that. Please try to verify it's the same problem as in Bug 916143. More documentation on that topic can be found here: http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/ (In reply to Jan Kaluža from comment #2) > > The proper fix for that is probably to make httpd aware of network > configuration changes, but that needs big changes to happen in httpd > upstream and current stable releases (or even httpd's upstream repository) > don't contain that. > > Please try to verify it's the same problem as in Bug 916143. > > More documentation on that topic can be found here: > http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/ This solution makes http boot at system startup. Leaves two points: - This solution is not generic. It does not work for ntpd.service. Should I file this as a separate bug? - Why is not NetwerkManager-wait-online enabled if httpd.service is enabled? I would think, the end-user expects httpd to start at boottime if he requests a 'Web-server' install of fedora. The avarage user might not be able to find this work-around. Enabling the "NetworkManager-wait-online" service if httpd is enabled would be surprising behaviour. I'm afraid there is no "generally correct" solution here. In most httpd configurations (and the default) it should not matter if httpd is started early, because httpd will bind to 0.0.0.0/:: and not care about specific interfaces, etc. Whether or not you want httpd to start earlier or later than completion of network configuration is a per-system administrator choice; so our default is always going to be "wrong" for some users. That's just the nature of defaults. Jan, Joe, does httpd use the IP_FREEBIND socket option (man 7 ip)? That would allow it to bind() to IP addresses that are not yet configured on any interface. And it's easier to implement than adding the awareness of network configuration changes. That option would have to be added to APR package, since httpd does not use raw sockets (if I'm right), but uses APR for networking. I have suggested using that some months ago to fix this problem, but according to Joe there were some problems with using this option in APR. I can still try to patch APR to include this option, but Joe has the final word as APR maintainer. No, we can't enable FREEBIND for all listening sockets, it would be a change of semantics for the Listen directive and undesirable. In any case, Listen is only one way in which httpd can be configured to fail if started w/o a network at boot time. (In reply to Joe Orton from comment #4) > Enabling the "NetworkManager-wait-online" service if httpd is enabled would > be surprising behaviour. > > I'm afraid there is no "generally correct" solution here. In most httpd > configurations (and the default) it should not matter if httpd is started > early, because httpd will bind to 0.0.0.0/:: and not care about specific > interfaces, etc. I would like to point out, that in this bug I am using default settings. So it is not me configuring httpd in a way that it won't start at boot time. IMHO this violates against the final release criterion no 13. "All services in a default install must start properly" Hm, you are right. I have checked the error_log and it looks the root of problem is mod_uniqueid, which needs to know IP address of your hostname to compute unique IDs later. So it's not caused by not assigned IP addresses or change in default configuration, but by the fact that during boot your hostname does not have IP address assigned. I will think what to do with that... Just for a test, could you please try to disable mod_unique_id in /etc/httpd/conf.modules.d/00-base.conf and verify it's the only problematic module causing the httpd start problems during the boot on your network configuration? Created attachment 765538 [details]
proposed patch
(In reply to Jan Kaluža from comment #10) > Just for a test, could you please try to disable mod_unique_id in > /etc/httpd/conf.modules.d/00-base.conf and verify it's the only problematic > module causing the httpd start problems during the boot on your network > configuration? Disabling this module lets httpd start at bootup. can you please try it with following scratch-build? it contains the patch I've attached in Commnent 11. http://koji.fedoraproject.org/koji/taskinfo?taskID=5545990 (... with the module enabled of course) Did a fresh Web-server install. Enabled httpd.service. Rebooted and verified that httpd did not start Updated the httpd as asked in comment #13 Rebooted and now httpd does start at bootup httpd-2.4.6-2.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/httpd-2.4.6-2.fc19 Package httpd-2.4.6-2.fc19: * should fix your issue, * was pushed to the Fedora 19 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing httpd-2.4.6-2.fc19' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-13994/httpd-2.4.6-2.fc19 then log in and leave karma (feedback). httpd-2.4.6-2.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report. |