The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]

Things look quiet here. But I've been doing a lot of blogging at dan.langille.org because I prefer WordPress now. Not all my posts there are FreeBSD related. I am in the midst of migrating The FreeBSD Diary over to WordPress (and you can read about that here). Once the migration is completed, I'll move the FreeBSD posts into the new FreeBSD Diary website.

httpd: could not bind to port 80 - how not to stop a process 22 October 1998
Need more help on this topic? Click here
This article has no comments
Show me similar articles
see also Apache - starting/stopping.
Learning the hard way
Here's what I was doing (don't do this): killall httpd.  After a few times cycling httpd up and down, I found that httpd would not start at it.  Here's the error message I was getting:
bind: Address already in use
httpd: could not bind to port 80.

I was confused.  I checked to see if httpd was already running by doing:

ps -auwd | grep httpd

But nothing was found.  So my next query was:

netstat -a | grep http
tcp 0 0 xxx-xxx-xxx-xxx.ip.http jagged.net.1224   ESTABLISHED
tcp 0 0 xxx-xxx-xxx-xxx.ip.http nt1.3917          CLOSE_WAIT
tcp 0 0 xxx-xxx-xxx-xxx.ip.http nt1.3916          CLOSE_WAIT

where xxx-xxx-xxx-xxx was the IP of my web server.  Nobody seemed to know what was going on.  Eventually, I rang Jay.  We talked for about 10 minutes and eventually decided that I had some zombie processes left over.  This was a result of the killall I had been doing.  So I had to reboot.  Unfortunately, I was at the following uptime:

3:39PM up 50 days,17:42, 4 users, load averages: 3.00, 3.00, 2.92

This had been a record for me.  Let's see how the next one goes.


Share
Need more help on this topic? Click here
This article has no comments
Show me similar articles