1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-11-21 10:12:35 +01:00
32 Downloads and Importing
Opt6 edited this page 2021-05-03 10:29:00 -07:00

Note: this is the Legacy v2 Wiki. The new V3 Wiki can be found at the Servarr Wiki.

Troubleshooting Downloads and Importing

Downloading and importing is where most people experience issues. From a high level perspective, Sonarr needs to be able to communicate with your download client and have access to the files it downloads. There is a large variety of supported download clients and an even bigger variety of setups. This means that while there are some common setups, there isn't one right setup and everyone's setup can be a little different.

Start by using the Logging and Log Files article to turn logging up to trace, it is likely you're going to need to look at them to figure out what is wrong. And if you can't, anyone you ask for help will need to see them for sure. Remember to get them from the actual log file, put them in a pastebin and show us context around what we need to see. Nobody wants to dig through the whole trace log (it is huge!), but just a line or two is unlikely to help.

When you reach out for help, be sure to read Asking for Help so that you can provide us with the details we'll need.

Testing the Download Client

Start by testing the download client, if it doesn't work you'll be able to see details in the trace level logs. You should find a URL you can put into your browser and see if it works. It could be a connection problem, which could indicate a wrong ip, hostname, port or even a firewall blocking access. It might be obvious, like an authentication problem where you've gotten the username, password or apikey wrong.

Testing a Download

Now we'll try a download, pick a show and do a manual episode search. Pick one of those episodes and attempt to download it. Does it get sent to the download client? Does it end up with the correct category? Does it show up in Activity? Does it end up in the trace level logs during the Check For Finished Download task which runs roughly every minute? Does it get correctly parsed during that task? Does the queued up download have a reasonable name? Since Sonarr searches by tvdbid, season and episode on most indexers/trackers, it can queue one up with a name that it can't recognize.

Testing an Import

Import issues should almost always manifest as an item in Activity with an orange icon you can hover to see the error. If they're not showing up in Activity, this is the issue you need to focus on first so go back and figure that out. Most import errors are permissions issues, remember that Sonarr needs to be able to read and write in the download folder. Sometimes, permissions in the library folder can be at fault too, so be sure to check both.

Incorrect path issues are possible too, though less common in normal setups. The key to understanding path issues is knowing that Sonarr gets the path to the download from the download client, via its API. This becomes a problem in more unique use cases, like the download client running on a different system (maybe even OS!). It can also occur in a Docker setup, when volumes are not done well. A remote path map is a good solution where you don't have control, like a seedbox setup. On a Docker setup, fixing the paths is a better option.

Common Problems

Can't see share on Windows

The default user for a Windows service is SYSTEM which typically doesn't have access to your shares. Edit the service and set it up to run as your own user, see the FAQ entry why can't Sonarr see my files on a remote server for details.

Mapped network drives are not reliable

While mapped network drives like X:\ are convenient, they aren't as reliable as UNC paths like \\server\share and they're also not available before login. Setup Sonarr and your download client(s) so that they use UNC paths as needed. If your library is on a share, you'd make sure your root folders are using UNC paths. If your download client sends to a share, that is where you'll need to configure UNC paths since Sonarr gets the download path from the download client. It is fine to keep your mapped network drives to use yourself, just don't use them for automation.

Docker and user, group, ownership, permissions and paths

Docker adds another layer of complexity that is easy to get wrong, but still end up with a setup that functions, but has various problems. Instead of going over them here, read this wiki article for these automation software and Docker which is all about user, group, ownership, permissions and paths. It isn't specific to any Docker system, instead it goes over things at a high level so that you can implement them in your own environment.

Download client clearing items

The download client should not be responsible for removing downloads. Usenet clients should be configured so they don't remove downloads from history. Torrent clients should be setup so they don't remove torrents when they're finished seeding (pause or stop instead). This is because Sonarr communicates with the download client to know what to import, so if they're removed there is nothing to be imported... even if there is a folder full of files.

Download folder and library folder not different folders

The download client should download into a temporary-ish folder and Sonarr should import from that into your Library folder. If you download right into your library folder, you'll end up with multiple copies of episodes and when there are import issues, you may not notice because your media server will see the download client copy. The download folder will also be a hot mess of poorly named folders and files while your library folder will be nice and neat.

Incorrect category

Sonarr should be setup to use a category so that it only tries to process its own downloads. It is rare that a torrent submitted by sonarr gets added w/o the correct category, but it can happen. If you're adding torrents manually and want sonarr to process them, they'll need to have the correct category. It can be set at any time, since sonarr tries to process downloads every minute.

Packed torrents

If your torrent is packed in .rar files, you'll need to setup extraction. You can typically search your torrent client's name and "unpack" to find a solution. There are some other interesting solutions in this space, like unpackerr and rarfs, but they're more complicated. One issue to look out for with packed torrents is that the video file will be copied or hard linked like normal, but it isn't needed since the .rar files are seeding. That means if you're using a copy setup, the torrent will be consuming double the space. And if you're using a hard link setup, your torrent folder will be a little messier because of the unneeded file. This can be mitigated w/ a cleanup script.

Permissions on the destination

Don't forget to check permissions and ownership of the destination. It is easy to get fixated on the download's ownership and permissions and that is usually the cause of permissions related issues, but it could be the destination as well. Check that the destination folder(s) exist. Check that a destination file doesn't already exist or can't be deleted or moved to recycle bin. Check that ownership and permissions allow the downloaded file to be copied, hard linked or moved.

Repeated episode downloads

There are a few causes of repeated downloads, but a recent one is related to the Indexer restriction in Release Profiles. Because the indexer isn't stored w/ the episode data, any preferred word scores are zero for episodes in your library, but during "RSS" and search, they'll be applied. This gets you into a loop where you download the items again and again because it looks like an upgrade, then isn't, then shows up again and looks like an upgrade, then isn't. Don't restrict your release profile to an indexer. See issue #3853.

[[https://i.imgur.com/fgOYMRW.png|width=250px]]

[[https://i.imgur.com/AHxynWj.png|width=250px]]

Usenet download misses import

Sonarr only looks at the 30 most recent downloads in sabnzbd and nzbget, so if you keep your history this means that during large queues with import issues, downloads can be silently missed and not imported. The best way to avoid that is to keep your history clear, so that any items that still appear need investigating. You can achieve this by enabling Remove under Completed and Failed Download Handler. In nzbget, this will move items to the hidden history which is great. Unfortunately, sabnzbd does not have a similar feature. The best you can achieve there is to use the nzb backup folder.

qBittorrent 4.3.x

This version of qB changed how torrent folder and torrent name relate, previous to this the folder was named after the torrent. Starting in this version, the torrent folder name can be different. This is fixed in v3, but will not be fixed in v2. If you wish to stay on v2 then simplest solution is to stick with 4.2.5 for now. Existing torrents can be fixed by renaming the folder to the name of the torrent.