<?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>inmyplace.info &#187; apache</title>
	<atom:link href="http://inmyplace.info/tag/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://inmyplace.info</link>
	<description>Thoughts and writings of someone loving linux, the web and his iphone</description>
	<lastBuildDate>Sat, 19 Feb 2011 15:06:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Address already in use: make_sock: could not bind to address &#8211; Apache &#8211; HTTPD Error</title>
		<link>http://inmyplace.info/2008/01/05/address-already-in-use-make_sock-could-not-bind-to-address-apache-httpd-error/</link>
		<comments>http://inmyplace.info/2008/01/05/address-already-in-use-make_sock-could-not-bind-to-address-apache-httpd-error/#comments</comments>
		<pubDate>Sat, 05 Jan 2008 14:47:16 +0000</pubDate>
		<dc:creator>hmorandell</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://inmyplace.info/2008/01/05/address-already-in-use-make_sock-could-not-bind-to-address-apache-httpd-error/</guid>
		<description><![CDATA[I was getting the following error on one my servers, after updating apache2 and php5 Starting web server &#40;apache2&#41;...&#40;98&#41;Address already in use: make_sock: could not bind to address &#91;::&#93;:80 &#40;98&#41;Address already in use: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down Unable to open logs failed! This is what I [...]]]></description>
			<content:encoded><![CDATA[<p>I was getting the following error on one my servers, after updating apache2 and php5</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> Starting web server <span style="color: #7a0874; font-weight: bold;">&#40;</span>apache2<span style="color: #7a0874; font-weight: bold;">&#41;</span>...<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">98</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>Address already <span style="color: #000000; font-weight: bold;">in</span> use: make_sock: could not <span style="color: #7a0874; font-weight: bold;">bind</span> to address <span style="color: #7a0874; font-weight: bold;">&#91;</span>::<span style="color: #7a0874; font-weight: bold;">&#93;</span>:<span style="color: #000000;">80</span>
<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">98</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>Address already <span style="color: #000000; font-weight: bold;">in</span> use: make_sock: could not <span style="color: #7a0874; font-weight: bold;">bind</span> to address 0.0.0.0:<span style="color: #000000;">80</span>
no listening sockets available, shutting down
Unable to open logs
failed<span style="color: #000000; font-weight: bold;">!</span></pre></div></div>

<p>This is what I did to fix the problem</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">netstat</span> <span style="color: #660033;">-lnp</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #ff0000;">'80'</span><span style="color: #666666; font-style: italic;">#output</span>
tcp6       <span style="color: #000000;">0</span>      <span style="color: #000000;">0</span> :::<span style="color: #000000;">80</span>                   :::<span style="color: #000000; font-weight: bold;">*</span>                    LISTEN     <span style="color: #000000;">18712</span><span style="color: #000000; font-weight: bold;">/</span>apache2</pre></div></div>

<p>In my case the output showed that apache2 was already using the port, although no sites was working and it was not even possible to stop the apache2 daemon. I ran the following to learn more</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ps</span> <span style="color: #000000;">18712</span>
PID TTY      STAT   TIME COMMAND
<span style="color: #000000;">18712</span> ?        Ss     <span style="color: #000000;">0</span>:00 <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>apache2 <span style="color: #660033;">-k</span> start</pre></div></div>

<p>I killed the apache2 process, which was blocking everything</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">kill</span> <span style="color: #000000;">19712</span></pre></div></div>

<p>and restarted apache</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache start</pre></div></div>

<p>and everything was working fine again. Hopefully this is useful for someone..</p>
]]></content:encoded>
			<wfw:commentRss>http://inmyplace.info/2008/01/05/address-already-in-use-make_sock-could-not-bind-to-address-apache-httpd-error/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
	</channel>
</rss>

