"504 Gateway Time-out" & Content-discovery problems

Whenever I add a file to my IPFS node, then I open it on one of the public gateways. It will keep loading forever until it shows “504 Gateway Time-out”, even though the file size is under 1 KB.

While searching about my problem on the internet, someone told me to run https://check.ipfs.network/ and check if my file is accessible. And the result is always like this:

❌ Could not connect to multiaddr: context deadline exceeded
✔ Found multiaddrs advertised in the DHT:
	/ip4/127.0.0.1/tcp/4001
	/ip4/127.0.0.1/udp/4001/quic
	/ip4/141.95.162.35/tcp/4001/p2p/12D3KooWSsKvuWQf5sNt1djnmMT3dyLexRQKUzkK4BHJo4S24Zoz/p2p-circuit
	/ip4/141.95.162.35/udp/5675/quic/p2p/12D3KooWSsKvuWQf5sNt1djnmMT3dyLexRQKUzkK4BHJo4S24Zoz/p2p-circuit
	/ip4/172.105.192.229/tcp/4001/p2p/12D3KooWD6ejSQDKsGYCXw2EBByj3WJJmgbqub5csdXFE5GqwJ5D/p2p-circuit
	/ip4/172.105.192.229/udp/4001/quic/p2p/12D3KooWD6ejSQDKsGYCXw2EBByj3WJJmgbqub5csdXFE5GqwJ5D/p2p-circuit
	/ip4/192.168.1.101/tcp/4001
	/ip4/192.168.1.101/udp/4001/quic
	/ip6/64:ff9b::8d5f:a223/tcp/4001/p2p/12D3KooWSsKvuWQf5sNt1djnmMT3dyLexRQKUzkK4BHJo4S24Zoz/p2p-circuit
	/ip6/::1/tcp/4001
	/ip6/::1/udp/4001/quic
❌ Could not find the multihash in the dht
❌ There was an error downloading the CID from the peer: could not connect to peer

Can someone explain the meaning of these three problems? And how to solve it?

Thanks

Hello!

  • “Could not connect…” means ipfs-check failed to dial your node, meaning there are no open ports. This docs page should be able to assist you with that.
  • Not 100% sure what multiaddrs it’s listing there to be completely honest
  • Could not find the multihash in the DHT means ipfs-check was unable to find a published record of the CID you provided in the DHT. This typically happens when a node is offline, or you used a node that explicitly has disabled the DHT. Could be related to your connectivity issues.
  • This is effectively the same error as the first one, ipfs-check attempted to connect to the provided multiaddress to download the provided CID, but failed to connect.

I believe solving the connectivity issue should resolve your errors. Alternatively if you’re not able to open a port, you could use a service such as https://web3.storage which will allow you to store up to 1TiB on their nodes for free (I personally like to do both).

If you need more information please don’t hesitate to ask, I’m here to help :slight_smile:.

1 Like

I believe that as @Discordian stated you have your IPFS node offline or blocked. A better way to ensure that it isn’t offline is to check to see if the daemon is running for the node (a service in the background). Because unless it is pinned (hosted) on a remote node (server/machine) where intent is shown to preserve the objects they will be GC (garbage collected). If your node is on your PC that you are looking it up on. Then you will need to restart the daemon (service). IPFS is advanced technology but it isnt Magic. Certain things must be for it to work.
Those multiaddr shown in log are the connections themselves. Notice there are only two unique strings which would correspond with the two connections.

It’s definitely port blocking issue. Check local iptables rules and network firewall rules.