Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1352139 - httpd fails to start
httpd fails to start
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: httpd (Show other bugs)
24
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Jan Kaluža
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-07-01 14:32 EDT by David A. De Graaf
Modified: 2016-07-04 07:25 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-04 07:25:40 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description David A. De Graaf 2016-07-01 14:32:01 EDT
Description of problem:
On a fresh installation of Fedora 24, httpd fails to start.
journalctl -b shows these errors:
  Jun 27 10:33:17 garfield httpd[1100]: (99)Cannot assign requested
  address: AH00072: make_sock: could not bind to address
  192.168.10.99:80
  Jun 27 10:33:17 garfield httpd[1100]: no listening sockets
  available, shutting down


Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1.  Configure httpd to listen on a specific (local) IP.
2.  Reboot.
3.  Observe that httpd failed to start.

Actual results:
httpd startup fails.

Expected results:
httpd startup succeeds.

Additional info:

It can be started manually later, readily enough, with
  systemctl start httpd
but that's a PITA.

Sam Varshavchik, on the users@lists.fedoraproject.org, replied to me that privoxy exhibits the same failure.  I tried his recommended fix by adding
/etc/systemd/system/httpd.service with these changes:

# diff /usr/lib/systemd/system/httpd.service /etc/systemd/system/httpd.service
19c19,21
< After=network.target remote-fs.target nss-lookup.target
---
> Wants=network-online.target
> After=network-online.target remote-fs.target nss-lookup.target
> ## After=network.target remote-fs.target nss-lookup.target

but it had no effect.  
I surely don't understand the intricacies of systemd notation.  

I also discovered BZ 1119787, which suggests this is a long-standing problem with many systemd startups, desperately seeking a solution.
Comment 1 David A. De Graaf 2016-07-01 17:38:02 EDT
Another comment from Jose Maria Terry Jimenez suggested that it's also
necessary to:
   systemctl enable NetworkManager-wait-online

And with that service also added, httpd now starts correctly.
Sheesh!
Comment 2 David A. De Graaf 2016-07-03 15:24:44 EDT
Comment 1 was based on a single test.
Two reboots following a dnf update, and a new kernel (4.6.3-300.fc24.x86_64)
have failed to start httpd.
So, the fixes fix nothing!

I'm baffled and bewildered.
Comment 3 Joe Orton 2016-07-04 07:25:40 EDT
Sorry, bugzilla isn't a support forum.  

In the default configuration, httpd does not require any specific IP address to be associated; the shipped systemd httpd.service works for the vast majority of users.  The advice around using wait-online looks correct unless systemd behaviour has changed recently there.

We've worked on adding support for IP_FREEBIND [1] to upstream httpd, in the longer-run this may be a more appropriate way to configure the server than adjusting (or re-configuring) the systemd service.

[1] See https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/

Note You need to log in before you can comment on or make changes to this bug.