I am running a Ruby on Rails application called Redmine. It's been working fine, but today it's giving a 503 Service Temporarily Unavailable error. (It was initially set up by an employee who is now gone.)
I check the error log and it says:
[Mon Nov 21 11:03:30 2011] [error] (111)Connection refused: proxy: HTTP: attempt to connect to 127.0.0.1:3000 (127.0.0.1) failed
[Mon Nov 21 11:03:30 2011] [error] ap_proxy_connect_backend disabling worker for (127.0.0.1)
Here's a chunk of my Apache config
<VirtualHost *:80>
ServerName redmine.{domain}.com
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule ^/(.*)$ balancer://redminecluster%{REQUEST_URI} [P,QSA,L]
</VirtualHost>
<Proxy balancer://redminecluster>
BalancerMember http://127.0.0.1:3000
</Proxy>
I found this link: http://www.redmine.org/boards/2/topics/20561 which suggests I simply need to "start the redmine server." I've tried /etc/init.d/redmine start
which gives me this output
=> Booting Mongrel
=> Rails 2.3.11 application starting on http://0.0.0.0:3000
The contents of /etc/init.d/redmine:
cd /var/redmine
sudo ruby script/server -d -e production
One thing I immediately notice is that it says 0.0.0.0 instead of 127.0.0.1. In addition, running top
or ps -ef
shows no record of a "mongrel" or "redmine" process. I've also tried restarting Apache before and after starting redmine. Not sure where to go from here.
答え1
Ok I figured it out, thanks to jgoldschrafe. I tried netstat -ptan
and found that there was no Mongrel process running on port 3000 as there should have been, indicating that /etc/init.d/redmine
was failing. Indeed, I removed the -d
(debug) flag and found that there was a large error backtrace regarding a plugin that was installed recently. I removed the plugin and all is well now.