#Debugging BEAM nodes

1 messages · Page 1 of 1 (latest)

pine goblet
#

Hello! I'm running into a bit of a problem when trying to make two BEAM nodes talk to each other. I don't really know where I would even start debugging this so I thought I might ask here to folks who are definitely more experienced than me on Erlang 😁
So my setup is the following: I'm running an erlang shell on my mac and on a raspberry pi, both are connected to the same network and are running OTP 28:

# Erlang shell on my mac
ERL_AFLAGS="-setcookie wibble -sname one" erl
one@Mac> ...

# -----
# Erlang shel on my Pi, making sure they share the same cookie
ERL_AFLAGS="-setcookie wibble -sname two" erl
two@daneel> ...

Then from my raspberry I do net_adm:ping(one@Mac), get a pong back and if I check nodes() on each shell I can see the other node is connected. Now is the part where things start getting strange, because if I try sending any other message to the other node - despite being able to ping - the message is not received

% On my mac
one@Mac> register(shell, self()).
true.

% On my Pi
two@daneel> {one@Mac, shell} ! hello.
hello.

But then if I try flush()-ing the shell it doesn't show any message. I have no idea what could it be, and don't really know where to even start looking to debug this, does anyone have any idea what I could try, or what could be the source of the issue?

#

Oh

rancid willow
#

is the registered name and node name tuple the wrong way around?

pine goblet
#

I got the order wrong in the message sending, it should be {name/pid, node}

#

How did I miss that

rancid willow
#

I was too slow 😞