Out of the blue, I can't restart apache on my CentOS 6.8 web server:
# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: (98)Address already in use: make_sock: could not bind to address [::]:7080
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:7080
no listening sockets available, shutting down
Unable to open logs
[FAILED]
I tried a bunch of things I read online, including removing lock files.
I decided to try rebooting the server. After reboot, attempting to load any hosted websites would result in "502 Bad Gateway".
# service httpd status
httpd is stopped
# service httpd start
Starting httpd: [ OK ]
# service httpd status
httpd dead but subsys locked
Despite the "dead" status, I can now load websites!
Sometimes service httpd restart works...
# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
But other times it results in the first error above. In which case I can fix it with:
# killall -9 httpd
# service httpd start
So I can work around it, but I'm really curious about what is going on and wondering if I should be concerned.