# Mongrel as service on windows 2003

**URL:** <https://www.ruby-forum.com/t/mongrel-as-service-on-windows-2003/105626>\
**Category:** Deployment\
**Created:** [May 31, 2007, 8:37pm UTC](https://www.ruby-forum.com/t/mongrel-as-service-on-windows-2003/105626 "2007-05-31T20:37:06Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![chuvisco](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e47c2d/32.png) [@chuvisco](https://www.ruby-forum.com/u/chuvisco)\
**Post date:** [May 31, 2007, 8:37pm UTC](https://www.ruby-forum.com/t/mongrel-as-service-on-windows-2003/105626/1 "2007-05-31T20:37:06Z")

</div>

Hello,

I’m trying to run Mongrel as a service under Windows 2003 Server.  
Everything is fine with my application (I’ve tested it locally with  
Webrick and Mongrel as well). I’ve tested it on server, too, and it  
works, except when I install it as a service. It’s not problem with path  
to executable and parameters (I’ve copied the line that appears in the  
services panel and pasted it on cmd and it works fine). I’ve already  
read all posts that I could and I couldn’t find any answer.

Does anybody have any idea? ☹

Thanks in advance.

Marcia

---

<div class="post-metadata">

**Author:** ![chuvisco](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e47c2d/32.png) [@chuvisco](https://www.ruby-forum.com/u/chuvisco)\
**Post date:** [May 31, 2007, 9:25pm UTC](https://www.ruby-forum.com/t/mongrel-as-service-on-windows-2003/105626/2 "2007-05-31T21:25:32Z")

</div>

Hi,

I was forgetting.  
This is the error message that i get when i try to start the service  
through ‘net star myapp’:

The service is not responding to the control function.  
More help is available by typing NET HELPMSG 2186.

Thanks.  
Marcia

---

<div class="post-metadata">

**Author:** ![chuvisco](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e47c2d/32.png) [@chuvisco](https://www.ruby-forum.com/u/chuvisco)\
**Post date:** [May 31, 2007, 9:50pm UTC](https://www.ruby-forum.com/t/mongrel-as-service-on-windows-2003/105626/3 "2007-05-31T21:50:06Z")

</div>

There is a good How To for mongrel server as service at  
[http://mongrel.rubyforge.org/docs/win32.html](http://mongrel.rubyforge.org/docs/win32.html)

On May 31, 9:25 pm, Marcia A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![chuvisco](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e47c2d/32.png) [@chuvisco](https://www.ruby-forum.com/u/chuvisco)\
**Post date:** [June 1, 2007, 6:40am UTC](https://www.ruby-forum.com/t/mongrel-as-service-on-windows-2003/105626/4 "2007-06-01T06:40:51Z")

</div>

On 5/31/07, Marcia A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Unfortunately, How Tos weren’t enough to solve my problem till now. And  
> I’ve already read a lot of them.

Marcia, could you check no other application collide with the port  
used by the service?

Also, there a two useful files inside ruby\bin:

servicefb.log and mongrel\_service.log

Clear them and start fresh, then copy and paste the results here.

There must be a reason why the service fails to start…

## – Luis L. 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

---

<div class="post-metadata">

**Author:** ![chuvisco](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e47c2d/32.png) [@chuvisco](https://www.ruby-forum.com/u/chuvisco)\
**Post date:** [June 1, 2007, 2:55pm UTC](https://www.ruby-forum.com/t/mongrel-as-service-on-windows-2003/105626/5 "2007-06-01T14:55:38Z")

</div>

Hello, Luis

It’s exactly the same problem as described in  
[http://rubyforge.org/forum/message.php?msg\_id=16915](http://rubyforge.org/forum/message.php?msg_id=16915). I read all messages  
of this post and did every single step as suggested, unsuccessfully,  
including try to run service with a local user, clear log files, etc.

Marcia

p.s: below is the content of servicefb.log. The file mongrel\_service.log  
was not generated.

\_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: 9300  
ParentPID: 408  
Parent Name:   
ServiceController.RunMode() done  
ServiceHost() destructor  
ServiceHost() destructor done  
ServiceProcess() destructor  
ServiceProcess() destructor done  
\_terminate() destructor  
\_terminate() destructor done

Luis L. wrote:

> On 5/31/07, Marcia A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > Unfortunately, How Tos weren’t enough to solve my problem till now. And  
> > I’ve already read a lot of them.
> 
> Marcia, could you check no other application collide with the port  
> used by the service?
> 
> Also, there a two useful files inside ruby\bin:
> 
> servicefb.log and mongrel\_service.log
> 
> Clear them and start fresh, then copy and paste the results here.
> 
> There must be a reason why the service fails to start…
> 
> ## – Luis L. 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

---

<div class="post-metadata">

**Author:** ![chuvisco](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e47c2d/32.png) [@chuvisco](https://www.ruby-forum.com/u/chuvisco)\
**Post date:** [May 31, 2007, 10:10pm UTC](https://www.ruby-forum.com/t/mongrel-as-service-on-windows-2003/105626/6 "2007-05-31T22:10:12Z")

</div>

Unfortunately, How Tos weren’t enough to solve my problem till now. And  
I’ve already read a lot of them.

Thanks, anyway.

Marcia

dima wrote:

> There is a good How To for mongrel server as service at  
> [http://mongrel.rubyforge.org/docs/win32.html](http://mongrel.rubyforge.org/docs/win32.html)
> 
> On May 31, 9:25 pm, Marcia A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![chuvisco](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e47c2d/32.png) [@chuvisco](https://www.ruby-forum.com/u/chuvisco)\
**Post date:** [June 1, 2007, 7:29pm UTC](https://www.ruby-forum.com/t/mongrel-as-service-on-windows-2003/105626/7 "2007-06-01T19:29:18Z")

</div>

Luis,

It’s x64.

Thanks a lot for the realease!

Marcia

Luis L. wrote:

> On 6/1/07, Marcia A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > p.s: below is the content of servicefb.log. The file mongrel\_service.log  
> > was not generated.
> 
> [… snipped until important text …]
> 
> > CurrentPID: 9300  
> > ParentPID: 408  
> > Parent Name:
> 
> Marcia, could I ask you what version of Windows 2003 Server are you  
> using? I guess x64, since is the only platform that shows the same  
> behavior.
> 
> (This is due API incompatibilities between x86 and x64).
> 
> Guess, until 0.5 is done, a patch for 0.3.1 is needed.
> 
> Will patch it and do a release tonight to address this issue.
> 
> ## – Luis L. 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

---

<div class="post-metadata">

**Author:** ![chuvisco](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e47c2d/32.png) [@chuvisco](https://www.ruby-forum.com/u/chuvisco)\
**Post date:** [June 1, 2007, 7:16pm UTC](https://www.ruby-forum.com/t/mongrel-as-service-on-windows-2003/105626/8 "2007-06-01T19:16:41Z")

</div>

On 6/1/07, Marcia A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> p.s: below is the content of servicefb.log. The file mongrel\_service.log  
> was not generated.

[… snipped until important text …]

> CurrentPID: 9300  
> ParentPID: 408  
> Parent Name:

Marcia, could I ask you what version of Windows 2003 Server are you  
using? I guess x64, since is the only platform that shows the same  
behavior.

(This is due API incompatibilities between x86 and x64).

Guess, until 0.5 is done, a patch for 0.3.1 is needed.

Will patch it and do a release tonight to address this issue.

## – Luis L. 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

---

<div class="post-metadata">

**Author:** ![chuvisco](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e47c2d/32.png) [@chuvisco](https://www.ruby-forum.com/u/chuvisco)\
**Post date:** [June 2, 2007, 3:05am UTC](https://www.ruby-forum.com/t/mongrel-as-service-on-windows-2003/105626/9 "2007-06-02T03:05:38Z")

</div>

On 6/1/07, Marcia A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Luis,
> 
> It’s x64.
> 
> Thanks a lot for the realease!

Done!

Please update your gems and re-install the service for the executable  
(mongrel\_service.exe) gets replaced by new version.

Let me know of any problems.

Regards,

## – Luis L. 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

---

<div class="post-metadata">

**Author:** ![chuvisco](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e47c2d/32.png) [@chuvisco](https://www.ruby-forum.com/u/chuvisco)\
**Post date:** [June 4, 2007, 3:42pm UTC](https://www.ruby-forum.com/t/mongrel-as-service-on-windows-2003/105626/10 "2007-06-04T15:42:16Z")

</div>

Luis,

It works perfectly.  
Again, thanks a lot for your help.

My best regards,

Marcia

Luis L. wrote:

> On 6/1/07, Marcia A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > Luis,
> > 
> > It’s x64.
> > 
> > Thanks a lot for the realease!
> 
> Done!
> 
> Please update your gems and re-install the service for the executable  
> (mongrel\_service.exe) gets replaced by new version.
> 
> Let me know of any problems.
> 
> Regards,
> 
> ## – Luis L. 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
