I’m trying to deploy a rails app for development on slicehost and I
can’t seem to get mongrel to work correctly. When I run
mongrel_rails start
I get:
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment…
** Rails loaded.
** Loading any Rails specific GemPlugins
** Signals ready. TERM => stop. USR2 => restart. INT => stop (no
restart).
** Rails signals registered. HUP => reload (without restart). It might
not work well.
** Mongrel 1.1.5 available at 0.0.0.0:3000
** Use CTRL-C to stop.
But when I visit http://mysite.com:3000, I get a page load error instead
of the expected rails app.
No errors show up in mongrel.log.
I have no problem using my app in script/console or viewing the root of
my domain (served by apache) – but I just can’t get the mongrel site to
show up in the browser.
Is there something I can do besides checking in the browser and looking
at mongrel.log that will tell me if mongrel is running and/or having
errors? Could this be port 3000 not being publicly accessible for some
reason (and if so, how can I change this)? Any other reasons this might
be happening?
Thanks very much for any advice!
On Tue, 1 Jul 2008 21:28:31 +0200
Clara R. [email protected] wrote:
I’m trying to deploy a rails app for development on slicehost and I
can’t seem to get mongrel to work correctly. When I run
…
But when I visit http://mysite.com:3000, I get a page load error instead
of the expected rails app.
You’ll need to figure out what is preventing you from accessing it. If
you follow the chain of potential causes from browser to Rails you get
these linkages:
- Browser->Network – Can you connect to other sites?
- Network->Network – Can you connect to the remote computer with
another protocol?
- Network->Port 3000 – Can you connect to port 3000 with something
you know works listening on port 3000? (not mongrel)
- Port 3000->Mongrel – Does Mongrel receive the request? Try -B
(debug). What about from localhost->localhost:3000? If you can do
localhost->localhost, but not network->network then you have a firewall
rule.
- Mongrel → Rails – Is Rails receiving it and sending a reply?
Check rails log.
- Rails → Database – Is the database getting hit?
Then follow the chain back. Tools that can help you:
- lsof -i -P
- wireshark
- route -n
- netstat
- curl
Let me know if you figure it out.
Thanks, great advice! As I kind of suspected it turned out to be a
firewall setting making Network --> Port 3000 not accessible; it’s fixed
now.