File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,13 @@ defmodule Expert.EngineNode do
5656 state . cookie ,
5757 "--no-halt" ,
5858 "-e" ,
59+ # We manually start distribution here instead of using --sname/--name
60+ # because those options are not really compatible with `-epmd_module`.
61+ # Apparently, passing the --name/-sname options causes the Erlang VM
62+ # to start distribution right away before the modules in the code path
63+ # are loaded, and it will crash because Forge.EPMD doesn't exist yet.
64+ # If we start distribution manually after all the code is loaded,
65+ # everything works fine.
5966 """
6067 {:ok, _} = Node.start(:"#{ Project . node_name ( state . project ) } ", :longnames)
6168 #{ Forge.NodePortMapper } .register()
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ defmodule Forge.EPMD do
4747 And in another terminal:
4848
4949 $ EXPERT_PARENT_NODE=expert_parent_foo@macstudio EXPERT_PARENT_PORT=52914 \
50- iex --erl "-start_epmd false -epmd_module Elixir.Forge.EPMD -expert parent_port 52914 " --sname expert-project-baz
50+ iex --erl "-start_epmd false -epmd_module Elixir.Forge.EPMD" --sname expert-project-baz
5151 iex> Forge.NodePortMapper.register()
5252
5353 If you try `Node.ping(:expert-project-bar@HOSTNAME)` from the last node, it should work.
You can’t perform that action at this time.
0 commit comments