[Mongrel] Mongrel service will not start on win32 w/ --prefix option

Luis Lavena luislavena at gmail.com
Tue Feb 6 01:26:21 EST 2007


Hello Guy,

I'll try to answer your questions:

On 2/6/07, Guy Ridout <ridoutspam at gmail.com> wrote:
> All, I am in need of some help. I've run into a problem that I am not able
> to fix or even troubleshoot.  I am trying to run Mongrel as a service on
> Win32.
>
> Basically, my problem is that running Mongrel as a service works fine. Fine
> until I change the configuration (using service::remove and
> service::install) to use --prefix. I must have this as I am running multiple
> webapps and app servers all behind apache.
>

I see that you're using latest mongrel_service, that's good. I'll snip
the content now, but so far, this is the best report of a problem
someone made under Win32! Congrats!

>
> So, here is the config that works. It does not use the --prefix option:
> #1 (works)
>   mongrel_rails service::install -N mongrel_app_service -c
> c:\projects\rails-prod\myapp -p 4001 -e production
>
>   (The service "path to executable" displayed under properties:)
>   "c:/ruby/bin/mongrel_service.exe" single -e production -p
> 4001 -a 0.0.0.0 -l "log/mongrel.log" -P "log/mongrel.pid" -c
> "c:/projects/rails-prod/myapp" -t 0 -r "public" -n 1024
>
>
>
> Here is the config that is not working It *does* use the --prefix option.
> That is the only difference:
> #2 (does not work)
>   mongrel_rails service::install -N mongrel_app_service -c
> c:\projects\rails-prod\myapp -p 4001 -e production --prefix /myapproot
>
>   (The service "path to executable" displayed under properties:)
>   "c:/ruby/bin/mongrel_service.exe" single -e production -p
> 4001 -a 0.0.0.0 -l "log/mongrel.log" -P "log/mongrel .pid" -c
> "c:/projects/rails-prod/myapp" -t 0 -r "public" -n 1024 --prefix
> "/myapproot"
>
>

As you can see, the only params that fails (based on
mongrel_service.log) is --prefix.

> ## This is where they start to diverge!
> (#1)  wait_code: 258
> (#2)  wait_code: 0
> (#2)  native/process.bas:147, fb.process.spawn:
> (#2)  failed, the process terminate earlier.
> (#2)  native/process.bas:156, fb.process.spawn:
> (#2)  Spawn() done
> (#2)  native/mongrel_service.bas:88, mongrel_service.single_oninit:
> (#2)  single_onInit() done
>
> Can anyone shed any light on the wait_code bit? Is it not waiting long
> enough or is that jsut a return code? I've re-booted, cleared my logs,
> created user accounts, treid passing --prefix as a start parm in the
> properties view of the service. Nothing seems to work. I would really
> appreciate some advice.
>

The wait code indicates that process is starting, and wait_code = 0
means something is wrong during process spawning.


My advice will be try running plain mongrel command and see what ruby
process dump to the screen, so the command you can run in a command
prompt window (cmd) will be:

ruby.exe c:\ruby\bin\mongrel_rails start -e production -p 4001 -a
0.0.0.0 -l log/mongrel.log -P log/mongrel.pid -c
c:/projects/rails-prod/wingate -t 0 -r public -n 1024 --prefix
/wingate

The bad thing is in the current implementation, mongrel_service isn't
logging the console output of the child process, so this is the only
way to pin-point the problem.

Please copy the output you get from this in your next reply. So far,
mongrel process is failing to start, guess is directly related to
prefix option, and if thats the case, a prefix test under win32 should
be added.

Regards,

-- 
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