qbittorrent / qBittorrent

qBittorrent BitTorrent client
https://www.qbittorrent.org
Other
27.62k stars 3.91k forks source link

Torrents disappear when I close qBittorrent #2691

Closed markdcinci513 closed 7 years ago

markdcinci513 commented 9 years ago

Whenever I need to close qBittorrent v3.1.12, all of the torrents that I have in there downloading disappear. This just started happening yesterday, and I've never had this problem before. Do I have something wrong in the settings, or is this just a current bug?

chrishirst commented 9 years ago

define "disappear" and what filters do you have selected in the sidebar?

Do these "downloading" jobs have metadata loaded?

markdcinci513 commented 9 years ago

Yes, they do. The metadada loads, then I add the torrent to qBittorrent. However, if I have to shut down my computer for some reason, or need to stop qBittorrent, when I open it back up, the downloading torrents have completely disappeared. Not sure what you mean by filters selected in the sidebar. I've always just installed qBittorrent, and I've never had this problem. Could the resume file be corrupted? I've thougth about completely purging qBittorrent and trying to reinstall it and see what happens.

markdcinci513 commented 9 years ago

I decided to completely purge qBittorrent from my Ubuntu 10.04 LTS Trusty Tahr, and reinstall t through terminal instead of Software Center. Either Software Center was missing something when installing, or there was a corrupt file. Everything is working absolutely excellent again, as it always has. I can now close my qBittorrent, and when I restart it, the torrents are still lsted. WOO HOO!!!

sledgehammer999 commented 9 years ago

Thanks for reporting back so I can close this.

markdcinci513 commented 9 years ago

OK, another problem. The torrents staying in the list is working, but now when a torrent has completed downloading, instead of seeding, it starts downloading again. Do I have something wrong checked somewhere in the settings?

sledgehammer999 commented 9 years ago

Does it start re-downloading after you restart qbt or while qbt is still running? If it is the first: Copy the log here after you restart qbt (view->execution log)

markdcinci513 commented 9 years ago

Well, now I'm back to square 1. My torrents are once again disappearing if I shut down qBittorrent. They're completely gone. I've tried purging, replacing the archive file with a freshly downloaded one, using 2 different PPA's, I can't thnk of anything else to possibly do.

sledgehammer999 commented 9 years ago

How about your log?

markdcinci513 commented 9 years ago

09/03/2015 20:17:17 - qBittorrent is successfully listening on interface 0.0.0.0 port: TCP/4433 09/03/2015 20:17:18 - External IP: 66.233.240.182 09/03/2015 20:17:18 - UPnP/NAT-PMP: Port mapping successful, message: successfully mapped port using UPnP. external port: 8080 09/03/2015 20:17:18 - UPnP/NAT-PMP: Port mapping successful, message: successfully mapped port using UPnP. external port: 6881 09/03/2015 20:17:18 - UPnP/NAT-PMP: Port mapping successful, message: successfully mapped port using UPnP. external port: 4433 09/03/2015 20:17:18 - UPnP/NAT-PMP: Port mapping successful, message: successfully mapped port using UPnP. external port: 6881 09/03/2015 20:17:17 - qBittorrent is successfully listening on interface :: port: TCP/6881 09/03/2015 20:17:17 - qBittorrent is successfully listening on interface 0.0.0.0 port: TCP/6881 09/03/2015 20:17:17 - qBittorrent is successfully listening on interface :: port: TCP/4434 09/03/2015 20:17:17 - qBittorrent is successfully listening on interface :: port: TCP/4434 09/03/2015 20:17:17 - qBittorrent is successfully listening on interface 0.0.0.0 port: TCP/4433 09/03/2015 20:17:17 - qBittorrent is successfully listening on interface 0.0.0.0 port: TCP/6881 09/03/2015 20:17:16 - The Web UI is listening on port 8080 09/03/2015 20:17:16 - Options were saved successfully. 09/03/2015 20:17:16 - Embedded Tracker [ON] 09/03/2015 20:17:16 - Encryption support [ON] 09/03/2015 20:17:16 - Local Peer Discovery support [ON] 09/03/2015 20:17:16 - PeX support [ON] 09/03/2015 20:17:16 - DHT support [ON], port: UDP/6881 09/03/2015 20:17:16 - Anonymous mode [OFF] 09/03/2015 20:17:16 - HTTP user agent is qBittorrent v3.1.12 09/03/2015 20:17:16 - UPnP / NAT-PMP support [ON] 09/03/2015 20:17:16 - qBittorrent is trying to listen on any interface port: TCP/6881 09/03/2015 20:17:16 - Peer ID: -qB31C0-

sledgehammer999 commented 9 years ago

Btw, did you mean 14.04 ubuntu? Locate your /home/<username>/.local/share/qBittorrent/BT_backup folder. Is it writable? When you add a .torrent in qbt (not a magnet link), a copy of that torrent should appear in BT_backup. Does it appear? If it does, does it dissapear after you close qbt?

Btw, I don't suppose the torrents you are testing with are seeds and you have enabled options->bittorrent->share ratio limiting->remove them ?

markdcinci513 commented 9 years ago

Linux Ubuntu 14.04 LTS is my operating system. I'm not seeing a BT_backup file in my home/username/.local/share in my home folder. And I'm not sure whether I even have an option for bittorrent>share ratio limiting>remove them.

sledgehammer999 commented 9 years ago

I'm not seeing a BT_backup file in my home/username/.local/share in my home folder

You forgot "qBittorrent" in that path.

And I'm not sure whether I even have an option for bittorrent>share ratio limiting>remove them.

And why don't you look at the options?

markdcinci513 commented 9 years ago

Well, I did a fresh install of Linux Ubuntu 14.04 LTS Trusty Tahr, reinstalled qBittorrent, and the same thing is still happenning. I will add torrents, the metadata is loaded, and the torrent is listed and begins to download. Then, if for any reason, I have to close qBittorrent, when I reopen it, all downloading torrents are completely gone. And I'm not findin/.local/share/qBittorrent/BT_backup file anywhere.

sledgehammer999 commented 9 years ago

Sorry I made a mistake. I checked it now. The correct path is /home<username>/.local/share/data/qBittorrent/BT_backup. Can you tell me if .torrent files appear in there while you operate qbt and what happens after you exit it?

markdcinci513 commented 9 years ago

Unfortunately, and very, very sadly, I've been forced to switch to Deluge. I just can't seem to get qBittorrent to work properly anymore. I might reinstall qBittorrent tomorrow, try it, and get back to you on trying to find that file. But I can tell you that what was happening is that if I had to close qBittorrent for ANY reason at all, when I would reopen qBittorrent, all loaded torrents had disappeared from the list, none at all were in the Downloading or Active list, and the only thing that I could find would be the partially downloaded video files in my "Videos" folder. But they would not be listed and resume downloading in qBittorrent.

sledgehammer999 commented 9 years ago

Why did you close this and opened a new one?!?!? (PS: I am going to install 14.04 in a VM today and see if I can reproduce the problem).

sledgehammer999 commented 9 years ago

Oh terribly sorry. I was the one that I closed it.

sledgehammer999 commented 9 years ago

I just did a clean install of Ubuntu 14.04 in a VM and fully updated it. Then I installed qbittorrent through our PPA. (you're using our PPA, right?). I opened it and loaded a magnet link. It started downloading. After a few MBs were written in the disk, I explicitly exited the app. When I re-launched it the torrent was still there. In short I cannot reproduce your problem. From the path /home/<username>/.local/share/data/qBittorrent/BT_backup where do you stop? At /home/<username>/.local/share/data? If yes, can you tell me the output of this command: ls -ld $HOME/.local/share/data ?

teotikalki commented 8 years ago

Ok, I have experienced this (or something like it) multiple times over the years and it has driven me away from qB before (the integrated search engine brought me back as it really suits my work style, but with btdigg gone it produces next to no results now). Anyways...

I am here now because most recently I told my computer (Debian Jessie, Gnome) to reboot and had a queue of ~2170 items, mostly added via magnets (including over 1k torrents from ONE long research dig on ONE topic). When qB was opened post reboot I had a queue of ~560 items and everything was in a different order (very important when you queue multiple torrents to get the same file as you can't be sure which will actually have a seed and come in). Items that had been in the queue since December 2015 are missing!

When I switched before I went to Deluge and found that it is more stable yet qB pulls in faster. When I started using qB again I told myself that it was unstable, prone to screwing me as a user, and that when it did I would have only myself to blame... It did it after I upped my queue to 2k files. The worst part is that I considered the several days of digging that produced that queue to be work and now I have to do even more work to redo it because I have to manually compare everything to the files that have already been archived (I already manually check each torrent that completes against the rest of the queue to remove the other 'same files').

Sledgehammer999, I have always been grateful to you for the work you have done/do, but this software has serious flaws and has for all of the most of a decade that I've been using it.

I am currently trying to figure out why my .local/share/data/qBittorrent directory has a BT_backup with 1312 items and my 'torrents' directory has about 1200 more files than my 'torrents-completed' directory yet qB is screwed. I have just left it on for a day and a half since I booted into the ~560 queue (work) and am only now trying recovery.

Just for reference, the last time this happened to me was only a few months ago (March or April). At that time I was able to recover because I had backed up the BT_backup (your software is BAD at fastresuming). At that time I ended up getting my queue back and just had to remove several dozen items that I knew had finished (plus found several more over the course of the year that have been duplicates). This time I hadn't done such a backup since I did my last big dig and I almost feel like I'm being punished for having any faith at all that qB would be stable for more than a few days.

Just another comment, off topic: I have an i7 hexcore and 24 gigs of ram and when there are a lot of files in the queue qB CRAWLS. The interface is extremely sluggish, it slows the rest of the computer down, and it needs to be rebooted every few days because it will gradually trickle down to just pulling in a few k each from a few torrents without starting anything new (right after restarting it immediately jumps up to pulling in its bandwidth limit).

SaveMeJebus commented 7 years ago

I got this similar problem after I upgraded Debian stable to testing, which updated qBittorrent to v3.3.6 with no problems, but now it updated to v3.3.7 and torrents are disappearing for me. Everything downloads fine, but after a system restart everything I downloaded since the update to v3.3.7 is gone. The files which were downloaded with the torrents are still on my HDD though.

I would like to have some help into identifying the problem because changing a torrent client when you have over 1000+ torrents seeding is a huge pain in the a$s. And generally I am quite satisfied with qBittorent, as I changed from Deluge to qBittorent after Deluge started to have problems dealing with more than 100 torrents on my system.

The ls -ld $HOME/.local/share/data command said that my account has read/write access, while "group" and "other" only have read access. Could this be the problem?

Thanks in advance.

ygmarchi commented 7 years ago

Same problem here, but not with all torrents, only some.

Xananax commented 7 years ago

Same problem here, on Arch Linux. QBT is empty when I open it. Everything works as normal as long as it's running. As soon as it is closed, all torrents, downloading, seeding, or paused, just disappear. Behavior is not consistent either. Sometimes, it will work fine. It can work fine for days, then downloads will just vanish. Once they've vanished once, they will tend to vanish again consistently, every time I close QBT, for a while. Then things will work again as expected.

I can't retrace any step other than opening QBT, adding a torrent, closing it. It doesn't seem to be related to the type of link (.torrent or magnet), nor the torrent status, nor activity, nor anything else I can think of.

Scouring the internets yielded no answer and no workaround. The log file shows nothing of interest. No file seems corrupt. I'd like to continue using QbitTorrent, but if I don't have even a way to diagnose what's going on in the hopes of finding a workaround, I'm gonna have to unfortunately switch.

PS: I realize this is free and I am thankful for the work done; QBT is my favorite client, but you have to provide people with at least a way to help you find bugs. Tell us what to look for, provide an option for a verbose log, etc.

vtmargaryan commented 7 years ago

I have the same problem. I found that torrent files in ~/.local/share/data/qbittorrent/BT_backup have much less size than original files. I checked an option to copy .torrent files and found out that the copies also have less size than originals. So i thing the problem lies in copying files by qBittorrent.

vtmargaryan commented 7 years ago

If i link against libtorrent-rasterbar9 version 1.1.0 everything works just fine. I looked into sources of qBittorrent and found out that it doesn't directly copy torrent files, but first create them using libtorrent. So it seems that the problem is either in libtorrent-rasterbar9 version 1.1.1 or in qbittorent not properly using version 1.1.1

dzarda commented 7 years ago

Confirmed 3.3.7-2 on Debian

Miro99s commented 7 years ago

Since today I have the same problem on Ubuntu 16.10, qBittorrent v3.3.7. Few days ago everything worked fine, today I can see in the log more messages like: 22.12.16 15:42 - Unable to resume torrent '7aa034f94cb624899543c8d14d691f9f7a97843e' and some torrents are missing in the list. I can add a new torrent, it is downloaded, it is shared,everything works fine until I close the qBitttorrent. When I open it again I see the list of torrents, but all new added torrents are missing there. How to solve the problem with not resumed torrents?

okeatime commented 7 years ago

@Miro99s How about updating to v3.3.10?

Miro99s commented 7 years ago

Hi okeatime, I checked the latest version of the qBittorrent as the first step I did. Here is what I get:

sudo apt-get install qbittorrent Reading package lists... Done Building dependency tree
Reading state information... Done qbittorrent is already the newest version (3.3.7-0ppa1~yakkety). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

okeatime commented 7 years ago

Probably you forget to do:

sudo add-apt-repository ppa:qbittorrent-team/qbittorrent-stable
sudo apt-get update
Miro99s commented 7 years ago

Yes, I did. I executed all these commands:

sudo add-apt-repository ppa:qbittorrent-team/qbittorrent-stable sudo apt-get update sudo apt-get install qbittorrent

And the result was: "qbittorrent is already the newest version (3.3.7-0ppa1~yakkety)."

I tried even the unstable version, but the result was the same.

gyermolenko commented 7 years ago

And the result was: "qbittorrent is already the newest version (3.3.7-0ppa1~yakkety)." same result here (Ubuntu Mate 16.10)

ghost commented 7 years ago

I also have the same issue with 3.3.7. I tried to revert 3.3.6, and the problem disappeared. (but 3.3.6 crashes every few minutes on my system)

Upgrading to 3.3.10 does not work at this time. I have made a separate issue for that here

Stuggy commented 7 years ago

I have the same issue on Ubuntu 16.10 using 3.3.7

If I exit the app when I restart it all of my active torrents have disappeared.

I also don't get the update to 3.3.10 when I try the above procedures.

comrade-meowski commented 7 years ago

Had to make an account just for this... Diagnosis/fix follows:

Also ran into this problem (Ubuntu 14.04 LTS) a number of days ago - would have noticed it earlier if I wasn't on some private trackers that only whitelist newer clients rather conservatively so I had an apt mark hold on qbittorrent 3.3.6-0ppa1~trusty1. I reboot this machine very rarely and it tends to run 24/7 for weeks between kernel upgrades so I only started to notice "issues" on my ~300 seeds a while after upgrading to 3.3.7 when it was cleared on the tracker. Just like others I had some missing torrents, multiple failures to resume in the logs, etc. A couple of QB restarts showed obvious major issues: being a sysadmin I decided to dig in.

Full credit to user "vtmargaryan" above, he's correct - the problem isn't qbittorrent per se, it's libtorrent-rasterbar, or at least the way QB interfaces with it. I tested installing QB 3.3.7 through 3.3.10 to alpha 3.4 with similar failure modes across all (if you do this by the way back up everything as QB changes it's save schemes in a non-backward compatible way twice). Eventual success and normal operations were only resumed by downgrading and apt mark holding the following two packages:

meowski@failbot:~/.config$ apt-cache policy qbittorrent | grep Installed Installed: 3.3.7-0ppa1~trusty1 meowski@failbot:~/.config$ apt-cache policy libtorrent-rasterbar8 | grep Installed Installed: 1.0.7-1ppa1~trusty3

You can still download the relevant packages from the PPA if you don't still have them in /var/cache/apt - grab them from:

https://launchpad.net/~qbittorrent-team/+archive/ubuntu/qbittorrent-stable/+build/10738627 https://launchpad.net/~qbittorrent-team/+archive/ubuntu/qbittorrent-stable/+build/8401167

Whilst mucking about with this my settings and transfer lists were well and truly trashed unfortunately, although I was due for a torrent clear up anyway so it didn't really bother me - if I was one of the other people here with several thousand loaded torrents I would not have been best pleased however. On Ubuntu backup both $HOME/.config/qBittorrent and $HOME/.local/share/data/qBittorrent directories BEFORE you start experimenting as they will get clobbered - I automatically version my $HOME so was able to rollback at will, you may not have that luxury. So for now, qbittorrent + libtorrent-rasterbar are working just as they always have for me with all torrents surviving client restarts, RSS feeds operational and with all my old settings and 90% of my old seeds restored.

As a sysadmin I don't care about subtleties, I just fix things with a hammer so I'm not sure I can offer the devs much more help but I think the problem with the newer qbittorrent + libtorrent-rasterbar is only triggered the moment you start changing any downloads from the default save path, which is why sledgehammer999's brief test on an Ubuntu VM didn't show any issues. As soon as you move a download location via the QB interface or change file locations while QB is off, restart the client and then manually change missing torrent locations and force recheck/resume then things start falling apart immediately. Primary suspicion would be libtorrent not writing out the checksums correctly for the resume list but, hey, that's above my pay grade, the devs will have to get to the bottom of this.

Have not seen the same issue on Windows or Mac systems running the latest QB 3.3.10.

Hope that helps.

Also thanks guys for the software - been an avid user for many years. A project this complex is always going to bug out every now and then but qbittorrent is a keeper. Keep up the excellent work...

Stuggy commented 7 years ago

Thanks for the fix. Hopefully the team can work it out so it is more of a permanent solution for others.

Fritigern commented 7 years ago

A little note on 3.3.10 for yakkety being unavailable, https://launchpad.net/~qbittorrent-team/+archive/ubuntu/qbittorrent-stable/+packages shows that building the yakkety package has failed. For the time being, I will be downgrading to 3.3.6. I'm on a private tracker and the inability to maintain my share ratio negatively affects my ability to download, as well as my status.

mirh commented 7 years ago

Just wanted to report I have the same problem in Windows with latest 3.3.10.. Indeed I'm using a custom download folder. Only mention in log is "Unable to resume torrent: \"

Besides, for some reason, when I add again the same file to download, if I use magnet link it restarts from scratch. With torrent, checksum is verified and I can resume from wherever I was before the previous closure of the program.

When it finishes, it finally stops to disappear.

sledgehammer999 commented 7 years ago

And that's why I decided to clearly say in the last few releases that libtorrent 1.1.x series isn't officially supported. And that's why I keep releasing windows/macOs binaries built against the 1.0.x series. And the same goes for the PPA. Yakkety ppa builds fail because I try to use 1.0.10 but the newer package available in yakkety repos overrides it.

I am not saying that libtorrent 1.1.x series are bad, I am just saying that I haven't actively tested with them. And even though they have made 2 official releases they aren't as stable as the 1.0.x series. For god sakes, after 1.1.1 there are a ton of fixes(and maybe serious ones) but there isn't a 1.1.2 release yet.

PS: I am really sorry that qbt craps out on you and destroys your progress. The dev team is spread thin. And unless someone from the dev team starts consistently getting the same behavior, a fix isn't imminent. Unless someone else pinpoints exactly why it happens in the meantime.

PS2: Moving files outside qbt and then opening qbt and telling it to look elsewhere is a recipe for disaster. Libtorrent doesn't give us fine-grained control over this, so any such move may result in data overwrite due to race(?) conditions. And any libtorrent major version may change its behavior on this.

comrade-meowski commented 7 years ago

Time permitting, I'll try and dig into this a little bit more - I've been experimenting with building qbt on Yakkety myself and have initially run into the same issues as you.

Regarding your second postscript, I had never actually thought about it that way. You're right of course but believe it or not for years I'd routinely "manage" torrents sometimes by deleting or moving the actual downloaded files around (in the file manager or terminal) and then after an eventual reboot and qbt restart I'd just see which entries showed up as "files missing" and then either delete or update the torrent as appropriate. Worked perfectly until recently, perhaps more by accident than design it seems...

Thanks for your work on qbt.

abymanyu1960 commented 7 years ago

hello, all. i am new to this community - just joined! - and thanks for letting me in. I am a zero in programming, though not to computers - i've been a DOS / windows user for a quarter century ... :-) Searching for a solution to this problem is how i reached you. On windows 10 now, and QB 3.3.10. Whenever I need to close qBittorrent v3.1.12, all of the torrents that I have in there downloading are gone when i start it next time! Have been using QB the last 6 months or so - but this issue started just a couple of days back ... :-( If i "GET THIS TORRENT" again, select the same files, and the same folder, it checks the files downloaded so far and resumes - that is a small blessing... but a pain nonetheless. Can someone help please, thanks!

sledgehammer999 commented 7 years ago

On windows 10 now, and QB 3.3.10. Whenever I need to close qBittorrent v3.1.12, all of the torrents that I have in there downloading are gone when i start it next time! Have been using QB the last 6 months or so - but this issue started just a couple of days back ... :-(

You mention 2 qbt versions? Which one do you actually use? What happens if you do File->Exit ? Do you get the same problem?

abymanyu1960 commented 7 years ago

I am sorry - that is an omission after a "Crtl C, CtrlV" of that long sentence from this page somewhere - "Whenever I need to close qBittorrent v3.1.12, all of the torrents that I have in there downloading are gone when i start it next time!" Forgot to take away the Version mentioned there. I use 3.3.10. My bad. File-> Exit also used to be the same bad news. There is an update. Yesterday (after reading almost ALL of this thread, I uninstalled QB. Including Settings, Everything. - (checked (Remove Configuration Files). Then downloaded & installed QB 3.3.10 again. Till now, that problem has not appeared! Thanks again; and for your concern and query, sledgehammer. Will update if there's any news.

davep85 commented 7 years ago

I've been experiencing this issue as well, currently on 3.3.10 on Windows 10.

I'm currently downloading about 396 things and my list is only at 263. If I restart the number changes, can increase or decrease.

I can tell how many things I'm downloading by what's in my temp folder btw.

mathiasleroy commented 7 years ago

+1 Same issue. V3.3.7 on Deepin 15.3

mirh commented 7 years ago

Something must have happened between 3.3.10 and 3.3.12, because after I updated not only torrents finally stopped to disappear, but also the previous "lost" ones re popped up.

zeule commented 7 years ago

6113 was duplicate of this one, but since that one is closed by a PR, closing this as duplicate of #6113.

DwayneHawkins commented 7 years ago

This issue is still alive in qBittorrent v3.3.12 (win) Happened 3 times now in the past months.

ghost commented 6 years ago

Got same problem today on Arch with qBittorrent 4.0.3-2. I was seeding my 1474 torrents and tried adding one more using magnet link and torrent crashed. It would open for few seconds and crash instantly. Tried opening via terminal and got GLib-ERROR **: Creating pipes for GWakeup: Too many open files error message. Google for few minutes, but did nothing and qBittorrent opened by 274 torrents were missing (1200 were left). So I added my new torrent and it's downloading. Checked BT_backup folder and there are 2951 files (.torrent and .fastresume).

gky99 commented 4 years ago

Have the same problem in 4.2.5. Even some of the unfinished but paused torrents are gone. However, when I move most of my torrents out and the number of tasks drops from 150 to 25, that problem never happens again yet.