Skip to content

Commit bd3839a

Browse files
committed
docs: update epmd/distribution docs
1 parent ab64607 commit bd3839a

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

apps/expert/lib/expert/engine_node.ex

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff 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()

apps/forge/lib/forge/epmd.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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.

0 commit comments

Comments
 (0)