IPFS get ends with Error: context canceled

go-ipfs
#1

go-ipfs version: 0.4.19-83d3f76
Repo version: 7
System version: amd64/linux
Golang version: go1.11.5

ipfs get command on a large file fails with Error: context canceled

$ docker exec hostagent_ipfs ipfs get QmduhsUhdgDuTnwAkrGseLSUYdkP9gzoUzkv4gKNzChPUk -o /export/temp/test.ova
Saving file(s) to /export/temp/test.ova
2.32 GiB / 2.32 GiB 100.00% 7m5s4s22s
Error: context canceled
Error: context canceled

And the file is not downloaded completely

After running “ipfs repo gc” the file is downloaded successfully.
I’m not sure if this is a bug, or maybe just the error message should be improved.

What can be the connection between the garbage collector and this error?

Best regards,
Nina

1 Like
#2

Hello Nina, I pinged the core developers of Golang version of IPFS, and this looks like a bug with go-ipfs. I would wait for the 0.4.20 version of go-ipfs which should be released later on this week.

#3

Hi Nina,

Hannah from the go-ipfs team here. I don’t believe the GC & the success/failure are related – unless you’ve replicated that sequence multiple times. Error: context canceled just means something timed out while getting this large file. Occasionally, there have been bugs with peers exchanging lots of blocks – something which happens with when transferring a large file, particularly if only a couple peers have the file. My guess is that this is what happened and it was simply random that it cropped up the first time but worked the second time. We’ve attempted to fix these problems in the 0.4.20 release which should be out soon.

I tried to fetch your file on my local machine but couldn’t find any nodes providing that hash.

Good luck!

1 Like
#4

Could you check your docker logs for any errors?

#5

I add same crash problem adding big chunk of data.
Changing user maximum open files (default 1024) correct the problem

ulimit -n 8192

#6

Thank you all for the comments. The hash is not availabe to download as we are running ipfs in a private network. We have maximum 4 peers in the network, so definetly only a couple peers have the file. I will update to 04.20 and check if the issue is reproducible

#7

Due to this problem when I was trying to install itunes on windows 7 it was not installing at all and every time I tried to login error occurred and I was unable to use it.