[erlang-questions] A newbie question regarding distributed programming

David Li <>
Thu Oct 22 00:25:25 CEST 2015


Hi,

I am reading up the ping pong example in the tutorial.  I want to set
up two Erlang nodes on a single VM to test the code. However the pong
program never receives the message from ping.

My module name is "hello_msg_twonodes". Here are what I did:

To start a pong node:
==================
$ erl -sname pong
Erlang/OTP 18 [erts-7.1] [source] [64-bit] [async-threads:10] [hipe]
[kernel-poll:false]

Eshell V7.1  (abort with ^G)
()1>
()1> hello_msg_twonodes:start_pong().
true

To start a ping node
==================

$ erl -sname ping
Erlang/OTP 18 [erts-7.1] [source] [64-bit] [async-threads:10] [hipe]
[kernel-poll:false]

Eshell V7.1  (abort with ^G)
()1> hello_msg_twonodes:start_ping().
In PING func, sending to pong
In PING func, sent to pong, waiting for feedback
<0.42.0>



After this, no more messages are shown on either one of the nodes.
Can anyone help me to see what's wrong?

Thanks.


More information about the erlang-questions mailing list