qBittorrent: I/O error: no such file or directory

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

What could be causing this?

Would you happen to have multiple torrents putting files at the same place?

What do you see if you open ~/Downloads ?

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.

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).

No idea why that would work…

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?

You may want to seek qBittorrent’s support.

Have you tried to test this with a different torrent client, or even just plain old aria2c?

While in the Downloads folder:

aria2c "https://website.com/torrentname.torrent"

It also works with magnet links and local .torrent files.

If it happens with clients other than qBittorrent, it could be a drive issue or filesystem issue.


I just tried it with Deluge with the same torrent and it gave me the same error. Now I’m worried.

This hints that it’s not a qBittorrent issue.

Either it’s the underlying drive, the filesystem, or the RAM.

I would run a short SMART selftest, and if it finds no errors, run a long SMART selftest on the drive.

EDIT: Wait. Try with a torrent client that does not use libtorrent-rasterbar.

Such as, aria2c

We need to rule something out…

1 Like

I ran an extended self-test on my SSD using GSmartControl and it completed without error. I don’t know how to check my file system.
Will try aria2.

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.

What if you invoke a log file for aria2c?

aria2c -l log.txt /path/to/file.torrent

The log file is going to be very long! But you can inspect it later.

Yes, it is enormous. What should I be looking for inside?

Anything related to I/O or “disk” or “write” or “directory” etc.

It’s possibly some kind of ownership/permissions - but I never saw this message anywhere in /home.

Now I’d stop trusting my /home directory, I’d create User>TEST then log in to a fresh new account and see if it happens there.

Again, small torrent - first try in Transmission, and next do it in qBittorrent.

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

[DEBUG] [PeerAbstractCommand.cc:109] CUID#23 - Download aborted.

Which are all printed a few times near the end.

Should I try to sudo aria2c?

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.