[erlang-questions] Re: node connectivity problem

Michael Santos michael.santos@REDACTED
Sun Sep 12 13:44:16 CEST 2010


On Sat, Sep 11, 2010 at 09:24:58PM -0700, bokner wrote:

> Then on box #1:
>  erl -name xmpp1@`hostname` -kernel inet_dist_listen_min 6000
> inet_dist_listen_max 6050 -setcookie testcookie
> 
> and on box #2:
>  erl -name xmpp2@`hostname` -kernel inet_dist_listen_min 6000
> inet_dist_listen_max 6050 -setcookie testcookie

> epmd on server1.net shows following:
> 
> epmd: Sun Sep 12 01:40:32 2010: opening connection on file descriptor
> 6
> epmd: Sun Sep 12 01:40:32 2010: got 8 bytes
> ***** 00000000  00 06 7a 78 6d 70 70 31
> |..zxmpp1|
> epmd: Sun Sep 12 01:40:32 2010: ** got PORT2_REQ
> epmd: Sun Sep 12 01:40:32 2010: got 18 bytes
> ***** 00000000  77 00 17 70 4d 00 00 05  00 05 00 05 78 6d 70 70  |
> w..pM.......xmpp|
> ***** 00000010  31 00                                             |1.|
> epmd: Sun Sep 12 01:40:32 2010: ** sent PORT2_RESP (ok) for "xmpp1"
> epmd: Sun Sep 12 01:40:32 2010: closing connection on file descriptor
> 6
> 
> i.e., appears to receive ping request from second node and respond
> with ok.

The request to epmd from xmpp2 -> xmppp1:

***** 00000000  00 06 7a 78 6d 70 70 31 |..zxmpp1|

00 06: Message length is 6 bytes 
7a: Message type is PORT2_PLEASE_REQ
78 6d 70 70 31: Node name is "xmpp1"

The response from epmd on xmpp1 -> xmpp2:

***** 00000000  77 00 17 70 4d 00 00 05  00 05 00 05 78 6d 70 70  | w..pM.......xmpp|
***** 00000010  31 00                                             |1.|

77: Message type is PORT2_RESP
00: Result is "ok"
17 70: Port number is 6000
4d: Node type is Erlang node
00: Protocol is TCP
05: Higest version of protocol supported
05: Lowest version of protocol supported
00 05: Node name length is 5 bytes
78 6d 70 70 31: Node name is "xmpp1"

During the next phase of the protocol, xmpp2 will connect to server1.net
on port 6000 (the distribution port of xmpp1) and go through the
authentication handshake. Try sniffing port 6000 to see if a TCP
connection is established.

If everything looks ok, start up 2 distributed nodes on server1.net
(e.g., xmpp1@REDACTED, xmpp2@REDACTED) and see if they are able
to ping each other.




More information about the erlang-questions mailing list