[erlang-questions] escript node name resolution

Trent Hampton <>
Mon Mar 7 22:34:46 CET 2016


Background:
- erts 17
- rebar3 (beta 4)
- We are building releases using rebar3 and relx
- In vm.args we are using the short name -sname my_app
- centos 6.3

Problem:
- When we call the generated shell script with a ping; "my_app ping", it
calls the nodetool ping which calls

{true, pong} = {net_kernel:hidden_connect_node( '
'),net_adm:ping('')}.

The tuple returned is usually either {false, pong}, {true, pang}, or
{false, pang}. While this call does not fail every single time it does fail
almost every time.

If I attach to the node and run the commands from the erlang cmd prompt, it
consistently succeeds.

()242> {true, pong} = {net_kernel:hidden_connect_node(
''), net_adm:ping('')}.
{true,pong}

The interesting thing is that when I add an alias to the /etc/hosts file
for my_app, the escript consistently succeeds.

Is the problem with the network configuration or with the erlang
application configuration?

cat /etc/hosts
10.0.5.21 my_app

Any ideas?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160307/cd2623cf/attachment-0001.html>


More information about the erlang-questions mailing list