<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tequila Fish &#187; httpd</title>
	<atom:link href="http://www.tequilafish.com/tag/httpd/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tequilafish.com</link>
	<description>Ran-dumb ramblings of me...</description>
	<lastBuildDate>Thu, 26 Jan 2012 23:30:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Apache: Address already in use: make_sock: could not bind to address 0.0.0.0:80</title>
		<link>http://www.tequilafish.com/2009/03/08/apache-address-already-in-use-make_sock-could-not-bind-to-address-000080/</link>
		<comments>http://www.tequilafish.com/2009/03/08/apache-address-already-in-use-make_sock-could-not-bind-to-address-000080/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 21:19:53 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[httpd]]></category>
		<category><![CDATA[kill]]></category>
		<category><![CDATA[lsof]]></category>
		<category><![CDATA[make_sock]]></category>

		<guid isPermaLink="false">http://www.tequilafish.com/?p=235</guid>
		<description><![CDATA[Every now and then my Apache webserver becomes un-responsive, and attempting to restart it with apachectl graceful gives me the following error: Address already in use: make_sock: could not bind to address 0.0.0.0:80 This error means that there is already a process running that is using port 80, so Apache is unable to start up [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.tequilafish.com%2F2009%2F03%2F08%2Fapache-address-already-in-use-make_sock-could-not-bind-to-address-000080%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.tequilafish.com%2F2009%2F03%2F08%2Fapache-address-already-in-use-make_sock-could-not-bind-to-address-000080%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Every now and then my Apache webserver becomes un-responsive, and attempting to restart it with <strong><tt>apachectl graceful</tt></strong> gives me the following error:</p>
<p><code>Address already in use: make_sock: could not bind to address 0.0.0.0:80</code></p>
<p>This error means that there is already a process running that is using port 80, so Apache is unable to start up and use it.  To solve this problem, we need to figure out what process is currently using the port in question and kill it so that Apache can start.  Use <strong><tt>lsof</tt></strong> to find out what is using our port:</p>
<p><code>shell&gt; lsof -i :80<br />
COMMAND   PID   USER   FD   TYPE     DEVICE SIZE NODE NAME<br />
httpd   23506 apache    3u  IPv6 1206927465       TCP *:http (LISTEN)</code></p>
<p>You can see from the output of lsof that an httpd process already exists under PID 23506.  This is simple enough to get rid of:</p>
<p><code>shell&gt; kill -9 23506<br />
shell&gt; lsof -i :80<br />
shell&gt; apachectl start</code></p>
<p>I run <strong><tt>lsof</tt></strong> again after issuing the <strong><tt>kill</tt></strong> command to make sure that whatever was using port 80 is gone.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tequilafish.com/2009/03/08/apache-address-already-in-use-make_sock-could-not-bind-to-address-000080/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

