r11na

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

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

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

idi527

:waving_hand:

Is private networking enabled for your droplets?

Last Post!

sensiblearts

sensiblearts

UPDATE: Solved: Stupid mistake. I was calling restart instead of daemon. :frowning:

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.

Where Next?

Popular in Questions Top

JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a > b) do {:ok, "a"} end if (a < b) do {:ok, b} end if (a == b) do {:ok, "equa...
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New

Other popular topics Top

Qqwy
Update: How to use the Blogs & Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3271 130286 1222
New
nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New

We're in Beta

About us Mission Statement