Skip to content

Conversation

jswanner
Copy link

@jswanner jswanner commented Sep 4, 2025

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

@jswanner
Copy link
Author

jswanner commented Sep 4, 2025

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 jswanner changed the title Do not start EPMD feat: do not start EPMD Sep 4, 2025
Configure release not to start epmd automatically. See elixir-lang#108.
@mhanberg
Copy link
Member

mhanberg commented Sep 4, 2025

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.

@jswanner
Copy link
Author

jswanner commented Sep 4, 2025

$ ./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(manager-expert-38131@127.0.0.1)1> Node.list()
[:"project-expert-38131@127.0.0.1", :"shell@127.0.0.1"]

@mhanberg
Copy link
Member

mhanberg commented Sep 5, 2025

@jswanner José added some more details that i think we were missing here: #108 (comment)

@jswanner
Copy link
Author

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 jswanner closed this Sep 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants