I’m trying to connect two computers in different machines, the two of them under the same network.
I’ve achieved this using the same computer with two terminal sessions open, and I think I get it, but it doesn’t work when I’m using two separated machines.
Is it the same cookie and have you checked your firewall? Is epmd running on the host you are trying to connect to? Does connect return instantly or does some time pass? Are you able to create the connection the other way around? Have you checked if the IPs are actually correct? Are you able to otherwise initiate connections between those computers (eg. SSH, ping, telnet, HTTP, RDP, VNC)?
Is it the same cookie and have you checked your firewall?
What should I check exactly, I can see that the firewall is turned off
Is epmd running on the host you are trying to connect to? Does connect return instantly or does some time pass?
If I run epmd -names both computers I have a success response:
Computer 1:
> epmd -names
epmd: up and running on port 4349 with data:
name one at port 9000
Computer 2:
> epmd -names
epmd: up and running on port 4349 with data:
name two at port 9000
With this I can see that both epmd’s are running in the same port, and both apps are running also in the same port.
Are you able to create the connection the other way around?
No, I tried both directions
Have you checked if the IPs are actually correct?
Yes, both IP’s are correct
Are you able to otherwise initiate connections between those computers (eg. SSH, ping, telnet, HTTP, RDP, VNC)?
I did this:
ping 192.168.0.1
PING 192.168.1.68 (192.168.0.1): 56 data bytes
64 bytes from 192.168.0.1: icmp_seq=0 ttl=64 time=105.282 ms
64 bytes from 192.168.0.1: icmp_seq=1 ttl=64 time=3.750 ms
64 bytes from 192.168.0.1: icmp_seq=2 ttl=64 time=2.611 ms
64 bytes from 192.168.0.1: icmp_seq=3 ttl=64 time=2.152 ms
64 bytes from 192.168.0.1: icmp_seq=4 ttl=64 time=7.478 ms
64 bytes from 192.168.0.1: icmp_seq=5 ttl=64 time=10.761 ms
I can guess that both computers are seeing each other, but I’m not sure.
Quick question, I’m assuming that because both computers are connected to the same Wireless network this should work, I’m I wrong? should the computers be connected by cable or something like that?
Then you usually do not need to check more. But depending on your system, are you sure you have shut down firewalls? Especially if you are on windows, there is sometimes an annoying pop up, which might enable or disable internet access for a single application.
This makes me nervous, why is ping showing 2 different IP addresses here? Do the computers perhaps have multiple IPs? Have you checked all of them?
Thats somewhere on layers 1-2, the BEAMs node connection somewhere on 6-7, so that shouldn’t matter…
Have you checked if the request actually hits the other computer using tools like wireshark/tcpdump?
This really is regular network debugging (which I tend to wait for my coworkers to do it ) and not specific to erlang or elixir.
What are the IP’s of both computers? It’s a little off for one of them to be 192.168.0.1 because in most home setups that’s the IP of the router instead of a computer.
ping 192.168.1.68
PING 192.168.1.68 (192.168.1.68): 56 data bytes
64 bytes from 192.168.1.68: icmp_seq=0 ttl=64 time=49.161 ms
64 bytes from 192.168.1.68: icmp_seq=1 ttl=64 time=15.129 ms
64 bytes from 192.168.1.68: icmp_seq=2 ttl=64 time=188.599 ms
64 bytes from 192.168.1.68: icmp_seq=3 ttl=64 time=177.096 ms
64 bytes from 192.168.1.68: icmp_seq=4 ttl=64 time=322.621 ms
64 bytes from 192.168.1.68: icmp_seq=5 ttl=64 time=2.274 ms
ping 192.168.1.64
PING 192.168.1.64 (192.168.1.64): 56 data bytes
64 bytes from 192.168.1.64: icmp_seq=0 ttl=64 time=48.375 ms
64 bytes from 192.168.1.64: icmp_seq=1 ttl=64 time=4.841 ms
64 bytes from 192.168.1.64: icmp_seq=2 ttl=64 time=2.179 ms
64 bytes from 192.168.1.64: icmp_seq=3 ttl=64 time=2.325 ms
Note:
Firewall is off for both computers, how do I know this?
I’m on mac so ss is not the option here, but netstat -lnt | grep "beam\|epmd" gives me 0 results, I don’t know if that means that epmd is not running, but I think it is, since I can see this then I run epmd -names
epmd -names
epmd: up and running on port 4349 with data:
name one at port 9000
I don’t really know how to use tcpdump but I’ll search a little bit about it.
I used wireshark and looks like the packages a passing through the network in both directions, so the last thing that can be the issue is the access point but I’m not sure how to verify that.