2017-12-16 20:33 UTC

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0010847CentOS-7httpdpublic2017-11-23 23:46
Reporterdendory 
PriorityhighSeverityminorReproducibilityalways
StatusnewResolutionopen 
Product Version7.2.1511 
Target VersionFixed in Version 
Summary0010847: Apache can't bind to a socket after latest update
DescriptionI updated a CentOS 7 system (yum update) and after the update, httpd wouldn't start anymore. The main issue was this error:

[core:crit] [pid 25440] (22)Invalid argument: AH00069: make_sock: for address [::]:443, apr_socket_opt_set: (IPV6_V6ONLY)
(98)Address already in use: AH00072: make_sock: could not bind to address [::]:443
(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:443

For some reason, this line in my httpd.conf didn't work anymore:

Listen 443

I had to replace it with:

Listen 0.0.0.0:443

I'm not sure of the root cause, but several packages including httpd and openssl got updated at once this week. Also, this only happened for 443, not for 80, unsure why. But the only thing that changed between working and non-working was a yum update.
Steps To Reproduce1. Take a CentOS system updated up to May 1st
2. Make sure you have multiple HTTP and HTTPS virtual hosts
3. Run 'yum update'
4. See if your web server is still able to start
TagsNo tags attached.
abrt_hash
URL
Attached Files

-Relationships
+Relationships

-Notes

~0026546

timbtbitc (reporter)

Experienced same behavior here. Still have the problem, http wont start. Came immediately following yum update this morning.

Yum update - reboot - httpd wont start.

These are some of the updates installed
 httpd x86_64 2.4.6-40.el7.centos.1 updates 2.7 M
 httpd-tools x86_64 2.4.6-40.el7.centos.1 updates 82 k
 kernel-headers x86_64 3.10.0-327.18.2.el7 updates 3.2 M
 kernel-tools x86_64 3.10.0-327.18.2.el7 updates 2.4 M
 kernel-tools-libs x86_64 3.10.0-327.18.2.el7 updates 2.3 M
 kpartx x86_64 0.4.9-85.el7_2.4 updates 60 k
 libgudev1 x86_64 219-19.el7_2.9 updates 66 k
 mod_ssl x86_64 1:2.4.6-40.el7.centos.1 updates 103 k

Suggested fix above (Listen 0.0.0.0:443) in http.conf did not fix my problem. I do not have a listen statement for port 443 in httpd.conf - ut I tried it,

I have

Listen 443 https

at the top of my 00-ssl.conf file.

Changing the 00-ssl.conf listen to 0.0.0.0:443 didn't fix my issue either.

~0026547

timbtbitc (reporter)

FIXED - my bad - Suggested solution by original poster did work for me.

I had a 00-ssl.conf file and an old ssl.conf file left hanging round from the migration to C7 a little while ago.

These files were identical in content.

both had Listen 443 https

editing 00-ssl.conf to 0.0.0.0:443 had no effect due to the other entry in 00-ssl.conf.

To fix:
removed ssl.conf
edited 00-ssl.conf to 0.0.0.0:443
restarted httpd - all websites returned to service.

2 ssl configuration files - with identical contents..... some embarrassment here.

~0030274

allella (reporter)

I had the same errors and effectively the same fix.

Upgraded from Apache/2.4.25 (CentOS) to Apache/2.4.27 (CentOS) and something in the upgrade started failing on the same configuration. Version control confirmed nothing about the conf files changed during the upgrade

My customized conf/httpd.conf had
Listen 443

and then conf.d/ssl.conf had
Listen 443 https

As with the user above, it seems the existence of more than 1 "Listen 443" directive across loaded configuration files will now cause a hard failure.

My failure looked like below.

systemctl start httpd.service || systemctl status httpd.service

systemd[1]: Starting The Apache HTTP Server...
httpd[12138]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:443
systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
systemd[1]: Failed to start The Apache HTTP Server.
systemd[1]: Unit httpd.service entered failed state.
systemd[1]: httpd.service failed.

and /var/log/httpd/error.log contained
[core:crit] [pid 25440] (22)Invalid argument: AH00069: make_sock: for address [::]:443, apr_socket_opt_set: (IPV6_V6ONLY)

I'll also note another goofy systemd error I encountered as a result of debugging the root issue just in case folks take the same path I did.

I was trying to "restart" Apached with
systemctl reload httpd.service"
and didn't realize it wasn't running, so I got a systemd error
"Job for httpd.service invalid" which simply means the service isn't running and I tried to reload it, whereas a start or restart would be required.

~0030643

Shannon (reporter)

I was seeing the same error message. Adding a note in case others have the same, easy to fix solution.

My problem was the usage of the :443 port was in our own custom file,
   /etc/httpd/conf.d/my_app.conf

When I updated a new file
   /etc/httpd/conf.d/ssl.conf
was created.

When I started httpd it was trying to load both of these on the same port. I believe the older version I had used only one of these, or perhaps I'd moved ssl.conf out of the way before and never left myself a note!

Anyway hope my little note helps others with the same issue.
+Notes

-Issue History
Date Modified Username Field Change
2016-05-13 15:48 dendory New Issue
2016-05-14 00:23 timbtbitc Note Added: 0026546
2016-05-14 00:41 timbtbitc Note Added: 0026547
2017-10-02 05:58 allella Note Added: 0030274
2017-11-23 23:46 Shannon Note Added: 0030643
+Issue History