[Mongrel] Problems getting mongrel service working

Luis Lavena luislavena at gmail.com
Sat Feb 24 00:45:50 EST 2007


On 2/23/07, Peter Boling <peter.boling at gmail.com> wrote:
> Hello list!
>

Welcome to the list!

> I have mongrel service 0.1.0 working on my current production machine.
>  Upgrading to a new server and also moving to mongrel service 0.3.1
> has not worked yet.  I am hoping someone will have an idea as to why.
>
> I have mongrel installed properly (I think):
> C:\rails\igacc>gem list --local
>
> *** LOCAL GEMS ***
> ...
>
> mongrel (1.0.1)
>     A small fast HTTP library and server that runs Rails, Camping, Nitro
>     and Iowa apps.
>
> mongrel_service (0.3.1)
>     Mongrel Native Win32 Service Plugin for Rails (debug build)
>
> rails (1.2.2, 1.2.1)
>     Web-application framework with template engine, control-flow layer,
>     and ORM.
>
> ...
>
> I install the service correctly (I think):
>
> C:\rails\igacc>mongrel_rails service::install -N callcenter -p 4001 -e
> production -c "C:\rails\igacc" -r "C:\rails\igacc" -l
> "log/mongrel.log" -P "log/mongrel.pid" -t 0 -n 1024 -a "http://localhost:4001"
> Mongrel service 'callcenter' installed as 'callcenter'.
>

Ok, you didn't install it properly.

-a takes an "address" parameter, some IP to bind to, like 127.0.0.1
(which is localhost) or, if you don't provide it, will bind to any
available IP in your system (that's why mongrel report 0.0.0.0)

Instead, you supplied a URL, which is not valid.


> I attempt to start the service correctly (I think):
>
> C:\rails\igacc>net start callcenter
> The callcenter service is starting.
> The callcenter service could not be started.
>
> The service did not report an error.
>
> More help is available by typing NET HELPMSG 3534.
>
> I appear to have a working setup.  When I start mongrel_rails I get a
> working site:
>
> C:\rails\igacc>mongrel_rails start -p 4001 -e production
> ** Starting Mongrel listening at 0.0.0.0:4001
> ** Starting Rails with production environment...
> ** Rails loaded.
> ** Loading any Rails specific GemPlugins
> ** Signals ready.  INT => stop (no restart).
> ** Mongrel available at 0.0.0.0:4001
> ** Use CTRL-C to stop.
>

When you started mongrel "manually", you didn't supplied all the
parameters you used during installation of the service.

If you try to start mongrel_rails with these parameters, you will get an error.

mongrel_rails start -p 4001 -e production -c "C:\rails\igacc" -r
"C:\rails\igacc" -t 0 -n 1024 -a "http://localhost:4001"


> Ruby looks good:
>
> C:\rails\igacc>ruby -v
> ruby 1.8.5 (2006-08-25) [i386-mswin32]
>
> C:\rails\igacc>irb
> irb(main):001:0> exit
>
> My program loads in the console fine:
>
> C:\rails\igacc>ruby script/console production
> Loading production environment.
> >> exit
>
> Any ideas? I am stumped.
>

I'll also suggest you add fastthread (mswin32) gem too:

gem install fastthread


-- 
Luis Lavena
Multimedia systems
-
Leaders are made, they are not born. They are made by hard effort,
which is the price which all of us must pay to achieve any goal that
is worthwhile.
Vince Lombardi


More information about the Mongrel-users mailing list