How get content from others

I’ve configured an ipfs node (using the go ipfs distribution, version 0.4.17), and as far as I can tell the basics work – the daemon is running, there are 800+ swarm peers, stuff is getting logged, I can access the test readme, etc. However, given some hashes that are (in theory) on another ipfs node on campus, attempts to ipfs get or ipfs object stat or do other things never produces a result: the ipfs command-line comman seems to hang indefinitely. My question is, how do I go about debugging why this is happening?

When I turn on ipfs logging at the debug level, start a tail+grep looking for a specific hash, and do ipfs get {hash}, I see things like the following in the log file,

16:01:07.335 DEBUG  cmds/http: incoming API request: /get?arg=QmeC1CGZ6yFGBiCutjEL3s438eciw8rMAYJ5FZHdFY8yfo&encoding=json&stream-channels=true handler.go:88
16:01:07.335 DEBUG blockservi: BlockService GetBlock: 'QmeC1CGZ6yFGBiCutjEL3s438eciw8rMAYJ5FZHdFY8yfo' blockservice.go:201
16:01:07.335  INFO    bitswap: want blocks: [QmeC1CGZ6yFGBiCutjEL3s438eciw8rMAYJ5FZHdFY8yfo] wantmanager.go:81

but that’s it; the command never returns after a long time (30+ minutes) even though the ipfs daemon is plainly running.

Suggestions for what to try next are welcome.

Maybe you could wait for a longer time, or change a hash of which resource address is achieved easily.

I let it run overnight. No change — the ipfs get command still hasn’t returned or printed anything.

You may want to look into profiles. Something like:

ipfs config profile apply local-discovery

This might work for you, depending on the network. Ideally the peers/nodes will discover themselves (meh), but more probably you want to connect them manually. If one of the nodes has a stable IP/address you can add them as bootstrap nodes too, so you are always sure that it will reconnect when you turn on the device again.

We just enabled this feature on Siderus Orion that allows people to copy-paste and share the multi address of their peers, so that they can connect directly when both the local discovery and the network fails to achieve that.

1 Like

Update on this: it turns out the other node on campus was offline. Now that it’s back, ipfs get works.