: net_adm:ping not working -- still not answered

erlang erlang@REDACTED
Fri Sep 1 19:54:35 CEST 2006


Yes, you have shown the tests I am using, very simple cases. 
But I get pangs, and timeouts.

I agree it is probably due to a  misconfigured network. What I have
is one Windows Server 2003 sp1 machine that is setup for a 
peer-to-peer workgroup, with no local dns server, domain controller, 
etc. I agree that my problem is most likely a network configuration 
that is not Erlang friendly. I couldn't find a prerequisites list for Erlang 
so I'm not sure what it needs. I have used many applications that have no
problem opening ports on localhost.


> 
> Well, it should work.
> 
> Try the following diagnosis:
> 
> $ erl -sname a
> $ erl -sname b
> 
> (a@REDACTED)> erl_epmd:names().
> {ok,[{"a",43500},{"b",43505}]}
> (a@REDACTED)> inet:gethostbyname("my-server").
> {ok,{hostent,"my-server",[],inet,4,[{192,168,0,100}]}}
> (a@REDACTED)> net_adm:ping('b@REDACTED').
> pong
> (a@REDACTED)> nodes().
> ['b@REDACTED']
> 
> 
> And if that does not work as above try:
> 
> $ erl -sname a@REDACTED
> $ erl -sname b@REDACTED
> 
> (a@REDACTED)> inet:gethostbyname("localhost").
> {ok,{hostent,"localhost",[],inet,4,[{127,0,0,1}]}}
> (a@REDACTED)> erl_epmd:names().
> {ok,[{"b",43527},{"a",43530}]}
> (a@REDACTED)> net_adm:ping('b@REDACTED').
> pong
> (a@REDACTED)> nodes().
> ['b@REDACTED']
> 
> 
> I am suspecting your machine may have misconfigured network.
> 
> To make sure the cookie is the same, add the argument
> -setcookie my-cookie4711
> to the command line of both nodes, but if you have the wrong cookie,
> the target node should print: 
> =ERROR REPORT==== 1-Sep-2006::09:40:06 ===
> ** Connection attempt from disallowed node b@REDACTED ** 
> when net_adm:ping(a@REDACTED) fails.
> 
> 
> 
> On Thu, Aug 31, 2006 at 09:29:48AM -0700, erlang wrote:
> > > 
> > > Sorry, this is indeed a typo in my email. Should be:
> > > (b@REDACTED)1> net_adm:ping('a@REDACTED').
> > > 
> > > > 
> > > > Hi, is the colon ":" just a typo in your email? It should be
> > > > "@
 you can see from the node name in the Erlang shell prompt.
> > > > 
> > > > Best Regards
> > > > Lennart
> > > > 
> > > > > (b@REDACTED)1> net_adm:ping('a:my-server').
> > > > 
> > > > > I can't get the ping-pong distributed example to work, so I tried simply
> > > > > pinging another node. This doesn't work either.
> > > > > 
> > > > > os: windows server 2003, machine name is my-server.
> > > > > EShell v5.5.1
> > > > > 
> > > > > command lines: erl -sname a
> > > > >                             erl -sname b
> > > > > 
> > > > > (b@REDACTED)1> net_adm:ping('a:my-server').
> > > > > 
> > > > > always returns pang. The cookie file is being read, and the cookie is
> > > > > the same in both nodes. What to try next?
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > 
> > 
> 
> -- 
> 
> / Raimo Niskanen, Erlang/OTP, Ericsson AB 






More information about the erlang-questions mailing list