Forum: Mongrel mongrel_service on Windows Server 2008 R2 /w Run As User

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
F12532c1224ff2ab2260e853258deddb?d=identicon&s=25 neongrau __ (neongrau)
on 2010-09-06 16:54
(Received via mailing list)
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
E7cff3cfd41c495e1012227d7dc24202?d=identicon&s=25 Luis Lavena (luislavena)
on 2010-09-11 22:42
(Received via mailing list)
On Mon, Sep 6, 2010 at 11:47 AM, Ralf Vitasek <neongrau@gmail.com>
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 Lavena
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
F12532c1224ff2ab2260e853258deddb?d=identicon&s=25 neongrau __ (neongrau)
on 2010-09-13 11:15
(Received via mailing list)
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 Lavena:
E7cff3cfd41c495e1012227d7dc24202?d=identicon&s=25 Luis Lavena (luislavena)
on 2010-09-13 15:55
(Received via mailing list)
On Mon, Sep 13, 2010 at 6:14 AM, Ralf Vitasek <neongrau@gmail.com>
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

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 Lavena
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
F12532c1224ff2ab2260e853258deddb?d=identicon&s=25 neongrau __ (neongrau)
on 2010-09-13 16:16
(Received via mailing list)
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 Lavena:
This topic is locked and can not be replied to.