I have a CentOS server with isc dhcpd and apache 2 webserver running. A couple of minutes ago I have tried to restart apache:
/etc/init.d/httpd restart
Restart has failed with:
Starting httpd: (98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Apache was complaining that the 80 port has been already taken. I've executed
netstat -ntap
to see who is listening on 80 port. And it was dhcpd. Since before restart apache and dhcpd were running simultaneously I guess what has happened was that just after apache was off, dhcp has noticed that 80 port is free and started listening it. Does anybody know in what cases dhcpd would do it and why? I've tried to reproduce that a couple of times but with no luck.