# Nodes failing to connect to each other

**URL:** <https://erlangforums.com/t/nodes-failing-to-connect-to-each-other/2767>\
**Category:** Questions / Help\
**Tags:** distributed-erlang, erlang-nodes\
**Created:** [July 28, 2023, 7:24am UTC](https://erlangforums.com/t/nodes-failing-to-connect-to-each-other/2767 "2023-07-28T07:24:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![EliasA5](https://erlangforums.com/letter_avatar_proxy/v4/letter/e/3da27b/32.png) [@EliasA5](https://erlangforums.com/u/EliasA5)\
**Post date:** [July 28, 2023, 7:24am UTC](https://erlangforums.com/t/nodes-failing-to-connect-to-each-other/2767/1 "2023-07-28T07:24:29Z")

</div>

I’m running 3 erlang nodes, on my pc, laptop and raspberry pi, pc and laptop running opensuse tumbleweed and pi is running Raspbian, all on Erlang/OTP 25.  
my pc and laptop connect flawlessly to the pi, but whenever I try to connect them both I get an error message that the laptop and pc can’t connect to each other, that causes the other connection to also fail to prevent overlapping partitions, I cant yet upload a picture, so here’s a link to imgur that includes the 3 terminals: [https://i.imgur.com/5PewOnT.jpg](https://i.imgur.com/5PewOnT.jpg)  
Additionally whenever I open 2 nodes on my pc using fully qualified names with the ip of the pc and try to connect them, the connection fails, screenshot: [https://i.imgur.com/GZVZUv7.png](https://i.imgur.com/GZVZUv7.png), connecting using sname on the same pc works.  
I’m all out of ideas, I think the problems falls on opensuse compilation of Erlang, I’m gonna try to compile it manually using asdf.  
Help would be appreciated

---

<div class="post-metadata">

**Author:** ![EliasA5](https://erlangforums.com/letter_avatar_proxy/v4/letter/e/3da27b/32.png) [@EliasA5](https://erlangforums.com/u/EliasA5)\
**Post date:** [July 28, 2023, 7:31am UTC](https://erlangforums.com/t/nodes-failing-to-connect-to-each-other/2767/2 "2023-07-28T07:31:35Z")

</div>

Update:  
Compiled erlang on pc and laptop, now I can ping 2 nodes on the same pc, but pc and laptop still can’t connect to each other.

---

<div class="post-metadata">

**Author:** ![EliasA5](https://erlangforums.com/letter_avatar_proxy/v4/letter/e/3da27b/32.png) [@EliasA5](https://erlangforums.com/u/EliasA5)\
**Post date:** [July 28, 2023, 11:36am UTC](https://erlangforums.com/t/nodes-failing-to-connect-to-each-other/2767/3 "2023-07-28T11:36:04Z")

</div>

Last update:  
The problem was that the firewall was blocking incoming connections from outside nodes, the solution was to add `--kernel inet_dist_listen_min <min_port> inet_dist_listen_max <max_port>` to the command line arguments of the erl shell, and open these ports in the firewall, along with the epmd port, or if using rebar3 add the following to the config/sys.config `{kernel, [{inet_dist_listen_min, 4372}, {inet_dist_listen_max, 4380}]}` and pass `ERL_FLAGS='-config config/sys.config' rebar3 shell ...`
