Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Other peers can´t see my peers hosted in my local VM #6711

Open
kikoncuo opened this issue Oct 11, 2019 · 1 comment
Open

Other peers can´t see my peers hosted in my local VM #6711

kikoncuo opened this issue Oct 11, 2019 · 1 comment
Labels
kind/bug A bug in existing code (including security flaws)

Comments

@kikoncuo
Copy link

Version information:

Peers 1 and 2 are running:

go-ipfs version: 0.4.22-
Repo version: 7
System version: amd64/windows
Golang version: go1.12.7

Peer 3 is running:

go-ipfs version: 0.4.22-
Repo version: 7
System version: amd64/linux
Golang version: go1.12.7

Description:

I successfully created a swarm key and configured 3 peers.

Peer 1 is connected to peer 2, peer 2 is connected to peer 3, peer 3 runs inside a VM connected to peer 2 connected through the virtualbox network adapter.

They can only discover files if they are directly connected to the peer. I.E. Peer 1 can´t access files of Peer 3 and Peer 3 can´t access files of Peer 1. Peer 3 is not in the list of peers for Peer 1 and vice versa.
ipfs cat or ipfs get just get stuck.

I´ve tried connecting more peers to the network in different devices, behavior is the same, host peers can connect and auto-discover each other, but they can only see the client (VM hosted) nodes in their physical machine.

I think the problem is that I connect to the VM hosted peer using the virtualbox adapter, and maybe, the other clients are trying to connect through the same IP which they can´t reach.
Is that how peer discovery works? by sharing the IP of all the nodes in the exact same way I connect to them?

@kikoncuo kikoncuo added the kind/bug A bug in existing code (including security flaws) label Oct 11, 2019
@Jorropo
Copy link
Contributor

Jorropo commented Nov 1, 2019

If a peer want to get a file and one have the file they must be able to talk to exchange the file, but if they can't see each other in the network its impossible for them to talk (wich seems with what you said of your config), how ever its possible for an other node to act as a relay. To do so :
First enable auto relay on all nodes needing to hop somewhere (that will create automaticaly choose some nodes to use as relay) :

ipfs config --json Swarm.EnableAutoRelay true

And activate relay hop on peer 2 (that will allow other peers to use peer 2 as relay) :

ipfs config --json Swarm.EnableRelayHop true

That should do it if there is no more than 1 hop to do, currently there isn't any multihop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws)
Projects
None yet
Development

No branches or pull requests

2 participants