ipfs-shipyard / gomobile-ipfs

IPFS and libp2p on Mobile, with Gomobile
Other
319 stars 62 forks source link

[gomobile-lib] go-ipfs doesn't seem to work properly over cellular connection #9

Open aeddi opened 5 years ago

aeddi commented 5 years ago

We noticed when writing/testing the example application that go-ipfs can barely connect to bootstrap nodes. It seems not to be able to do peer discovery and we see a lot of dial error and timeout in the logs.

We have since tested on our laptops with a classic go-ipfs node and a 4G tethering connection: same problem. In both cases we tried to do as much as possible to tweak the configuration without success. For the moment, we haven't had time to investigate further and It is possible that we missed an obvious detail.

Note that there are differences in connection characteristics depending on the mobile operator used (for example, some allow port forwarding). We tested only with the same French operator.

Also note that we didn't have that kind of problems with Berty which is built on top of libp2p. We were able to connect in 4G to relays without any problems and by using quic-transport, we could easily stay connected to a peer when switching between wifi <-> 4G.

RubenKelevra commented 4 years ago

I'm running a node purely on 4G and it's working fine most of the time (carrier grade NAT plus Wifi Router NAT and no IPv6 🤢).

I discovered that go-ipfs can get "stuck" in a strange state, where like 100 connections are still showed but the amount of traffic is basically down to some bytes/s and no reconnection attempts are made until I restart the daemon - while the internet connection works fine.

This happens especially often if the connection is lossy.

Had no time to debug this yet, thought. Might have something to do with QUIC (since it's experimental and not on by default?).

Config: TLS preferred, QUIC on, version: 0.4.23

jefft0 commented 6 months ago

Try the same tcp.DisableReuseport() as Berty.