Node.list() is not listing connected nodes in a hidden node

$ iex --sname node1@localhost

$ iex --sname node2@localhost --hiddden

iex(node2@localhost)1> Node.connect(:node1@localhost)
true
iex(node2@localhost)2> Node.list()
[]

If I create one hidden and one normal node and connect them with Node.connect/1. Why do I get an empty list when I want to list all connected nodes on the hidden node? Is this a wanted behaviour?

Per the docs, Node.list/0 defaults to Node.list(:visible), you can also pass other flags, such as :visible | :hidden | :connected | :this | :known.

6 Likes

Unfortunately I haven’t used the distributed functionality of the BEAM yet and was just tinkering around with different Node options described in Saša’s great book Elixir in Action. So maybe this isn’t really an unexpected behaviour, but I was just confused by getting an empty list when I tried to list all visible nodes from a hidden one.

Thanks Jose for taking your time for this stupid question. I don’t take this for granted and really love your dedication to the community.

4 Likes