I downloaded qBittorrent from Pamac and have been downloading some torrents. I have been getting this error with torrents that include several folders and several images inside the folders:
(Update: this also happens with Deluge)
An I/O error occurred for torrent ‘TORRENTNAME’.
Reason: TORRENTNAME file_open (/home/USER/Downloads/TORRENTNAME/FOLDER/IMAGE.jpg) error: No such file or directory
Each time with a random image in a random folder. Every other torrent that doesn’t match that description didn’t give this error. After the error I can let it resume and it will download and complete normally. This error does not happen 100% of the time, in rare instances it does complete from start to end without erroring, but I would say the chance of it erroring is 80-90%. I have already downloaded these same torrents before when I used Windows and it didn’t give that error then.
-I am using KDE Plasma.
-I have done tests on my disk using gsmartcontrol and there are no errors, it says health assessment is “PASSED”.
-I have done a full memory test using a bootable Memtest86 USB and it passed without errors
-I am using EXT4 on my Manjaro partition and downloading to the default downloads folder in the same partition
-I have tried downloading under a different user, to a different folder and to a different storage device entirely, it still errors
I’d be inclined to find a fast/small torrent, open the folder in advance, start the download, and watch…
Usually, qBittorrent downloads to one folder and moves the files after they’re completed - errors are usually caused by partitions/permissions or files being moved.
Preferences:
Check pre-allocation, and Relocation of torrents and try a 'TEST` category with sane defaults (i.e. download incomplete torrents to ~/Downloads/Torrents then MOVE completed download to ~/Downloads).
They are all in the Downloads directory, but they each have their own folder there.
I tried that with hidden files visible and it creates the folder and downloads its contents normally, and… no error this time. I forgot to mention, this has happened only about half the time with the torrents I described, sometimes it doesn’t happen.
I looked into the preallocation option and some sources say it zero-fills the preallocated space, or at least it did at some point, which sounds bad for my SSD?
No, it just says there’s a (1GB) file already on disk, then downloads pieces and writes them in.
The benefit is that - imagine you have 100GB free, you start a 60GB torrent, you know you can’t use more than 40GB and that won’t change as the download progresses. I was mostly wondering if it would make a difference - but otherwise if space isn’t going to be tight, I don’t think it’s better. I don’t use that on my HDD, and for bigger torrents I always set the initial download to a mounted temporary directory on the HDD that I’ll move the files to.
I tried enabling pre-allocation and downloading incomplete torrents to a subfolder in Downloads, and I tried downloading to a different folder in my home directory, but I am still getting this error. Ahh, what could it be?
I can’t get aria2 to download the torrent, it stays stuck on 0b/s. I immediately tested the torrent on qBittorrent and it started downloading, so it’s not dead. It’s a .torrent file.
I ran a full memory test using a bootable Memtest86 USB, it passed with no errors.
I can’t make much sense of the log file, it’s over 30k lines long and I just don’t know what I’m looking for. I searched for those words and all the lines that came up seemed unremarkable.
I searched for error, fail and abort and found a few lines that could mean something:
[SocketCore.cc:779] errorCode=1 Failed to send data, cause: Connection refused
[DEBUG] [EpollEventPoll.cc:259] Failed to delete socket event:Bad file descriptor
[INFO] [UDPTrackerClient.cc:508] Force fail infohash=HASH
I tried setting the download destination on qBittorrent to a separate SSD I use for storage and it produced the same error. I also tried creating a new user and downloading the same torrent with qBittorrent logged in as the new user, again the same error.
I am using a 4GB torrent that has many folders and images inside the folders, because it downloads pretty fast. The result is consistently the same: I start downloading, and when it reaches around 10 to 20% completion, it gives me that error. If I resume the torrent after the error, it can finish downloading normally. Sometimes (rarely) it downloads from start to end without erroring.
This is looking more and more like a particular issue of libtorrent-rasterbar
Using aria2c was a means to test out torrent downloads with a client that does not use libtorrent-rasterbar. But for some reason, when you use aria2c it doesn’t even start downloading?
Since aria2c didn’t even work at all, another alternative to rule out libtorrent-rasterbar is Transmission.
If it does not work with deluge or qBittorrent, but does work with Transmission, then at least it hints that there’s something about libtorrent-rasterbar that is at fault.
However, if it also causes issues with Transmission, then it could be a network configuration? (Or even kernel + filesystem combination?)
(You can uninstall Transmission afterwards. It’s mainly just to troubleshoot this problem.)
I downloaded several torrents using Transmission that are almost guaranteed to error with qBittorrent, and although they downloaded a lot slower because Transmission has slow peer discovery for some reason, they all completed without error. Looks like that dependency is the problem, thanks for helping me track it down. What do you recommend I do from here?
I wonder if libtorrent has been broken for half a year now, or this is a new issue.
Build libtorrent-rasterbar 1.2.15 and build qbittorrent (I’ve stayed on 4.3.9) against that.
You can grab Arch’s pkgbuilds for an easy starting point.