Hi! I was wondering if anyone knows if it’s possible to connect two nodes when the connection node host name differs from the configured node host name?
The context here is deployment in a docker cluster, but I can reproduce this locally without docker.
For example, suppose my local network IP is
# in terminal 1 iex --name firstname.lastname@example.org # in terminal 2 iex --name email@example.com
Then I can connect to node 2 from node 1 as expected if I use that IP:
iex(firstname.lastname@example.org)3> Node.connect(:"email@example.com") true iex(firstname.lastname@example.org)4> Node.list() [:"email@example.com"]
However, if I try to connect using `127.0.0.1, it fails to connect:
iex(firstname.lastname@example.org)3> Node.connect(:"email@example.com") false iex(firstname.lastname@example.org)4> Node.list() 
I’ve done a bit of digging on this using
recon_trace on the
dist_util module and it seems to fail to connect during the handshake step. I was thinking maybe the cookie value gets hashed with the node name somehow, but it doesn’t look like that’s the case.
If nothing else, I’m curious if anyone can explain what’s going on here just for my own education. I was able to work around this in my deployments, but I’d love to understand better.