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

Bootstrapping problems #3933

Closed
dsvi opened this issue May 20, 2017 · 15 comments
Closed

Bootstrapping problems #3933

dsvi opened this issue May 20, 2017 · 15 comments

Comments

@dsvi
Copy link

dsvi commented May 20, 2017

Version information:

go-ipfs version: 0.4.9-
Repo version: 5
System version: amd64/linux
Golang version: go1.8.1

Type:

Bug

Severity:

High

Description:

Bootstrapping doesn't seem to work for me on couple machines. I can ping the ip addresses from the built in bootstrap list, but ipfs do not connect to them. ipfs swarm peers is empty.

@mateon1
Copy link
Contributor

mateon1 commented May 20, 2017

If possible, could you include as much related info as possible?
What commands are you using? What do they output? What routers do the broken nodes have? What ISPs are they on? Is outgoing port 4001 blocked?

@dsvi
Copy link
Author

dsvi commented May 20, 2017

Sorry, should have done that at the beginning.
Generally i have got ipfs and set up my node by
ipfs init
ipfs daemon
Both nodes behind NAT but they are able to redirect ports for themselves through upnp. I've checked this. Ping to the nodes from the config bootstrap list goes through fine. But ipfs is still unable to bootstrap
ipfs swarm peers
returns empty.

attempts to connect through
ipfs swarm connect /ip4/188.40.116.66/tcp/4001/ipfs/QmepgFW7BHEtU4pZJdxaNiv75mKLLRQnPi1KaaXmQN4V1a
to any address from default bootstrap list in config, end up in
Error: connect QmepgFW7BHEtU4pZJdxaNiv75mKLLRQnPi1KaaXmQN4V1a failure: dial attempt failed: context deadline exceeded
despite the ip itself is pingable.

I've worked around this by saving ipfs swarm peers from prev time. And adding the list of nodes to ipfs swarm connect one by one
cat peerlist | xargs --verbose -n 1 ipfs swarm connect
eventually it found a few nodes which are still online and connected.
Still have no idea what's wrong with the default bootstrap nodes.

@Jacodelange
Copy link

@dsvi Were you able to find a solution?

@whyrusleeping
Copy link
Member

I'm pretty sure this was an issue in the reuseport code. It has been updated in 0.4.10, and another related fix was merged for 0.4.11. Please reopen if this is still broken on latest master or 0.4.11 (once its released).

@dsvi
Copy link
Author

dsvi commented Oct 2, 2017

Unfortunately the issue is still here, in 0.4.11

@dsvi
Copy link
Author

dsvi commented Oct 2, 2017

Don't know how to reopen it. Not sure i have the access rights

@Kubuxu Kubuxu reopened this Oct 3, 2017
@Kubuxu
Copy link
Member

Kubuxu commented Oct 3, 2017

@whyrusleeping any idea?

@whyrusleeping
Copy link
Member

It sounds like a firewall issue.

@dsvi Can you try netcatting to one of the bootstrap nodes, for example:

nc 104.236.179.241 4001

And see if you get a multistream tag back?

@dsvi
Copy link
Author

dsvi commented Oct 3, 2017

It's not a firewall issue, since some nodes actually work, member? (See my workaround.) It's just the nodes from bootstrap list (and some others) that don't.
the netcat gives me:
�/multistream/1.0.0

@dsvi
Copy link
Author

dsvi commented Oct 28, 2017

actually the situation had changed a bit. now on
ipfs swarm connect /ip4/178.62.61.185/tcp/4001/ipfs/QmSoLMeWqB7YGVLJN3pNLQpmmEk35v6wYtsMGLzSr5QBU3
i get:
Error: connect QmSoLMeWqB7YGVLJN3pNLQpmmEk35v6wYtsMGLzSr5QBU3 failure: dial attempt failed: <peer.ID Yp54FE> --> <peer.ID SoLMeW> dial attempt failed: dial tcp6 [2a03:b0c0:1:d0::e7:1]:4001: connect: network is unreachable
note the ip4 in the request, but yet it tries to connect through tcp6. maybe this will give some hint, on whats going on.

@Stebalien
Copy link
Member

Stebalien commented Oct 30, 2017

ipfs swarm connect /ip4/178.62.61.185/tcp/4001/ipfs/QmSoLMeWqB7YGVLJN3pNLQpmmEk35v6wYtsMGLzSr5QBU3 won't force your machine to just dial 127.62.61.185. Instead, it will just add it to your address book and then dial all known addresses for that peer. The gateways advertise IPv6 addresses but your don't have IPv6 support so that dial is failing.

However, I that's not the problem. I'm guessing that this is just the last error; there's a different error for the IPv4 address that we're not seeing because IPFS tries all addresses (and returns the last error).

Please try raising the log level of swarm by running ipfs log level swarm2 info and then run ipfs log tail while dialing. This should print out any relevant errors (and yes, we should return these errors somehow; probably by printing status messages to stderr).

@djdv
Copy link
Contributor

djdv commented Dec 20, 2017

#4453 is giving me connection issues, anything prior to dfe7ef4 will connect but anything later than this leaves me with an empty peer table, unable to connect to anyone, even local network connections.

The error I am getting when trying to dial out is

> ipfs swarm connect /ip4/178.62.61.185/tcp/4001/ipfs/QmSoLMeWqB7YGVLJN3pNLQpmmEk35v6wYtsMGLzSr5QBU3
Error: connect QmSoLMeWqB7YGVLJN3pNLQpmmEk35v6wYtsMGLzSr5QBU3 failure: dial attempt failed: <peer.ID WABRCq> --> <peer.ID SoLMeW> dial attempt failed: dial tcp4 0.0.0.0:4737->178.62.61.185:4001: bind: Only one usage of each socket address (protocol/network address/port) is normally permitted.

To me this implies that something somewhere is trying to bind to the same socket twice.

@Stebalien
Copy link
Member

@djdv this is definitely a bug (or maybe a build issue) but not the same as this one. I've reported a new one (#4512).

@Stebalien
Copy link
Member

(closing this as it's old enough to no longer be particularly useful)

@icemagno
Copy link

2023 and I came here because SAME issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants