<div dir="ltr"><div>I am using "net_kernel:start()", to start multiple nodes of the same application, on the same host. Each time I start a node, I don't know how many other nodes were already started, so my thinking was to add an index number to the node name, and if start() returns: "{already_started, pid()}" I will increment the index on the node name, and call start() again.</div><div><br></div><div>Instead, when I try to start a second node of the same name I get this:</div><div><br></div><div>14:14:29.425 [info] Protocol 'inet_tcp': the name my_node01@my_host seems to be in use by another Erlang node</div><div>14:14:29.425 [error] CRASH REPORT Process <0.109.0> with 0 neighbours exited with reason: {error,badarg} in gen_server:init_it/6 line 349</div><div><br></div><div>and an error tuple is returned<br></div><div><br></div><div>This seems like an Erlang bug, since the info log message indicates that the situation is well in hand, but then we get a crash.  Is there a better way to start multiple nodes?  Are there any conditions where start() will return "already_started"?</div><div><br></div><div>I found this from 2013:  <a href="https://github.com/elixir-lang/elixir/issues/1707">https://github.com/elixir-lang/elixir/issues/1707</a>, where an Elixir user reports the same issue and Jose Valim's responds: </div><div><br></div><div>"I did more research on this one and unfortunately there is nothing we can do. The error comes from within the vm, before Elixir kicks in. I will open up a discussion with the OTP team. ..."</div><div><br></div><div>In the end, I  match the case where start() returns an error, and then try starting the next node in my series, which works, but it seems rather ugly.  I am on OTP ver. 20.x.</div><div><br></div><div>Mark</div></div>