I ran this command:
ipfs ls --headers Qme2sLfe9ZMdiuWsEtajWMDzx6B7VbjzpSC2VWhtB6GoB1/wiki/
and it gave no output but also didn't terminate. I lost patience and killed it, but I'm wondering if I can find out what it was doing that was taking so long. Running it under strace
didn't make it any clearer.
Commands like ipfs ls
are going to the network to try and find data. If for some reason that data is not findable (e.g. nobody online has it, there is one node that has the data but it's behind a NAT, the node that has it has not yet advertised the data in a way that your node can find it, etc.) then go-ipfs will just keeping looking for who has the data.
You can take a look at what's going on with Bitswap (e.g. ipfs bitswap stat
) and that can help you determine if you're stuck looking for data (i.e. data in the wantlist).
Some functions also have flags like --stream
or --progress
that can help you see incremental updates. For logging behavior there is ipfs log
, where ipfs log level
can help you inspect subsystems further.
Note you can pass a timeout flag to basically all go-ipfs commands (see ipfs --help
for more info) if you're concerned about your CLI not responding quickly enough when the data just isn't available on the network.