Apache failing to start , unable to bind to port 443.

a.sheipani

Member
Jan 29, 2007
16
0
151
I have came across an interesting issue today, I tought to share it with in case it would save someone some time.

Apache suddenly stopped working, I started receiving email from ChkServd with the following:
Code:
httpd failed @ Mon Aug 27 08:16:51 2012. A restart was attempted automagically.

Service Check Method:  [socket connect] 

Reason: Unable to connect to port 80 on 127.0.0.1: Connection refused: Died at /usr/local/cpanel/Cpanel/TailWatch/ChkServd.pm line 577.


Number of Restart Attempts: 6

Startup Log: (98)Address already in use: make_sock: could not bind to address 0.0.0.0:443 no listening sockets available, shutting down Unable to open logs
Running the following commands shows that there is nothing listening on port 443:
Code:
lsof -i :443
netstat -an | grep 443
After looking deeper I found that apache was just updated, and mysteriously the entry
Listen 0.0.0.0:443
was added to httpd.conf, this conflicts with the same entry in ssl.conf.

Removing one of the entries fixed the problem.