[erlang-questions] run an otp/application as a service

info <>
Fri Jul 24 11:03:44 CEST 2009


Hi,
The path is defined with -w, is it wrong ?

Hi.

What is your path to your application?
My guess is that it can not find your application.
I do not know if adding your path to your application with -pa :
    erlsrv.exe add ServiceName -w ".../ebin" -args "-pa
C:\...\YourApp\ebin -s starting"


Kind regards
Andreas Hillqvist

2009/7/23 info  < >:
> No node name.
> I progress...
> I added the option DebugType console and the working directory.
> - erlsrv.exe add ServiceName -w ".../ebin" -DebugType console -args "-s starting"
> When I start the service the console gives me the following message:
>
>  =INFO REPORT==== 22-Jul-2009::19:29:51 ===
> >    application: my_application
> >    exited: {shutdown,{my_application,start,[normal,[]]}}
> >    type: temporary
> > {error,{shutdown,{my_application,start,[normal,[]]}}}
> Note that, when I start my application in werl, I have the same message !!!
> ONLY with Eclipse can my application run ?????
>
> On Thu, Jul 23, 2009 at 6:15 PM, info   <  > wrote:
>
> >  Hi Robby,
> > You, you know how to read the doc !
> > I progress ...
> > The events observer gives this:
> > Erlang machine stopped instantly (distribution name conflict?). The service
> > is not restarted as OnFail is set to ignore.
> > Any idea ?
> > If I resume the situation:
> > - my OTP application runs correctly in Eclipse;
> > - my OTP application hangs in werl.exe
> > - erlsrv.exe add ServiceName -args "-s startting"   add the service to the
> > system
> > - erlsrv.exe start ServiceName start the service but the observer gives the
> > above message and the service doesn't start.
> >
> >
>
> Do you require a given node name? You can add one using the -name option:
>
> erlsrv add ServiceName -name mynode -args "-s startting"
>
> And if you are dependent on finding stuff on your PATH and running in a
> particular folder, you may want to set those on the running service as well,
> e.g.:
>
> erlsrv add ServiceName -name mynode -workdir C:/TEMP -env PATH=%PATH% -args
> "-s startting"
>
> And if you have a proper OTP release structure, then start your service with
> the boot and config options. For example:
>
> erlsrv add ServiceName -name mynode -workdir C:/TEMP -env PATH=%PATH% -args
> "-boot myboot -config myconfig -setcookie mycookie"
>
> Oh, and it helps tremendously if everything is running in a folder that has
> no spaces! Windows is juuust grrreat!
>
> Robby
>


More information about the erlang-questions mailing list