Remote connect problems.

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Remote connect problems.

Walter C. Reel III
Hello,

I'm currently looking into creating distributed, reliable information base.
I read the Erlang white paper, saw the FP foundation, hot swappable
capability and built-in database system and thought this was perfect.  So
I've decided to check it out.

I have two hosts running Erlang in an internal network.  One is a win32
machine and the other is linux.  After I start up erlang on each system I
can't ping the win32 from linux, but as soon as I ping the linux machine
from the win32 host the systems connect.  Both are the same version
(5.2.3.3), both can resolve name lookups to each other and both have the
same cookie set and 'epmd.exe -d -d' doesn't report anything when I try to
'net_adm:ping(Node)' from the linux machine.  Does anyone know what am I
doing wrong?  I'm really stuck on this.

 - Walter





Reply | Threaded
Open this post in threaded view
|

Remote connect problems.

Matthias Lang-2

A first step is to try the whole experiment with two nodes on the
same linux machine. I.e. start two xterms. In one:

   matthias >erl -sname hokus -setcookie nocookie
   Erlang (BEAM) emulator version 5.1.2 [source]
  (hokus)1>

and in the other

   matthias >erl -sname pokus -setcookie nocookie
   Erlang (BEAM) emulator version 5.1.2 [source]
   (pokus)1> net:ping(hokus).
   pong

Note the 'pong'. A next step could be to use numeric host-ids, i.e. on
linux:

   erl -name 'hokus' -setcookie nocookie

and on windows

   erl -name 'pokus' -setcookie nocookie
   (pokus)1> net:ping('hokus').
   pong

Note the '-name' instead of '-sname'. Let the list know how it
goes. And next time you report a problem, please include a cut and
paste of what you actually did, my ESP isn't what it used to be.

Matthias
   
Walter C. Reel III writes:
 > Hello,
 >
 > I'm currently looking into creating distributed, reliable information base.
 > I read the Erlang white paper, saw the FP foundation, hot swappable
 > capability and built-in database system and thought this was perfect.  So
 > I've decided to check it out.
 >
 > I have two hosts running Erlang in an internal network.  One is a win32
 > machine and the other is linux.  After I start up erlang on each system I
 > can't ping the win32 from linux, but as soon as I ping the linux machine
 > from the win32 host the systems connect.  Both are the same version
 > (5.2.3.3), both can resolve name lookups to each other and both have the
 > same cookie set and 'epmd.exe -d -d' doesn't report anything when I try to
 > 'net_adm:ping(Node)' from the linux machine.  Does anyone know what am I
 > doing wrong?  I'm really stuck on this.
 >
 >  - Walter
 >
 >


Reply | Threaded
Open this post in threaded view
|

Remote connect problems.

Walter C. Reel III
On Tuesday 11 March 2003 07:42 am, Matthias Lang wrote:

> A first step is to try the whole experiment with two nodes on the
> same linux machine. I.e. start two xterms. In one:
>
>    matthias >erl -sname hokus -setcookie nocookie
>    Erlang (BEAM) emulator version 5.1.2 [source]
>   (hokus)1>
>
> and in the other
>
>    matthias >erl -sname pokus -setcookie nocookie
>    Erlang (BEAM) emulator version 5.1.2 [source]
>    (pokus)1> net:ping(hokus).
>    pong
>
> Note the 'pong'. A next step could be to use numeric host-ids, i.e. on
> linux:
>
>    erl -name 'hokus' -setcookie nocookie
>
> and on windows
>
>    erl -name 'pokus' -setcookie nocookie
>    (pokus)1> net:ping('hokus').
>    pong
>
> Note the '-name' instead of '-sname'. Let the list know how it
> goes. And next time you report a problem, please include a cut and
> paste of what you actually did, my ESP isn't what it used to be.
>
> Matthias

With the fully qualified name provided neither of the machines can talk to
each other now.

$ erl -name 'kermit' -setcookie nocookie
Erlang (BEAM) emulator version 5.2.3.3 [source] [hipe] [threads:0]

Eshell V5.2.3.3  (abort with ^G)
(kermit)1> nodes().
[]
(kermit)2> net_adm:ping('piggy').
pang
(kermit)3>

The results are the same on 'piggy'.  The fully qualified name with the IP
address should work regardless right?

Two nodes on the same host will talk to each other with no problems.

$ erl -name 'fozzie' -setcookie nocookie
Erlang (BEAM) emulator version 5.2.3.3 [source] [hipe] [threads:0]

Eshell V5.2.3.3  (abort with ^G)
(fozzie)1> nodes().
[]
(fozzie)2> net_adm:ping('kermit').
pong
(fozzie)3>

$ erl -name 'kermit' -setcookie nocookie
Erlang (BEAM) emulator version 5.2.3.3 [source] [hipe] [threads:0]

Eshell V5.2.3.3  (abort with ^G)
(kermit)1> nodes().
['fozzie']

>
> Walter C. Reel III writes:
>  > Hello,
>  >
>  > I'm currently looking into creating distributed, reliable information
>  > base. I read the Erlang white paper, saw the FP foundation, hot
>  > swappable capability and built-in database system and thought this was
>  > perfect.  So I've decided to check it out.
>  >
>  > I have two hosts running Erlang in an internal network.  One is a win32
>  > machine and the other is linux.  After I start up erlang on each system
>  > I can't ping the win32 from linux, but as soon as I ping the linux
>  > machine from the win32 host the systems connect.  Both are the same
>  > version (5.2.3.3), both can resolve name lookups to each other and both
>  > have the same cookie set and 'epmd.exe -d -d' doesn't report anything
>  > when I try to 'net_adm:ping(Node)' from the linux machine.  Does anyone
>  > know what am I doing wrong?  I'm really stuck on this.
>  >
>  >  - Walter



Reply | Threaded
Open this post in threaded view
|

Remote connect problems.

Matthias Lang-2
Walter C. Reel III writes:

 > With the fully qualified name provided neither of the machines can talk to
 > each other now.
[...]

Everything you're doing looks correct.

The next steps are to figure out whether epmd is doing the right
things. If I start a node on each of my two machines and run 'epmd
-names', I see:

  xterm1> erl -name 'whipper' -setcookie nocookie

  xterm2> /usr/local/lib/erlang/bin/epmd -names
  epmd: up and running on port 4369 with data:
  name whipper at port 1460

on the other machine

  xterm3> /opt/erlang/lib/erlang/erts-5.1.2/bin/epmd -names
  epmd: up and running on port 4369 with data:
  name snipper at port 4916

If you see something similar (i.e. each EPMD process has its local
node registered), then it's starting to get hairy. You can get more
information by sniffing the ethernet when you do the first ping from
one node to the other. You should see a successful TCP 3-way on
port 4369 followed by a second successful 3-way on another port.

Anyone out there who uses Windows on a regular basis with some
suggestions?

Matthias


Reply | Threaded
Open this post in threaded view
|

Remote connect problems.

Vance Shipley-2

You can turn on debugging by giving epmd the debug flasg(s):

        epmd -names -ddddd

That'll give you more out put to look at.  Compare sucessful
to unsuccessful.

        -Vance



Reply | Threaded
Open this post in threaded view
|

Remote connect problems.

Walter C. Reel III
In reply to this post by Matthias Lang-2

You know, I just realized last night that the shell treats single quotes
differently in windows.  As soon as I realized that I retested with the -name
and IP addresses and everything worked exactly like you exampled.

It's probably some config problem in linux box.

Sorry for wasting your time, my bad.

Walt

On Wednesday 12 March 2003 09:22 pm, Matthias Lang wrote:

> Walter C. Reel III writes:
>  > With the fully qualified name provided neither of the machines can talk
>  > to each other now.
>
> [...]
>
> Everything you're doing looks correct.
>
> The next steps are to figure out whether epmd is doing the right
> things. If I start a node on each of my two machines and run 'epmd
> -names', I see:
>
>   xterm1> erl -name 'whipper' -setcookie nocookie
>
>   xterm2> /usr/local/lib/erlang/bin/epmd -names
>   epmd: up and running on port 4369 with data:
>   name whipper at port 1460
>
> on the other machine
>
>   xterm3> /opt/erlang/lib/erlang/erts-5.1.2/bin/epmd -names
>   epmd: up and running on port 4369 with data:
>   name snipper at port 4916
>
> If you see something similar (i.e. each EPMD process has its local
> node registered), then it's starting to get hairy. You can get more
> information by sniffing the ethernet when you do the first ping from
> one node to the other. You should see a successful TCP 3-way on
> port 4369 followed by a second successful 3-way on another port.
>
> Anyone out there who uses Windows on a regular basis with some
> suggestions?
>
> Matthias