GithubHelp home page GithubHelp logo

Comments (8)

JackBekket avatar JackBekket commented on July 3, 2024

Has tested on my home WLAN, if I try to test between two different devices ubuntu-ubuntu - it works perfect

However, it's not working if I try to connect between ubuntu-windows

I'm not sure yet, that it could be OS related, or firewall related, but it doesn't work out of the box so far

from go-libp2p-examples.

JackBekket avatar JackBekket commented on July 3, 2024

Has tried on different windows devices

#1 - seem's like it's not even finding peers in network
#2 - found a peer, but fail with connection, says
"stream open failed dial backoff"

both of it windows 10

from go-libp2p-examples.

JackBekket avatar JackBekket commented on July 3, 2024

Probably I need to build .exe file with some specific parameters?

from go-libp2p-examples.

yusefnapora avatar yusefnapora commented on July 3, 2024

Hey @JackBekket, it sounds like when you run the example on Windows, you're never able to connect to peers? Are Windows peers able to connect to each other?

If it's possible for you to temporarily disable your firewall for testing, you could try to see if that's a factor. You can also add the compiled example's .exe file to the firewall whitelist instead of turning the whole thing off.

from go-libp2p-examples.

yusefnapora avatar yusefnapora commented on July 3, 2024

Meanwhile, I'll try to run the examples on Windows and see what I encounter :)

from go-libp2p-examples.

JackBekket avatar JackBekket commented on July 3, 2024

Now just have tried to open example on Windows and Linux machines

Program on windows device didn't said anything, it's looks like it doesn't even try to find any peers

Program on linux machine succesfully find windows peer, but it seem's it can't connect to windows machine

Connection failed: dial attempt failed: <peer.ID Qm*LSfUPD> --> <peer.ID Qm*7CJv5P> dial attempt failed: dial tcp4 169.254.59.123:4001: i/o timeout
Stream open failed dial backoff

from go-libp2p-examples.

yusefnapora avatar yusefnapora commented on July 3, 2024

I was just able to reproduce this at home. The example when running on Windows never seems to discover other nodes.

I did see that the mDNS record was published:

Screen Shot 2019-05-23 at 2 47 08 PM

The meetme entry at the bottom was published from the Windows machine. And when I run the example on my Mac, I can discover the mDNS entry, but then I get a failure as well:

$ ./chat-with-mdns
[*] Listening on: 0.0.0.0 with port: 4001

[*] Your Multiaddress Is: /ip4/0.0.0.0/tcp/4001/p2p/QmNUAZFGofVCUEhMkJ18hSPQ6oKT66UMnBFag6kZNZG9jV
Found peer: {<peer.ID Qm*GzgR8w> [/ip4/127.0.0.1/tcp/4002]} , connecting
Connection failed: dial attempt failed: <peer.ID Qm*NZG9jV> --> <peer.ID Qm*GzgR8w> dial attempt failed: dial tcp4 127.0.0.1:4002: connect: connection refused
Stream open failed dial backoff

This line stands out:

Found peer: {<peer.ID Qm*GzgR8w> [/ip4/127.0.0.1/tcp/4002]} , connecting

The peer id is from the Windows node, but the multiaddr is for the loopback interface (127.0.0.1).

This makes me suspect that on Windows, the mDNS record is getting published with the loopback address instead of the correct IP.

Aha! As I was writing this up, I noticed that the example has a -host flag, where you can set the listen address explicitly. If I set the flag to the IP address of my Windows machine like this:

.\chat-with-mdns.exe -host 10.0.1.18

Then I can find it from my Mac and connect.

@JackBekket will you try setting the -host flag to your IP address on the Windows box and see if that helps? If so, we still need to investigate why it's publishing the unusable addresses, but at least we'll know what's going on.

from go-libp2p-examples.

JackBekket avatar JackBekket commented on July 3, 2024

@yusefnapora It seems you were right, it helped!

also, I have successfully ported mdns to an android device, and it surprisingly works well!

from go-libp2p-examples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.