[erlang-questions] Start two same applications at the same time with rebar

Szoboszlay Dániel dszoboszlay@REDACTED
Thu Nov 14 18:45:37 CET 2013


The default runner script generated by rebar does not support starting two  
or more daemons. The problem is that each daemon should have a unique pipe  
directory, but the PIPE_DIR only contains RUNNER_BASE_DIR.

I would modify the script to recognize the -sname or -name argument and  
append the node's name to PIPE_DIR. (For my project I use a heavily  
customized start script, but I think this was the crucial part in enabling  
multi-node startup.)


On Thu, 14 Nov 2013 06:08:00 -0000, Bin Wang <wbin00@REDACTED> wrote:

> Hi,
> I'm compiling my application with rebar. My question is: after I  
> generated the files, how could I start two applications at the same time?
> I use "./rel/app/bin/app console -sname app2" to start the second one.  
> It is OK. But I want to run it as a daemon. Then I use  
> "./rel/app/bin/app start -name app2", it cames with the error: "Node is  
> >already running!"
> So how to start the second one at the same time? And if I have started  
> them, how could I attach to the specified one?
> Thanks.
> Bin Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20131114/27e3fb89/attachment.htm>

More information about the erlang-questions mailing list