[erlang-questions] escript node name resolution

Trent Hampton trenthampton@REDACTED
Mon Mar 7 22:34:46 CET 2016

- 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

- 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( 'my_app@REDACTED

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.

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

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 my_app

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

More information about the erlang-questions mailing list