<?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>I'm a Richardson, RU? &#187; troubleshooting</title>
	<atom:link href="http://www.imarichardson.com/tag/troubleshooting/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.imarichardson.com</link>
	<description>(ugh...really cool tagline goes here)</description>
	<lastBuildDate>Sat, 21 Aug 2010 16:36:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Apache and Mongrel frustrations: 502,  503, Operation Not Permitted,  Proxy Error, &amp; Connection Refused Errors</title>
		<link>http://www.imarichardson.com/2008/05/30/apache-and-mongrel-frustrations-502-503-operation-not-permitted-proxy-error-connection-refused-errors/</link>
		<comments>http://www.imarichardson.com/2008/05/30/apache-and-mongrel-frustrations-502-503-operation-not-permitted-proxy-error-connection-refused-errors/#comments</comments>
		<pubDate>Fri, 30 May 2008 16:38:53 +0000</pubDate>
		<dc:creator>imarichardson</dc:creator>
				<category><![CDATA[Programming &#038; Development]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[help]]></category>
		<category><![CDATA[mongrel]]></category>
		<category><![CDATA[mongrel_cluster]]></category>
		<category><![CDATA[RubyOnRails]]></category>
		<category><![CDATA[troubleshooting]]></category>

		<guid isPermaLink="false">http://www.imarichardson.com/?p=212</guid>
		<description><![CDATA[
For a good deal of time I&#8217;ve been experiencing numerous problems relating to mongrel and mongrel_cluster. I&#8217;ve received proxy errors from my main site:
Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /.
Reason: Error reading from remote server

Apache/2.2.3 (Red Hat) Server at [myserver.com] Port [...]]]></description>
			<content:encoded><![CDATA[<p><a href='http://www.imarichardson.com/wp-content/uploads/proxy_error1.png'><img src="http://www.imarichardson.com/wp-content/uploads/proxy_error1-300x114.png" alt="" title="proxy_error no_name" width="300" height="114" class="aligncenter size-medium wp-image-214" /></a><br />
For a good deal of time I&#8217;ve been experiencing numerous problems relating to mongrel and mongrel_cluster. I&#8217;ve received proxy errors from my main site:</p>
<blockquote><p><strong>Proxy Error</strong><br />
The proxy server received an invalid response from an upstream server.<br />
The proxy server could not handle the request <em><a href="https://app_url/">GET /</a></em>.</p>
<p>Reason: <strong>Error reading from remote server</strong></p>
<hr />
<address>Apache/2.2.3 (Red Hat) Server at [myserver.com] Port 443</address>
</blockquote>
<p>And when viewing the log files I was receiving errors like:<br />
<br/></p>
<div class="codecolorer-container ruby vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#006600; font-weight:bold;">&#91;</span>Mon May 26 23:51:38 2008<span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">&#91;</span>error<span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">&#91;</span>client xxx.<span style="color:#9900CC;">xxx</span>.<span style="color:#9900CC;">xxx</span>.<span style="color:#9900CC;">xxx</span><span style="color:#006600; font-weight:bold;">&#93;</span> client sent HTTP<span style="color:#006600; font-weight:bold;">/</span>1.1 request without hostname <span style="color:#006600; font-weight:bold;">&#40;</span>see RFC2616 section 14.23<span style="color:#006600; font-weight:bold;">&#41;</span>: <span style="color:#006600; font-weight:bold;">*</span><br />
<span style="color:#006600; font-weight:bold;">&#91;</span>Wed May 28 08:59:49 2008<span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">&#91;</span>error<span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">&#40;</span>111<span style="color:#006600; font-weight:bold;">&#41;</span>Connection refused: proxy: HTTP: attempt to connect to 127.0.0.1:8050 <span style="color:#006600; font-weight:bold;">&#40;</span>127.0.0.1<span style="color:#006600; font-weight:bold;">&#41;</span> failed<br />
<span style="color:#006600; font-weight:bold;">&#91;</span>Wed May 28 08:59:49 2008<span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">&#91;</span>error<span style="color:#006600; font-weight:bold;">&#93;</span> ap_proxy_connect_backend disabling worker <span style="color:#9966CC; font-weight:bold;">for</span> <span style="color:#006600; font-weight:bold;">&#40;</span>127.0.0.1<span style="color:#006600; font-weight:bold;">&#41;</span><br />
<span style="color:#006600; font-weight:bold;">&#91;</span>Wed May 28 08:59:49 2008<span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">&#91;</span>error<span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">&#40;</span>111<span style="color:#006600; font-weight:bold;">&#41;</span>Connection refused: proxy: HTTP: attempt to connect to 127.0.0.1:8051 <span style="color:#006600; font-weight:bold;">&#40;</span>127.0.0.1<span style="color:#006600; font-weight:bold;">&#41;</span> failed<br />
...<br />
<span style="color:#006600; font-weight:bold;">&#91;</span>Wed May 28 09:00:39 2008<span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">&#91;</span>error<span style="color:#006600; font-weight:bold;">&#93;</span> proxy: BALANCER: <span style="color:#006600; font-weight:bold;">&#40;</span>balancer:<span style="color:#006600; font-weight:bold;">//</span>url_cluster<span style="color:#006600; font-weight:bold;">&#41;</span>. <span style="color:#9900CC;">All</span> workers are <span style="color:#9966CC; font-weight:bold;">in</span> error state<br />
<span style="color:#006600; font-weight:bold;">&#91;</span>Fri May <span style="color:#006666;">30</span> 08:<span style="color:#006666;">15</span>:<span style="color:#006666;">10</span> <span style="color:#006666;">2008</span><span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">&#91;</span>error<span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">&#91;</span>client xxx.<span style="color:#9900CC;">xxx</span>.<span style="color:#9900CC;">xxx</span>.<span style="color:#9900CC;">xxx</span><span style="color:#006600; font-weight:bold;">&#93;</span> proxy: error reading status line from remote server 127.0.0.1<br />
<span style="color:#006600; font-weight:bold;">&#91;</span>Fri May <span style="color:#006666;">30</span> 08:<span style="color:#006666;">15</span>:<span style="color:#006666;">10</span> <span style="color:#006666;">2008</span><span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">&#91;</span>error<span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">&#91;</span>client xxx.<span style="color:#9900CC;">xxx</span>.<span style="color:#9900CC;">xxx</span>.<span style="color:#9900CC;">xxx</span><span style="color:#006600; font-weight:bold;">&#93;</span> proxy: Error reading from remote server returned by <span style="color:#006600; font-weight:bold;">/</span> ...</div></div>
<p>And this, too: <em>(<a href="http://wiki.slicehost.com/doku.php?id=common_deprec_setup_errors">I tried these instructions too, but didn&#8217;t work.</a>)</em><br/></p>
<div class="codecolorer-container ruby vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#006600; font-weight:bold;">&#91;</span>Thu May 29 03:47:24 2008<span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">&#91;</span>error<span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">&#40;</span>111<span style="color:#006600; font-weight:bold;">&#41;</span>Connection refused: proxy: HTTP: attempt to connect to 127.0.0.1:8000 <span style="color:#006600; font-weight:bold;">&#40;</span>127.0.0.1<span style="color:#006600; font-weight:bold;">&#41;</span> failed <br />
<span style="color:#006600; font-weight:bold;">&#91;</span>Thu May 29 03:47:24 2008<span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">&#91;</span>error<span style="color:#006600; font-weight:bold;">&#93;</span> ap_proxy_connect_backend disabling worker <span style="color:#9966CC; font-weight:bold;">for</span> <span style="color:#006600; font-weight:bold;">&#40;</span>127.0.0.1<span style="color:#006600; font-weight:bold;">&#41;</span> <br />
<span style="color:#006600; font-weight:bold;">&#91;</span>Thu May 29 03:47:24 2008<span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">&#91;</span>error<span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">&#40;</span>111<span style="color:#006600; font-weight:bold;">&#41;</span>Connection refused: proxy: HTTP: attempt to connect to 127.0.0.1:8001 <span style="color:#006600; font-weight:bold;">&#40;</span>127.0.0.1<span style="color:#006600; font-weight:bold;">&#41;</span> failed <br />
<span style="color:#006600; font-weight:bold;">&#91;</span>Thu May 29 03:47:24 2008<span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">&#91;</span>error<span style="color:#006600; font-weight:bold;">&#93;</span> ap_proxy_connect_backend disabling worker <span style="color:#9966CC; font-weight:bold;">for</span> <span style="color:#006600; font-weight:bold;">&#40;</span>127.0.0.1<span style="color:#006600; font-weight:bold;">&#41;</span></div></div>
<p>Additionally, I received &#8220;Operation Not Permitted&#8221; errors when trying to restart and/or stop the mongrel clusters:</p>
<div class="codecolorer-container ruby vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#006600; font-weight:bold;">**</span> <span style="color:#006600; font-weight:bold;">&#91;</span>out :: 208.112.64.164<span style="color:#006600; font-weight:bold;">&#93;</span> Operation <span style="color:#9966CC; font-weight:bold;">not</span> permitted <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC00FF; font-weight:bold;">Errno</span>::EPERM<span style="color:#006600; font-weight:bold;">&#41;</span><br />
&nbsp;<span style="color:#006600; font-weight:bold;">**</span> <span style="color:#006600; font-weight:bold;">&#91;</span>out :: 208.112.64.164<span style="color:#006600; font-weight:bold;">&#93;</span> from <span style="color:#006600; font-weight:bold;">/</span>usr<span style="color:#006600; font-weight:bold;">/</span>local<span style="color:#006600; font-weight:bold;">/</span>lib<span style="color:#006600; font-weight:bold;">/</span>ruby<span style="color:#006600; font-weight:bold;">/</span>gems<span style="color:#006600; font-weight:bold;">/</span>1.8<span style="color:#006600; font-weight:bold;">/</span>gems<span style="color:#006600; font-weight:bold;">/</span>mongrel<span style="color:#006600; font-weight:bold;">-</span>1.1.4<span style="color:#006600; font-weight:bold;">/</span>bin<span style="color:#006600; font-weight:bold;">/</span>mongrel_rails:200:<span style="color:#9966CC; font-weight:bold;">in</span> <span style="color:#996600;">`send_signal'<br />
&nbsp;** [out :: 208.112.64.164] from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/mongrel_rails:240:in `</span>run<span style="color:#996600;">'<br />
&nbsp;** [out :: 208.112.64.164] from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/command.rb:212:in `run'</span><br />
&nbsp;<span style="color:#006600; font-weight:bold;">**</span> <span style="color:#006600; font-weight:bold;">&#91;</span>out :: 208.112.64.164<span style="color:#006600; font-weight:bold;">&#93;</span> from <span style="color:#006600; font-weight:bold;">/</span>usr<span style="color:#006600; font-weight:bold;">/</span>local<span style="color:#006600; font-weight:bold;">/</span>lib<span style="color:#006600; font-weight:bold;">/</span>ruby<span style="color:#006600; font-weight:bold;">/</span>gems<span style="color:#006600; font-weight:bold;">/</span>1.8<span style="color:#006600; font-weight:bold;">/</span>gems<span style="color:#006600; font-weight:bold;">/</span>mongrel<span style="color:#006600; font-weight:bold;">-</span>1.1.4<span style="color:#006600; font-weight:bold;">/</span>bin<span style="color:#006600; font-weight:bold;">/</span>mongrel_rails:281<br />
&nbsp;<span style="color:#006600; font-weight:bold;">**</span> <span style="color:#006600; font-weight:bold;">&#91;</span>out :: 208.112.64.164<span style="color:#006600; font-weight:bold;">&#93;</span> from <span style="color:#006600; font-weight:bold;">/</span>usr<span style="color:#006600; font-weight:bold;">/</span>local<span style="color:#006600; font-weight:bold;">/</span>bin<span style="color:#006600; font-weight:bold;">/</span>mongrel_rails:19:<span style="color:#9966CC; font-weight:bold;">in</span> <span style="color:#996600;">`load'<br />
&nbsp;** [out :: 208.112.64.164] from /usr/local/bin/mongrel_rails:19<br />
&nbsp;** [out :: 208.112.64.164] Sending TERM to Mongrel at PID 18429...</span></div></div>
<h2>Solution</h2>
<p>I was able to resolve the issue by killing all the active Mongrel processes and then restarting manually. You can do this by:<br/><br />
<strong>1. Viewing all active mongrel processes:</strong><br/></p>
<div class="codecolorer-container ruby vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#0066ff; font-weight:bold;">@imarichardson</span><span style="color:#006600; font-weight:bold;">&#93;</span>$ ps <span style="color:#006600; font-weight:bold;">-</span>aef <span style="color:#006600; font-weight:bold;">|</span> egrep mongrel<br />
root &nbsp; &nbsp; &nbsp;3156 &nbsp; &nbsp; 1 &nbsp;0 May15 ? &nbsp; &nbsp; &nbsp; &nbsp;00:00:03 <span style="color:#006600; font-weight:bold;">/</span>usr<span style="color:#006600; font-weight:bold;">/</span>bin<span style="color:#006600; font-weight:bold;">/</span>ruby <span style="color:#006600; font-weight:bold;">/</span>usr<span style="color:#006600; font-weight:bold;">/</span>bin<span style="color:#006600; font-weight:bold;">/</span>mongrel_rails start <span style="color:#006600; font-weight:bold;">-</span>d <span style="color:#006600; font-weight:bold;">-</span>e production <span style="color:#006600; font-weight:bold;">-</span><span style="color:#CC0066; font-weight:bold;">p</span> 8090 <span style="color:#006600; font-weight:bold;">-</span>a 127.0.0.1 <span style="color:#006600; font-weight:bold;">-</span><span style="color:#CC0066; font-weight:bold;">P</span> log<span style="color:#006600; font-weight:bold;">/</span>mongrel.8090.<span style="color:#9900CC;">pid</span> <span style="color:#006600; font-weight:bold;">-</span>c <span style="color:#006600; font-weight:bold;">/</span>var<span style="color:#006600; font-weight:bold;">/</span>www<span style="color:#006600; font-weight:bold;">/</span>apps<span style="color:#006600; font-weight:bold;">/</span><span style="color:#006600; font-weight:bold;">&#91;</span>app_directory<span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">/</span>current<br />
root &nbsp; &nbsp; &nbsp;3159 &nbsp; &nbsp; 1 &nbsp;0 May15 ? &nbsp; &nbsp; &nbsp; &nbsp;00:00:02 <span style="color:#006600; font-weight:bold;">/</span>usr<span style="color:#006600; font-weight:bold;">/</span>bin<span style="color:#006600; font-weight:bold;">/</span>ruby <span style="color:#006600; font-weight:bold;">/</span>usr<span style="color:#006600; font-weight:bold;">/</span>bin<span style="color:#006600; font-weight:bold;">/</span>mongrel_rails start <span style="color:#006600; font-weight:bold;">-</span>d <span style="color:#006600; font-weight:bold;">-</span>e production <span style="color:#006600; font-weight:bold;">-</span><span style="color:#CC0066; font-weight:bold;">p</span> 8091 <span style="color:#006600; font-weight:bold;">-</span>a 127.0.0.1 <span style="color:#006600; font-weight:bold;">-</span><span style="color:#CC0066; font-weight:bold;">P</span> log<span style="color:#006600; font-weight:bold;">/</span>mongrel.8091.<span style="color:#9900CC;">pid</span> <span style="color:#006600; font-weight:bold;">-</span>c <span style="color:#006600; font-weight:bold;">/</span>var<span style="color:#006600; font-weight:bold;">/</span>www<span style="color:#006600; font-weight:bold;">/</span>apps<span style="color:#006600; font-weight:bold;">/</span><span style="color:#006600; font-weight:bold;">&#91;</span>app_directory<span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">/</span>current</div></div>
<p>(The second number is the process id; that is the id you&#8217;ll use to kill the process.)<br />
<br/><br />
<strong>2. Killing each process id</strong> <br/><br />
&#8220;sudo kill -9 [process id]&#8220;, For example, to kill the first process listed above:<br />
<br/></p>
<div class="codecolorer-container ruby vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#0066ff; font-weight:bold;">@imarichardson</span><span style="color:#006600; font-weight:bold;">&#93;</span>$ sudo kill <span style="color:#006600; font-weight:bold;">-</span><span style="color:#006666;">9</span> <span style="color:#006666;">8090</span></div></div>
<p><br/><br />
<strong>3. Restarting your Mongrel instances</strong><br/></p>
<div class="codecolorer-container ruby vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#0066ff; font-weight:bold;">@imarichardson</span><span style="color:#006600; font-weight:bold;">&#93;</span>$ sudo &nbsp;mongrel_rails cluster::restart <span style="color:#006600; font-weight:bold;">--</span>clean <span style="color:#006600; font-weight:bold;">-</span>C <span style="color:#006600; font-weight:bold;">/</span>var<span style="color:#006600; font-weight:bold;">/</span>www<span style="color:#006600; font-weight:bold;">/</span>apps<span style="color:#006600; font-weight:bold;">/</span><span style="color:#006600; font-weight:bold;">&#91;</span>app_directory<span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">/</span>current<span style="color:#006600; font-weight:bold;">/</span>config<span style="color:#006600; font-weight:bold;">/</span>mongrel_cluster.<span style="color:#9900CC;">yml</span></div></div></p>
]]></content:encoded>
			<wfw:commentRss>http://www.imarichardson.com/2008/05/30/apache-and-mongrel-frustrations-502-503-operation-not-permitted-proxy-error-connection-refused-errors/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
