[erlang-questions] receiving pang from net_adm:ping/1 even though net_adm:names/0 shows the other node

Dennis Byrne dennisbyrne@REDACTED
Sun Apr 19 19:30:24 CEST 2009

On Sun, Apr 19, 2009 at 12:18 PM, Per Melin <per.melin@REDACTED> wrote:
> On Sun, Apr 19, 2009 at 7:03 PM, Dennis Byrne <dennisbyrne@REDACTED> wrote:
>> $ erl -name bar -setcookie c
>> (bar@REDACTED)1> net_adm:names().
>> {error,nxdomain}
> nxdomain means non-existing domain, which I guess means that your
> machine's DNS name isn't actually 207.hyperband.com. Can that be
> correct?

I thought this as well but if you will notice though, the bar node has
no problem pinging itself using this domain.  You are correct though
because I cannot even ping the machine using a standard ping outside
of erlang.

$ ping 207.hyperband.com
ping: cannot resolve 207.hyperband.com: Unknown host

One more thing to note.  In syslog I can see that my ISP is setting my
hostname to .  I can ping my machine
(outside of erlang) using this:

$ ping
PING ( 56 data bytes
64 bytes from icmp_seq=0 ttl=64 time=0.038 ms

But ping fails using this hostname within Erlang.

(bar@REDACTED)6> net_adm:ping('bar@REDACTED').

> Try starting both nodes with -sname. That doesn't require a valid hostname.

This is what I did in the original post, starting the nodes with $ erl
-sname foo -setcookie c and $ erl -sname bar -setcookie c .

Dennis Byrne

More information about the erlang-questions mailing list