Whilst adding a new virtual server to one of our apache servers we found that the server couldn’t be restarted, and was giving an error about not being able to bind to port 80. Now we have had this problem before when we were adding the ASP support into Apache due to Apache not shutting down correctly.
This time, however was different as there were no orphaned httpd processes. To find out what was wrong I installed the lsof utility. Lsof stand for List Open Files, running this and specifying the port we want to check,
lsof -i :80
allowed me to see that there was a perl process that hadn’t released the port, I killed all the running perl processes and restarted webmin:
and the server was as good as new.