Questions about "erl -epmd_start false"

Shunichi Shinohara shino.shun@REDACTED
Tue Jan 12 01:43:38 CET 2021


Hi Jérôme,

Sorry for the late reply. (new-year-holiday-lag)

> Could you describe a case when the epmd daemon is running but you
> wouldn't want the registration to happen? In your original question,
> what is the actual issue with the node being registered when epmd is
> running?

Our company sells a package software written in Erlang. If epmd daemon
process is unnecessary, user operation will be simpler.
# However, it makes very little difference and is not feature related.
# So, eliminating epmd is not a blocking issue but just nice-to-have.

On the other hand, I want to keep the difference between my development
environment and users' production ones as little as possible. On my side,
epmd is almost always running (e.g. erlang_ls processes use it.)

To satisfy both, it's great that Erlang nodes do not register themselves
even
in the case epmd is running.

Thanks,
Shino

2021年1月1日(金) 0:37 Jérôme de Bretagne <jerome.debretagne@REDACTED>:

> You're welcome, Shino.
>
> Could you describe a case when the epmd daemon is running but you
> wouldn't want the registration to happen? In your original question,
> what is the actual issue with the node being registered when epmd is
> running?
>
> For anyone interested by the details, the code that triggers the
> registration (via 'register_node') is found here:
>
> https://github.com/erlang/otp/blob/master/lib/kernel/src/erl_epmd.erl#L224-L245
> and the 'erl_epmd_port' option is used only as a fallback when
> 'do_register_node' doesn't succeed in registering with the epmd
> daemon.
>
> With the default 'inet_tcp' distribution protocol, the call to
> 'register_node' is currently mandatory in 'gen_listen' here:
>
> https://github.com/erlang/otp/blob/master/lib/kernel/src/inet_tcp_dist.erl#L93-L97
>
> With the 'gen_tcp_dist' alternative distribution protocol example, the
> call to 'register_node' is also mandatory, this time in 'listen' here:
>
> https://github.com/erlang/otp/blob/master/lib/kernel/examples/gen_tcp_dist/src/gen_tcp_dist.erl#L86-L94
> but it should be relatively easy to make a custom version that gives
> the priority to the 'erl_epmd_port' option if preferred.
>
> Cheers,
> Jérôme
>
>
> Le mar. 22 déc. 2020 à 04:03, Shunichi Shinohara
> <shino.shun@REDACTED> a écrit :
> >
> > Maybe there are anyone interested, discussion continues in github PR:
> >   Document the -no_epmd option by JeromeDeBretagne · Pull Request #2945
> · erlang/otp
> >   https://github.com/erlang/otp/pull/2945
> >
> > Thanks for the PR, Jérôme!
> >
> > -----
> > Shino
> >
> > 2020年12月21日(月) 10:11 Shunichi Shinohara <shino.shun@REDACTED>:
> >>
> >> Hi Jérôme,
> >>
> >> Thanks a lot for the useful information, it works like a charm!
> >>
> >> Thanks again,
> >> Shino
> >>
> >>
> >> 2020年12月18日(金) 17:50 Jérôme de Bretagne <jerome.debretagne@REDACTED>:
> >>>
> >>> Hi Shino,
> >>>
> >>> This behavior is indeed expected.
> >>>
> >>> To avoir all registrations to epmd, you can pass the -no_epmd option
> instead.
> >>>
> >>> It is mentioned in the following documentation:
> >>> https://erlang.org/doc/apps/erts/alt_dist.html
> >>>
> >>> Cheers,
> >>> Jérôme
> >>>
> >>> Le ven. 18 déc. 2020 à 03:40, Shunichi Shinohara <shino.shun@REDACTED>
> a écrit :
> >>>>
> >>>> Hi List,
> >>>>
> >>>> I try "epmdlessless" configuration described in:
> >>>>   Running Erlang Releases without EPMD on OTP 23.1+ · Erlware Blog
> >>>>   https://blog.erlware.org/epmdlessless/
> >>>>
> >>>> It works as described, thanks to people who contributed to the
> feature!
> >>>> However, it behaves in an unexpected way (to me) under epmd daemon
> running case.
> >>>>
> >>>> Expected behavior is the case without running epmd daemon. After
> launching a node as:
> >>>>
> >>>> % erl -sname foo -start_epmd false -erl_epmd_port 14693
> >>>> Erlang/OTP 23 [erts-11.1.4] [source] [64-bit] [smp:16:16]
> [ds:16:16:10] [async-threads:1]
> >>>>
> >>>> epmd daemon does *NOT* start, as expected:
> >>>>
> >>>> % epmd -names
> >>>> epmd: Cannot connect to local epmd
> >>>>
> >>>> On the other hand, after epmd daemon started as epmd -daemon,
> >>>> by executing the same erl command above, the node is registered to
> epmd daemon:
> >>>>
> >>>> % epmd -names
> >>>> epmd: up and running on port 4369 with data:
> >>>> name foo at port 14693
> >>>>
> >>>> The questions are:
> >>>> - Is this behavior expected (to other than me)?
> >>>> - Is there any option(s) of erl command to avoid registration to epmd?
> >>>>   # I guess it's possible by using
> https://github.com/tsloughter/epmdless
> >>>>
> >>>> Thanks,
> >>>> Shino
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20210112/2a82f9d8/attachment.htm>


More information about the erlang-questions mailing list