Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't remove failed torznab downloads #869

Closed
garrettjones331 opened this issue Aug 29, 2021 · 7 comments
Closed

Can't remove failed torznab downloads #869

garrettjones331 opened this issue Aug 29, 2021 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@garrettjones331
Copy link

I was in the process of trying to debug why I wasn't able to get my deluge integration to work, and came across an issue in which I'm unable to clear failed torznab downloads.

2021-08-28 20:37:10 INFO [FAILED-DOWNLOAD] Successfully marked as Failed.
2021-08-28 20:37:10 INFO [FAILED-DOWNLOAD] Marking as a Failed Download.
2021-08-28 20:37:10 ERROR Unable to send torrent to client. Assuming incomplete link - sending to Failed Handler and continuing search.
2021-08-28 20:37:10 INFO Torrent not added yet, trying to add it now!
2021-08-28 20:37:10 INFO Checking if Torrent Exists!
2021-08-28 20:37:10 INFO filepath to torrent file set to : /config/cache/Sabans_Go_Go_Power_Rangers_1_2017.torrent
2021-08-28 20:37:10 INFO Connected to Deluge! Will try to add torrent now!
2021-08-28 20:37:10 INFO matched on Saban's Go Go Power Rangers

This portion of my log shows the torrent being marked as failed (Which I may open another topic for, since it's a different issue). But when I wanted to remove the failed download to debug a few things to see what was causing it to fail, it doesn't see the torrent anymore because it's marked as failed.

I attempted to go to the manage failed links page to remove the them so they wouldn't be ignored, however when I select them and choose "clear failed locks" from the dropdown, they just deselect and remain there. Originally when I did it there were some nzb files in there that were removed, so I know the selection button works.

Capture

CarePackage
carepackage.zip

Environment:

  • OS: Unraid 6.9.2
  • Branch / commit: v0.5.7
@evilhero
Copy link
Collaborator

PR(#870) will fix the problem with the failed downloads not being deleted. It looks like the reason why it wasn't able to delete them is because all of those items currently in your Failed list don't have a unique ID (they're all just ), which would mean that when they get flagged as being failed, they're not being written out correctly to the db.

All of your logs in your carepackage are in INFO level, but since you're primarly using torznab (and I don't) and if you're able and willing to of course - if you could change your logging to DEBUG level ( config.ini = logging_level = 2 ).
Then the next time you get a few items that go into a Failed status, passing the logs again would help me narrow down the blank ID problem - as the IDs are used throughout the program in various places, so you might get further errors related to the blank IDs if it goes unaddressed.

@garrettjones331
Copy link
Author

#870 fixed the issue. Here's the relevant section with updated DEBUG level logs

29-Aug-2021 09:26:48 - DEBUG :: mylar.searcher.4006 : SEARCH-QUEUE : Torrent Provider: torznab
29-Aug-2021 09:26:48 - INFO :: mylar.torsend2client.971 : SEARCH-QUEUE : matched on Saban's Go Go Power Rangers
29-Aug-2021 09:26:48 - DEBUG :: mylar.torsend2client.980 : SEARCH-QUEUE : filename for torrent set to : /config/cache/Sabans_Go_Go_Power_Rangers_1_2017.torrent
29-Aug-2021 09:26:48 - DEBUG :: mylar.torsend2client.1202 : SEARCH-QUEUE : [torznab] Saved torrent file to : /config/cache/Sabans_Go_Go_Power_Rangers_1_2017.torrent
29-Aug-2021 09:26:48 - INFO :: mylar.torsend2client.1259 : SEARCH-QUEUE : Connected to Deluge! Will try to add torrent now!
29-Aug-2021 09:26:48 - INFO :: mylar.load_torrent.114 : SEARCH-QUEUE : filepath to torrent file set to : /config/cache/Sabans_Go_Go_Power_Rangers_1_2017.torrent
29-Aug-2021 09:26:48 - INFO :: mylar.load_torrent.118 : SEARCH-QUEUE : Checking if Torrent Exists!
29-Aug-2021 09:26:48 - DEBUG :: mylar.get_the_hash.208 : SEARCH-QUEUE : Hash: 0609AC1CE72199A958948F2A54FB045C2610CE45
29-Aug-2021 09:26:48 - DEBUG :: mylar.load_torrent.124 : SEARCH-QUEUE : Torrent Hash (load_torrent): "0609ac1ce72199a958948f2a54fb045c2610ce45"
29-Aug-2021 09:26:48 - DEBUG :: mylar.load_torrent.125 : SEARCH-QUEUE : FileName (load_torrent): Sabans_Go_Go_Power_Rangers_1_2017.torrent
29-Aug-2021 09:26:48 - DEBUG :: mylar.find_torrent.49 : SEARCH-QUEUE : Finding Torrent hash: 0609ac1ce72199a958948f2a54fb045c2610ce45
29-Aug-2021 09:26:48 - DEBUG :: mylar.get_torrent.57 : SEARCH-QUEUE : Getting Torrent info from hash: 0609ac1ce72199a958948f2a54fb045c2610ce45
29-Aug-2021 09:26:48 - INFO :: mylar.load_torrent.134 : SEARCH-QUEUE : Torrent not added yet, trying to add it now!
29-Aug-2021 09:26:48 - DEBUG :: mylar.load_torrent.138 : SEARCH-QUEUE : Torrent not added
29-Aug-2021 09:26:48 - ERROR :: mylar.searcher.4014 : SEARCH-QUEUE : Unable to send torrent to client. Assuming incomplete link - sending to Failed Handler and continuing search.
29-Aug-2021 09:26:48 - INFO :: mylar.markFailed.294 : SEARCH-QUEUE : [FAILED-DOWNLOAD] Marking as a Failed Download.
29-Aug-2021 09:26:48 - DEBUG :: mylar.markFailed.296 : SEARCH-QUEUE : [FAILED-DOWNLOAD]nzb_name: Sabans.Go.Go.Power.Rangers.1.by.Ryan.Parrott.[ENG./]
29-Aug-2021 09:26:48 - DEBUG :: mylar.markFailed.297 : SEARCH-QUEUE : [FAILED-DOWNLOAD]issueid: 609378
29-Aug-2021 09:26:48 - DEBUG :: mylar.markFailed.298 : SEARCH-QUEUE : [FAILED-DOWNLOAD]nzb_id:
29-Aug-2021 09:26:48 - DEBUG :: mylar.markFailed.299 : SEARCH-QUEUE : [FAILED-DOWNLOAD]prov: torznab
29-Aug-2021 09:26:48 - DEBUG :: mylar.markFailed.301 : SEARCH-QUEUE : oneoffinfo: {'ComicName': "Saban's Go Go Power Rangers", 'modcomicname': "Saban's Go Go Power Rangers", 'IssueNumber': '1', 'comyear': '2017'}
29-Aug-2021 09:26:48 - INFO :: mylar.markFailed.331 : SEARCH-QUEUE : [FAILED-DOWNLOAD] Successfully marked as Failed.

This also gives me a little more indication where the breakdown is occurring trying to add the .torrent file to deluge. The connection passes the test built into the downloader page (which I'm assuming is verified by the "connected to deluge" line), but for some reason is unable to add the torrent. Any ideas?

carepackage(1).zip

@evilhero
Copy link
Collaborator

Did you enter in the deluge daemon port into mylar as opposed to the web ui port ?

(note this was taken verbatim from a forum post I did - but it should still apply)
The Deluge daemon uses an auth file located in the user's .config directory normally (ie. /home/user/.config/deluge/auth), and it parses this for authentication. But in order to parse the file, you need to ensure the deluge daemon is enabled and running - Mylar connects via the daemon, not via the web UI.

Go into Preferences / Daemon. Then enable the Daemon port and chose an appropriate port number and ensure that 'Allow Remote Connections' is enabled as well. Then Apply the settings. In Mylar, you enter in the url:port as the host entry (ie. thisis.deluge.com:22181 - don't precede it with a protocol either).

Once you run the daemon once, the auth file is generated and from there you can edit the file manually and change passwords, or view what the username/passwords are - I believe it defaults to the username/password of whoever is running the Deluge daemon. So then just plunk in the username/password into Mylar, and save the config.

@garrettjones331
Copy link
Author

I believe I have all of those things already set up and configured correctly. Here's some images just to verify.

Torrent client config in Mylar & successful connection message
image

Daemon config in deluge
image

Contents of my Auth file
image

I noticed that I had set up the mylar account as a regular user (5). I tried changing it to admin level (10) just to see if that fixed anything, but it didn't.

@garrettjones331
Copy link
Author

garrettjones331 commented Aug 30, 2021

For further testing, I also tried remote connecting from another instance of deluge to my main instance through the daemon port and adding a .torrent using the account in the auth file, and everything seems to be working as expected that way. For some reason there's some issue with the way mylar is attempting to add the .torrent

@evilhero
Copy link
Collaborator

Yeah I'd leave the user level at (5) - no point giving it admin access unless it's required (which it's not for this).

The only other thing I can think of is if you have created a label mylar in Deluge for mylar usage. I can't remember if Deluge was the one that wouldn't work unless the label was created manually beforehand or not.

@garrettjones331
Copy link
Author

garrettjones331 commented Aug 30, 2021

The label was already set up so I could define a specific download directory within deluge. Could having it defined in deluge any Mylar cause any conflicts?

evilhero added a commit that referenced this issue Sep 5, 2021
IMP: changed Toggle Verbose button to (Enable / Disable) Debug Logging depending on logging level enabled
IMP: added Clear All Specific Logs to Exceptions/Tracebacks option
IMP: search-4-missing option added to series detail
IMP: +mark option added for watchlisted series that have issues in a Skipped status on weeklypull
IMP: series issues in Skipped status on the weeklypull colour-graded now
IMP: allow metatagging to write out reading order sequence when dealing with multiple arcs
IMP: option to toggle cherrypy logging via the config.ini (cherrypy_logging)
FIX: CDATA element being returned by CV for Issue_Number results in error
FIX: remove Add All to ReadingList option from series detail page (due to space)
FIX: series issues in Skipped status on the weeklypull color graded now
FIX: catch invalid name when deleting series via Delete Series
FIX: correct some invalid css
FIX: adjust column layouts for better fit on index page
FIX: (#869) Unable to clear Failed downloads that have no ID value present
FIX: RSS scheduled job was always in a running status, even if it was not
FIX: corrected user-agent url
FIX: downloading non-watchlisted arc issues would fail to be detected if items were not within a folder (ie. just a file)
FIX: remove defunt deferrer usage and replace with inline
FIX: unbalanced paranthesis error when using DDL and results include a pack
FIX: DDL not being able to properly reference link
FIX: newznab test option would incorrectly append api endpoint in some situations
FIX: reworked newznab api url in search to better detect url's with api endpoint already included
FIX: allow for enclosures URL as opposed to just using link field in provider response
FIX: DBUpdater would not run every backfill_timespan interval (default 10 minutes) when updating large backlog queue
FIX: Status' not indicated as Running in Activity/Jobs tab
FIX: if the db updater was trying to backfill dates that fell within the problem dates array, would fail to compare and not update anything
@barbequesauce barbequesauce added the bug Something isn't working label Mar 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants