[erlang-questions] net_adm:names vs. erlang:nodes

Des Small small@REDACTED
Wed Nov 27 13:48:53 CET 2013


Hi,

I have been having some problems with getting Erlang nodes to see each 
other on a complex network.  I start all node with long names and 
raw numerical IP addresses, since I also can't rely on DNS to do the right 
thing.

I have three nodes: my local node ("local"); a "control" node; and a 
"streamer" node that sends data over a fast network link.

Now, "control" can't see "streamer" using their specified IP addresses:

control> net_adm:ping('streamer').

returns 'pang', and that's reasonable because traceroute(1) *also* can't 
find a path to the IP address used for 'streamer'.  But IP traffic the 
other way works fine and 'streamer' *can* net_adm:ping('control') and get 
'pong', and after that repeating the net_adm:ping('streamer') from 
'control' *does* work.

So we have the folling interaction:

"""
control1>net_adm:ping('streamer').
pang
streamer1>net_adm:ping('control').
pong
control2>net_adm:ping('streamer').
pong
"""
(All hostname atoms above are really of the form <host>@<ip address>.)

It took quite a while to realise that manually pinging from 'streamer' to 
'control' would set the network up correctly; both are visible from 
'local' and I was pinging them from there successfully without getting a 
link from 'control' to 'streamer'.

Continuing, we discover that erlang:names on 'control' *doesn't* have a 
port for 'streamer'.

control3> names().
{ok, [{'control',34285}]

but net_adm:nodes *does* see it.

control4> net_adm:nodes().
['streamer@REDACTED']

So, I am mostly asking after the fact how I should have known this, and 
how to ask erlang itself what route it is actually using between 'control' 
and 'streamer'?  I'd cheefully settle for a hint as to which part of the 
FM I should be R'ing!

(I am not currently asking whether our network topology is particularly 
optimal, although I am of course open to opinions.)

Cheers,

Des
-- 
Des Small,
Scientific Programmer, JIVE
Contact details on http://www.jive.nl/~small



More information about the erlang-questions mailing list