n0gg1n
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?
Marked As Solved
josevalim
Per the docs, Node.list/0 defaults to Node.list(:visible), you can also pass other flags, such as :visible | :hidden | :connected | :this | :known.
Also Liked
n0gg1n
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.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









