expert icon indicating copy to clipboard operation
expert copied to clipboard

feat: do not start EPMD

Open jswanner opened this issue 2 months ago • 4 comments
trafficstars

Configure release not to start epmd automatically. See #108.

jswanner avatar Sep 04 '25 20:09 jswanner

Note: I have no idea what I'm doing, but it is working for me with a local release. Also, using a hardcoded port as suggested in #108 (-erl_epmd_port 6789) caused my local release of Expert to only work for one project at a time (leading to the same Erlang error: {:erpc, :noconnection} error this was meant to fix), using a dynamic port (-erl_epmd_port 0) did not have that problem.

jswanner avatar Sep 04 '25 21:09 jswanner

Yeah the main thing we need is to make sure the engine node (the thing we start in a port with your project code in it) can connect to the same port that the release is advertising.

mhanberg avatar Sep 04 '25 23:09 mhanberg

$ ./apps/expert/bin/debug_shell.sh expert
Erlang/OTP 27 [erts-15.2.7.1] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [jit]

Interactive Elixir (1.18.4) - press Ctrl+C to exit (type h() ENTER for help)
Error while evaluating: /Users/jacob/Code/expert/.iex.exs
** (CompileError) cannot compile code (errors have been logged)

iex([email protected])1> Node.list()
[:"[email protected]", :"[email protected]"]

jswanner avatar Sep 04 '25 23:09 jswanner

@jswanner José added some more details that i think we were missing here: https://github.com/elixir-lang/expert/issues/108#issuecomment-3257153811

mhanberg avatar Sep 05 '25 15:09 mhanberg

I don't want this PR to be a distraction, which is why I'm closing it.

I was unable to get José's suggestion of using a custom EPMD module to work. As I said before: I don't really know what I'm doing, but I have learned more about Erlang distribution in this process.

In case it helps anyone else that goes down this path, from what I can when things fail the port for the project node exits immediately after opening:

Port #Port<0.14> has exited due to: :normal

And, as for the vm.args, the custom EPMD module is used with:

-epmd_module Elixir.XPExpert.EPMD

jswanner avatar Sep 21 '25 06:09 jswanner