Help find out why discovery takes so long

I have some machines.

  1. at home, behind NAT
  2. virtual server with 4001 port forwarded
  3. virtual server with real ip, port 4001 opened

All these machines have been set up using

  1. ipfs init --profile server
  2. no other configuration changed
  3. ipfs daemon started

I do pretty the same on every machine

  1. echo “some test value” | ipfs add
  2. try to open ipfs io public gateway with added hash
  3. no luck. It keeps loading for a long time.
  4. Sometimes it gets a file after long wait (5 min or so)

Is it ok? Or do I miss something in configuration?
every machine shows about 800 peers found (ipfs swarm peers | wc -l)

And one more thing. Even if ipfs io gateway shows text file, then other public gateways don’t (for example, siderus io, gateway serph network).

Also, when I do “ipfs swarm connect {address}”, I can download content from other nodes immediately, so, 4001 open ports work ok

I tried to telnet 4001 ports from different parts of the world - everything’s working fine, telnet works, ports are opened

Forgot to say: I have latest version installed go-ipfs/0.4.22

when you run ipfs id, does it show the public_ip/tcp/4001 among the addresses?

Unfortunately, go-ipfs will not announce 4001 by default. This will only happen when a few connections have been made to that endpoint. Instead, the NAT port is announced (whatever other port the router gave you) and port forwarding is auto-setup using uPnP (which may work or not work).

My trick here is to hardcode my public IP+4001 in the Announce setting (my router ignores upnp).

1 Like

Thanks for the suggestion
Yes, ipfs id shows this as address.

I also thought it’s the reason, and I added public address as “Announce” in the config

do I add like this /ip4/169.254.89.244/tcp/4001 or just 169.254.89.244/4001