[Mongrel] Mongrel as Windows service with normal privileges

Ingmar Stieger ml at stiegerhs.de
Thu Jun 5 04:11:23 EDT 2008


Luis Lavena wrote:
> 32bits or x64 editions?
>   
Windows 2003 32bit.
> In any case, serviceFB.log and mongrel.log and mongrel_service.log
> should be stored into ruby/bin folder since was not possible by the
> service point to the directory of the service.
>   
Thanks for the hint of using mongrel_service 0.3.3. I get these log 
files now:

servicefb.log:

_initialize() constructor
_initialize() constructor done
ServiceProcess(new_name)
ServiceProcess(new_name) done
ServiceHost()
ServiceHost() done
ServiceHost.Add()
_add_to_references()
_add_to_references() done
ServiceHost.Add() done
ServiceController.RunMode()
CurrentPID: 5108
ParentPID: 512
Error with OpenProcess
GetLastError: 0The operation completed successfully.
Parent Name:
ServiceController.RunMode() done
ServiceHost() destructor
ServiceHost() destructor done
ServiceProcess() destructor
ServiceProcess() destructor done
_terminate() destructor
_terminate() destructor done

mongrel_service.log:

# Logfile created on 05.06.2008 09:51:06

native/mongrel_service.bas:44, mongrel_service.singlemongrel.constructor:
  redirecting to: c:\ruby\bin\mongrel.log

Not very helpful - OpenProcess fails with no apparent error.
> I suggest you also try the psexec tool from Sysinternals and also
> runas program (builtin in Windows) to get more detail information.
>   
Could you please explain what you want me to do ? I think I  have ran 
everything I can using psexec and as the actual service user (explained 
in my initial post). If there is something else, I will happily run it 
:). On the other hand, since it works using these two methods, no error 
message will appear. Only the service itself can not be started.
> PATH reports from these environment will be help, also the security
> bits from the ACLs too, since if it runs as administrator maybe there
> is some file down there in your app (maybe log folder) that is not
> allowed to be written in it.
>   
The app is a newly generated rails skeleton, and the user has "Full 
Control" on the directory and on the Ruby directory. I am not sure how I 
can get to the PATH variable when starting the service - any idea ?

Thanks,
Ingmar




More information about the Mongrel-users mailing list