<div dir="ltr">Hi Jérôme,<br><br>Sorry for the late reply. (new-year-holiday-lag)<br><br>> Could you describe a case when the epmd daemon is running but you<br>> wouldn't want the registration to happen? In your original question,<br>> what is the actual issue with the node being registered when epmd is<br>> running?<br><br>Our company sells a package software written in Erlang. If epmd daemon<br>process is unnecessary, user operation will be simpler.<br># However, it makes very little difference and is not feature related.<br># So, eliminating epmd is not a blocking issue but just nice-to-have.<br><br><div>On the other hand, I want to keep the difference between my development</div><div> environment and users' production ones as little as possible. On my side,</div><div>epmd is almost always running (e.g. erlang_ls processes use it.)<br></div><br>To satisfy both, it's great that Erlang nodes do not register themselves even<br>in the case epmd is running.<br><br>Thanks,<br>Shino<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">2021年1月1日(金) 0:37 Jérôme de Bretagne <<a href="mailto:jerome.debretagne@gmail.com">jerome.debretagne@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">You're welcome, Shino.<br>
<br>
Could you describe a case when the epmd daemon is running but you<br>
wouldn't want the registration to happen? In your original question,<br>
what is the actual issue with the node being registered when epmd is<br>
running?<br>
<br>
For anyone interested by the details, the code that triggers the<br>
registration (via 'register_node') is found here:<br>
   <a href="https://github.com/erlang/otp/blob/master/lib/kernel/src/erl_epmd.erl#L224-L245" rel="noreferrer" target="_blank">https://github.com/erlang/otp/blob/master/lib/kernel/src/erl_epmd.erl#L224-L245</a><br>
and the 'erl_epmd_port' option is used only as a fallback when<br>
'do_register_node' doesn't succeed in registering with the epmd<br>
daemon.<br>
<br>
With the default 'inet_tcp' distribution protocol, the call to<br>
'register_node' is currently mandatory in 'gen_listen' here:<br>
   <a href="https://github.com/erlang/otp/blob/master/lib/kernel/src/inet_tcp_dist.erl#L93-L97" rel="noreferrer" target="_blank">https://github.com/erlang/otp/blob/master/lib/kernel/src/inet_tcp_dist.erl#L93-L97</a><br>
<br>
With the 'gen_tcp_dist' alternative distribution protocol example, the<br>
call to 'register_node' is also mandatory, this time in 'listen' here:<br>
   <a href="https://github.com/erlang/otp/blob/master/lib/kernel/examples/gen_tcp_dist/src/gen_tcp_dist.erl#L86-L94" rel="noreferrer" target="_blank">https://github.com/erlang/otp/blob/master/lib/kernel/examples/gen_tcp_dist/src/gen_tcp_dist.erl#L86-L94</a><br>
but it should be relatively easy to make a custom version that gives<br>
the priority to the 'erl_epmd_port' option if preferred.<br>
<br>
Cheers,<br>
Jérôme<br>
<br>
<br>
Le mar. 22 déc. 2020 à 04:03, Shunichi Shinohara<br>
<<a href="mailto:shino.shun@gmail.com" target="_blank">shino.shun@gmail.com</a>> a écrit :<br>
><br>
> Maybe there are anyone interested, discussion continues in github PR:<br>
>   Document the -no_epmd option by JeromeDeBretagne · Pull Request #2945 · erlang/otp<br>
>   <a href="https://github.com/erlang/otp/pull/2945" rel="noreferrer" target="_blank">https://github.com/erlang/otp/pull/2945</a><br>
><br>
> Thanks for the PR, Jérôme!<br>
><br>
> -----<br>
> Shino<br>
><br>
> 2020年12月21日(月) 10:11 Shunichi Shinohara <<a href="mailto:shino.shun@gmail.com" target="_blank">shino.shun@gmail.com</a>>:<br>
>><br>
>> Hi Jérôme,<br>
>><br>
>> Thanks a lot for the useful information, it works like a charm!<br>
>><br>
>> Thanks again,<br>
>> Shino<br>
>><br>
>><br>
>> 2020年12月18日(金) 17:50 Jérôme de Bretagne <<a href="mailto:jerome.debretagne@gmail.com" target="_blank">jerome.debretagne@gmail.com</a>>:<br>
>>><br>
>>> Hi Shino,<br>
>>><br>
>>> This behavior is indeed expected.<br>
>>><br>
>>> To avoir all registrations to epmd, you can pass the -no_epmd option instead.<br>
>>><br>
>>> It is mentioned in the following documentation:<br>
>>> <a href="https://erlang.org/doc/apps/erts/alt_dist.html" rel="noreferrer" target="_blank">https://erlang.org/doc/apps/erts/alt_dist.html</a><br>
>>><br>
>>> Cheers,<br>
>>> Jérôme<br>
>>><br>
>>> Le ven. 18 déc. 2020 à 03:40, Shunichi Shinohara <<a href="mailto:shino.shun@gmail.com" target="_blank">shino.shun@gmail.com</a>> a écrit :<br>
>>>><br>
>>>> Hi List,<br>
>>>><br>
>>>> I try "epmdlessless" configuration described in:<br>
>>>>   Running Erlang Releases without EPMD on OTP 23.1+ · Erlware Blog<br>
>>>>   <a href="https://blog.erlware.org/epmdlessless/" rel="noreferrer" target="_blank">https://blog.erlware.org/epmdlessless/</a><br>
>>>><br>
>>>> It works as described, thanks to people who contributed to the feature!<br>
>>>> However, it behaves in an unexpected way (to me) under epmd daemon running case.<br>
>>>><br>
>>>> Expected behavior is the case without running epmd daemon. After launching a node as:<br>
>>>><br>
>>>> % erl -sname foo -start_epmd false -erl_epmd_port 14693<br>
>>>> Erlang/OTP 23 [erts-11.1.4] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1]<br>
>>>><br>
>>>> epmd daemon does *NOT* start, as expected:<br>
>>>><br>
>>>> % epmd -names<br>
>>>> epmd: Cannot connect to local epmd<br>
>>>><br>
>>>> On the other hand, after epmd daemon started as epmd -daemon,<br>
>>>> by executing the same erl command above, the node is registered to epmd daemon:<br>
>>>><br>
>>>> % epmd -names<br>
>>>> epmd: up and running on port 4369 with data:<br>
>>>> name foo at port 14693<br>
>>>><br>
>>>> The questions are:<br>
>>>> - Is this behavior expected (to other than me)?<br>
>>>> - Is there any option(s) of erl command to avoid registration to epmd?<br>
>>>>   # I guess it's possible by using <a href="https://github.com/tsloughter/epmdless" rel="noreferrer" target="_blank">https://github.com/tsloughter/epmdless</a><br>
>>>><br>
>>>> Thanks,<br>
>>>> Shino<br>
</blockquote></div>