<?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>Sean Behan&#039;s Web Development Portfolio and Blog &#187; apache</title>
	<atom:link href="http://seanbehan.com/category/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://seanbehan.com</link>
	<description>Web Development, Wordpress, Moodle, Ruby on Rails and Design in Burlington, Vermont</description>
	<lastBuildDate>Fri, 30 Jul 2010 17:17:12 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Fun with Apache2 &#8211; httpd not running, trying to start (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down</title>
		<link>http://seanbehan.com/apache/fun-with-apache2-httpd-not-running-trying-to-start-98address-already-in-use-make_sock-could-not-bind-to-address-0-0-0-080-no-listening-sockets-available-shutting-down/</link>
		<comments>http://seanbehan.com/apache/fun-with-apache2-httpd-not-running-trying-to-start-98address-already-in-use-make_sock-could-not-bind-to-address-0-0-0-080-no-listening-sockets-available-shutting-down/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 18:11:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[apache]]></category>
		<category><![CDATA[apache2ctl]]></category>
		<category><![CDATA[httpd]]></category>
		<category><![CDATA[out of memory]]></category>
		<category><![CDATA[passphrase]]></category>
		<category><![CDATA[reboot]]></category>
		<category><![CDATA[ssl]]></category>

		<guid isPermaLink="false">http://seanbehan.com/?p=586</guid>
		<description><![CDATA[Have you ever gotten this error message when trying to (re)start Apache 

httpd not running, trying to start
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down

If you are running with an SSL certificate on your box, Apache cannot start up without the correct passphrase. I&#8217;ve run into this [...]


Related posts:<ol><li><a href='http://seanbehan.com/ruby-on-rails/rails-ssl-ubuntu-apache2-w-phussion-on-ubunt/' rel='bookmark' title='Permanent Link: Rails, SSL, Ubuntu, Apache2 with Phusion on Ubuntu'>Rails, SSL, Ubuntu, Apache2 with Phusion on Ubuntu</a></li>
<li><a href='http://seanbehan.com/ruby-on-rails/new-ubuntu-slice-apache-mysql-php-ruby-on-rails-git-and/' rel='bookmark' title='Permanent Link: Setting up a new ubuntu server with apache2, php, ruby on rails, rubygems, mysql, and git'>Setting up a new ubuntu server with apache2, php, ruby on rails, rubygems, mysql, and git</a></li>
<li><a href='http://seanbehan.com/linux/add-user-directories-to-apache2-web-server/' rel='bookmark' title='Permanent Link: Add User Directories to Apache2 Web Server'>Add User Directories to Apache2 Web Server</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Have you ever gotten this error message when trying to (re)start Apache </p>
<pre>
httpd not running, trying to start
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
</pre>
<p>If you are running with an SSL certificate on your box, Apache cannot start up without the correct passphrase. I&#8217;ve run into this problem a couple times. Once when I rebuilt my virtual server from Mosso and the reboot process (obviously) required Apache to be started up when the machine came back up. Not being there when the start up phase required the correct passphrase Apache was up but not handling requests. The other time my server crashed when it ran out of memory. It was a 256 meg O&#8217;RAM box running a Rails app. Go figure! </p>
<p>Fortunately, there is an easy solution. Kill Apache and start it up again. If you&#8217;re in the console you&#8217;ll be prompted for the passphrase. Enter it correctly and everything will be fine. Here&#8217;s how I did it. </p>
<pre>
ps aux | grep apache
root      3948  0.0  0.2   4028   668 ?        S    17:48   0:00 /bin/sh -e /etc/rc2.d/S91apache2 start
root      3959  0.0  0.2   4028   616 ?        S    17:48   0:00 /bin/sh /usr/sbin/apache2ctl start
root      3964  0.0  2.4 133564  6472 ?        S    17:48   0:00 /usr/sbin/apache2 -k start
root      4069  0.0  0.2   6268   660 pts/0    R+   17:49   0:00 grep apache
</pre>
<p>I took at a look at the running processes and grep for apache. The one I wanted was the 2nd to last.<br />
Look for the process id and kill it with the -9 option. The process id will be in the second column to the left </p>
<pre>
kill -9 3964
</pre>
<p>After it&#8217;s dead you can restart Apache like so</p>
<pre>
apache2ctl start
</pre>
<p>You&#8217;ll get the prompt for the passphrase. Enter it and everything should be fine. </p>


<p>Related posts:<ol><li><a href='http://seanbehan.com/ruby-on-rails/rails-ssl-ubuntu-apache2-w-phussion-on-ubunt/' rel='bookmark' title='Permanent Link: Rails, SSL, Ubuntu, Apache2 with Phusion on Ubuntu'>Rails, SSL, Ubuntu, Apache2 with Phusion on Ubuntu</a></li>
<li><a href='http://seanbehan.com/ruby-on-rails/new-ubuntu-slice-apache-mysql-php-ruby-on-rails-git-and/' rel='bookmark' title='Permanent Link: Setting up a new ubuntu server with apache2, php, ruby on rails, rubygems, mysql, and git'>Setting up a new ubuntu server with apache2, php, ruby on rails, rubygems, mysql, and git</a></li>
<li><a href='http://seanbehan.com/linux/add-user-directories-to-apache2-web-server/' rel='bookmark' title='Permanent Link: Add User Directories to Apache2 Web Server'>Add User Directories to Apache2 Web Server</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://seanbehan.com/apache/fun-with-apache2-httpd-not-running-trying-to-start-98address-already-in-use-make_sock-could-not-bind-to-address-0-0-0-080-no-listening-sockets-available-shutting-down/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
