r11na
Two digital ocean nodes running elixir won't connect
I have two digital ocean instances each running an elixir app but I can’t get them to connect to each other via longnames and Node.connect.
I’m using digitalocean private IPs to connect and the machines definitely can see each other as I can ping them, from each other and they definitely have the cookies set to be the same.
It’s hard to trouble shoot why nodes won’t connect since all it does is return false.
Any ideas what is wrong?
Most Liked
r11na
I’ve managed to get it working now, indeed the problem was the random ports that erlang listens on needed opening, not just the epmd port.
iex --erl ‘-kernel inet_dist_listen_min 10001’ --erl ‘-kernel inet_dist_listen_max 10010’
running elixir with the inet_dist_listen ports fixed to a certain range, then opening all the ports in that range to tcp traffic solved the issue!
Thanks for the help everyone!
praveenperera
In your docker file do you expose the necessary ports?
ENV HTTP_PORT=4000 BEAM_PORT=14000 ERL_EPMD_PORT=24000
EXPOSE $HTTP_PORT $BEAM_PORT $ERL_EPMD_PORT
idi527
Last Post!
sensiblearts
UPDATE: Solved: Stupid mistake. I was calling restart instead of daemon. ![]()
Hi,
I think I might be running into this same problem.
Is this still the fix, and do you think it’s unique to DigitalOcean?
(I had my app working on Google Computer, and did not have to worry about randome erlang ports.)
Now that I have switched to DigitalOcean, it’s not talking to epmd: I run epmd in the foreground, and then launch my release, and epmd hears nothing.
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
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #hex
- #security









