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

Bin Wang wbin00@REDACTED
Fri Nov 15 04:12:59 CET 2013


Thanks, Daniel.

I found riak's solution in its source file. It use a script to generate
many release directories, which uses a template to do some configuration.

https://github.com/basho/riak/blob/develop/rel/gen_dev

I think this way is just a workaround. Rebar should have an option to
support this.


2013/11/15 Szoboszlay Dániel <dszoboszlay@REDACTED>

>  Hi,
>
> 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.)
>
> Daniel
>
> 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/20131115/dbfcd8ec/attachment.htm>


More information about the erlang-questions mailing list