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 httpd24-apr-1.5.1-1.el6.x86_64 httpd24-httpd-2.4.18-11.el6.x86_64 httpd24-runtime-1.1-14.el6.x86_64 httpd24-apr-util-1.5.4-1.el6.x86_64 httpd24-libnghttp2-1.7.1-1.el6.x86_64 httpd24-httpd-tools-2.4.18-11.el6.x86_64 How reproducible: 1) Install httpd24-httpd package 2) Create a ports.conf # cat /opt/rh/httpd24/root/etc/httpd/conf.d/ports.conf Listen 127.0.0.1:82 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 42 # service httpd24-httpd reload # lsof |grep httpd| grep LISTEN |wc -l 54 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 127.0.0.1:82 no listening sockets available, shutting down Unable to open logs
Thanks for the report, it looks like this is a regression in upstream httpd 2.4.17 and later. I've identified the fix. http://svn.apache.org/viewvc?view=revision&revision=1777923
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.
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. https://access.redhat.com/errata/RHSA-2017:1161