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

info info@REDACTED
Thu Jul 23 19:52:22 CEST 2009

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  <info@REDACTED > 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,

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!


More information about the erlang-questions mailing list