# Mongrel\_service on Windows Server 2008 R2 /w Run As User

**URL:** <https://www.ruby-forum.com/t/mongrel-service-on-windows-server-2008-r2-w-run-as-user/194522>\
**Category:** Mongrel\
**Created:** [September 6, 2010, 4:54pm UTC](https://www.ruby-forum.com/t/mongrel-service-on-windows-server-2008-r2-w-run-as-user/194522 "2010-09-06T16:54:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![neongrau](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/34f0e0/32.png) [@neongrau](https://www.ruby-forum.com/u/neongrau)\
**Post date:** [September 6, 2010, 4:54pm UTC](https://www.ruby-forum.com/t/mongrel-service-on-windows-server-2008-r2-w-run-as-user/194522/1 "2010-09-06T16:54:44Z")

</div>

Hello!

I need to run an older Rails App on WIndows Server 2008 R2 with a  
different Account then the default Local System.  
While the default works, when trying to start with a different User  
(even tried with a Domain Admin account), the service will not start  
(Error 1053).

That problem doesn’t occur with Windows Server 2003.

Any idea what is required to get it to start with a different user on  
Windows Server 2008 R2 ?

Thanks,  
Ralf

---

<div class="post-metadata">

**Author:** ![neongrau](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/34f0e0/32.png) [@neongrau](https://www.ruby-forum.com/u/neongrau)\
**Post date:** [September 11, 2010, 10:42pm UTC](https://www.ruby-forum.com/t/mongrel-service-on-windows-server-2008-r2-w-run-as-user/194522/2 "2010-09-11T22:42:13Z")

</div>

On Mon, Sep 6, 2010 at 11:47 AM, Ralf V. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Hello!
> 
> I need to run an older Rails App on WIndows Server 2008 R2 with a different Account then the default Local System.  
> While the default works, when trying to start with a different User (even tried with a Domain Admin account), the service will not start (Error 1053).
> 
> That problem doesn’t occur with Windows Server 2003.
> 
> Any idea what is required to get it to start with a different user on Windows Server 2008 R2 ?

Can you provide more information about what fails to get executed?

Does that user have access to Ruby and the installed gems? The  
database or the directories where the application is installed?

What are the contents of the log files? mongrel\_service.log and  
fbservice.log.

a simple test will involve using psexec to mimic the user environment  
you’re talking and launch mongrel\_rails from the command line with the  
same parameters you installed it.

## – Luis L. AREA 17

Perfection in design is achieved not when there is nothing more to add,  
but rather when there is nothing more to take away.  
Antoine de Saint-Exupéry

---

<div class="post-metadata">

**Author:** ![neongrau](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/34f0e0/32.png) [@neongrau](https://www.ruby-forum.com/u/neongrau)\
**Post date:** [September 13, 2010, 11:15am UTC](https://www.ruby-forum.com/t/mongrel-service-on-windows-server-2008-r2-w-run-as-user/194522/3 "2010-09-13T11:15:23Z")

</div>

if i’d knew what.  
mongrel starts fine when started on the command line with the same use.

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: 1688  
ParentPID: 624  
Error with OpenProcess  
GetLastError: 0Der Vorgang wurde erfolgreich beendet.  
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 13.09.2010 10:43:22

src/mongrel\_service/mongrel\_service.bas:63,  
mongrel\_service.singlemongrel.constructor:  
redirecting to: C:/latest/log/mongrel.log

Am 11.09.2010 um 22:40 schrieb Luis L.:

---

<div class="post-metadata">

**Author:** ![neongrau](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/34f0e0/32.png) [@neongrau](https://www.ruby-forum.com/u/neongrau)\
**Post date:** [September 13, 2010, 3:55pm UTC](https://www.ruby-forum.com/t/mongrel-service-on-windows-server-2008-r2-w-run-as-user/194522/4 "2010-09-13T15:55:13Z")

</div>

On Mon, Sep 13, 2010 at 6:14 AM, Ralf V. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> if i’d knew what.  
> mongrel starts fine when started on the command line with the same use.

Please open a GitHub issue for better documentation, I promise will  
tackle it 🙂

[http://github.com/fauna/mongrel\_service/issues](http://github.com/fauna/mongrel_service/issues)

Now..

> ServiceHost.Add() done  
> ServiceController.RunMode()  
> CurrentPID: 1688  
> ParentPID: 624  
> Error with OpenProcess  
> GetLastError: 0Der Vorgang wurde erfolgreich beendet.

It is clear that is having problems opening the process.

Can you try out the newer beta?

gem install mongrel\_service --pre

And then try to remove and register with the new service.

On the new beta we handle much better parent process detection (or at  
least try to be less smart).

## – Luis L. AREA 17

Perfection in design is achieved not when there is nothing more to add,  
but rather when there is nothing more to take away.  
Antoine de Saint-Exupéry

---

<div class="post-metadata">

**Author:** ![neongrau](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/34f0e0/32.png) [@neongrau](https://www.ruby-forum.com/u/neongrau)\
**Post date:** [September 13, 2010, 4:16pm UTC](https://www.ruby-forum.com/t/mongrel-service-on-windows-server-2008-r2-w-run-as-user/194522/5 "2010-09-13T16:16:54Z")

</div>

just noticed that i didn’t mention that this happens with current stable  
and latest beta gem (no difference at all).

i will open a ticket on GitHub asap, thanks alot for having a look at  
it!

Am 13.09.2010 um 15:53 schrieb Luis L.:
