Bug 1432249 - must fail startup with conflicting Listen directives
Summary: must fail startup with conflicting Listen directives
Alias: None
Product: Red Hat Software Collections
Classification: Red Hat
Component: httpd
Version: httpd24
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: 2.4
Assignee: Luboš Uhliarik
QA Contact: BaseOS QE - Apps
Depends On:
TreeView+ depends on / blocked
Reported: 2017-03-14 21:59 UTC by Hung
Modified: 2017-04-26 10:25 UTC (History)
4 users (show)

Clone Of:
Last Closed: 2017-04-26 10:25:06 UTC

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:1161 normal SHIPPED_LIVE Moderate: httpd24-httpd security, bug fix, and enhancement update 2017-04-26 14:19:21 UTC

Description Hung 2017-03-14 21:59:50 UTC
Description of problem:
- httpd file descriptors for listening ports when reloading configuration twice is increasing 
- when httpd service reloading the same conf file with the listen directive, the httpd service should error out 

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

# rpm -qa |grep httpd 

How reproducible:

1) Install httpd24-httpd package 
2) Create a ports.conf 

# cat  /opt/rh/httpd24/root/etc/httpd/conf.d/ports.conf 
Listen [::1]:82

3) Modify the "/opt/rh/httpd24/root/etc/httpd/conf/httpd.conf" to have the following Include directive:

#tail -n 3  /opt/rh/httpd24/root/etc/httpd/conf/httpd.conf

Include "/opt/rh/httpd24/root/etc/httpd/conf.d/ports.conf"

4) Start the httpd24-httpd service  <-------In RHEL httpd prevent the httpd from starting  

5) Run lsof command > reload the httpd24-httpd service > lsof command again 

# lsof |grep httpd| grep LISTEN |wc -l 

# service httpd24-httpd reload

# lsof |grep httpd| grep LISTEN |wc -l 

Additional info:

When reproducing this in RHEL 6 httpd start/reload up will fail see the following:

# service httpd start
Starting httpd: (98)Address already in use: make_sock: could not bind to address
no listening sockets available, shutting down
Unable to open logs

Comment 1 Joe Orton 2017-03-15 09:30:54 UTC
Thanks for the report, it looks like this is a regression in upstream httpd 2.4.17 and later.  I've identified the fix.


Comment 3 Joe Orton 2017-03-16 11:32:16 UTC
This issue was a regression with the addition of "listener buckets" in 2.4.17, which resulted in SO_REUSEPORT being enabled for all listening fds.  SO_REUSEPORT should only have been enabled if the ListenCoresBucketsRatio directive was used.  The fix is proposed for 2.4.26 and is a trivial backport.

Comment 13 errata-xmlrpc 2017-04-26 10:25:06 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


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