Need help: Super basic libcluster example using docker

I’m trying to stand up a very basic example of distributed elixir using docker and epmd.

I chose to use libcluster and followed the readme with the example of the two nodes a@127.0.0.1 and b@127.0.0.1

Heres the app in github here GitHub - joshchernoff/cluster_example: A very basic example of using distributed elixir with LiveView and docker-compose

In short, everything works besides libcluster.
I can manually connect the nodes via Node.connect and list the nodes by hand but when running libcluster I get

Any ideas?

If I had to guess I would think its related to something running too soon. IE maybe I need to wait to boot the other container first before the other? :man_shrugging:

I’m hoping I just overlooked something basic.

I was mistaken I can’t Node.connect by hand after all. I was connecting the node to the same app thus is was saying true, I didn’t notice I was giving the wrong node name to connect to. When trying to use the correct node name I found it would return false thus the prob here is likely epmd is not able to connect because of docker.

1 Like

See this other topic to see if addresses your issue:

2 Likes