Couldn't import episode already exists

Sonarr version (exact version): 3.0.10.1567
Mono version (if Sonarr is not running on Windows): 6.8.0.105
OS: Debian 11
Debug logs: Trace Log - Pastes.io
Description of issue: Episodes are failing to import within sonarr after download completes

Environment:
I’m currently running two Proxmox LXC containers. One is running Sonarr, and the other is running qBittorrent (v4.2.5). On the Sonarr LXC container, I have two NFS mounts - one back to my Synology NAS and the other over to the qBittorrent server. I’ve set the permissions on both of the mounts as 777. qBittorrent is set to download files to that NFS mount, which is at /nfs/downloads. On the Sonarr server, I have the other end mounted as /nfs/downloads as well.

Within Sonarr, I’ve set the Remote Path Mapping with the following:

Host: 192.168.10.83
Remote Path: /nfs/downloads
Local Path: /nfs/downloads/

My Synology NAS is mounted as /nfs/media, and the Root folder is set as /nfs/media/shows.

Issue:
When I attempt to download an episode of a show, Sonarr will successfully grab it and toss it over to qBittorrent. Once the download completes, Sonarr will copy the file over to my NAS. After the transfer completes, I’ll get a message saying something like:

Couldn't import episode /nfs/downloads/Reservation.Dogs.S03E10.PROPER.1080p.WEB.H264-NHTFS[TGx]/reservation.dogs.s03e10.proper.1080p.web.h264-nhtfs.mkv: Destination /nfs/media/Shows/Reservation Dogs (2021) [tvdbid-371884]/Season 3/reservation.dogs.s03e10.proper.1080p.web.h264-nhtfs.mkv already exists.

Exception:

NzbDrone.Common.Disk.DestinationAlreadyExistsException: Destination /nfs/media/Shows/Reservation Dogs (2021) [tvdbid-371884]/Season 3/reservation.dogs.s03e10.proper.1080p.web.h264-nhtfs.mkv already exists.
  at NzbDrone.Common.Disk.DiskTransferService.ClearTargetPath (System.String sourcePath, System.String targetPath, System.Boolean overwrite) [0x0001e] in C:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Common\Disk\DiskTransferService.cs:384 
  at NzbDrone.Common.Disk.DiskTransferService.TransferFile (System.String sourcePath, System.String targetPath, NzbDrone.Common.Disk.TransferMode mode, System.Boolean overwrite) [0x0024c] in C:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Common\Disk\DiskTransferService.cs:299 
  at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.TransferFile (NzbDrone.Core.MediaFiles.EpisodeFile episodeFile, NzbDrone.Core.Tv.Series series, System.Collections.Generic.List`1[T] episodes, System.String destinationFilePath, NzbDrone.Common.Disk.TransferMode mode) [0x00129] in C:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:116 
  at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.CopyEpisodeFile (NzbDrone.Core.MediaFiles.EpisodeFile episodeFile, NzbDrone.Core.Parser.Model.LocalEpisode localEpisode) [0x00080] in C:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:95 
  at NzbDrone.Core.MediaFiles.UpgradeMediaFileService.UpgradeEpisodeFile (NzbDrone.Core.MediaFiles.EpisodeFile episodeFile, NzbDrone.Core.Parser.Model.LocalEpisode localEpisode, System.Boolean copyOnly) [0x0019b] in C:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\MediaFiles\UpgradeMediaFileService.cs:73 
  at NzbDrone.Core.MediaFiles.EpisodeImport.ImportApprovedEpisodes.Import (System.Collections.Generic.List`1[T] decisions, System.Boolean newDownload, NzbDrone.Core.Download.DownloadClientItem downloadClientItem, NzbDrone.Core.MediaFiles.EpisodeImport.ImportMode importMode) [0x0029b] in C:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\MediaFiles\EpisodeImport\ImportApprovedEpisodes.cs:109 

Can someone guide me on looking into this issue? This occurs for every episode for every show. I’ve never attempted to download any of this content, so the message is a bit confusing.

Ideally, I’d like to transfer the file over to my NAS, and once the seeding ratio has been met, I’d like to have the file from the qBittorrent server removed.

I don’t see why you need a remote path mapping if the path in both containers is the same. That will only confuse things.

When do I need remote path mappings
If Radarr and your download client are not on the same server/system.

https://trash-guides.info/Radarr/Radarr-remote-path-mapping/
I was following this guide. Technically the download client and Sonarr are not on the same server. They are separate VMs/LXCs.
Is that not the case? The only things that is the same is the path name on both of the LXCs.

This could just be me misunderstanding the purpose of remote paths mapping.

The download clients tell Sonarr where they put the downloaded media (e.g. in a Linux system it could be /media/qbittorrent/downloads). If Sonarr is on a different server than the download client it is possible that the download client may have been mounted to a different filesystem resulting in a different file path from Sonarr’s perspective. The Remote Path Mapping acts as a translator between the download client and Sonarr when this is the case.

That is if the download client says I have what you are looking for in /media/qbittorrent/downloads but locally you have it mounted as (assuming you exported /media/qbittorrent) /mount/qbittorrent you would use the Remote Path Mapping to successfully find downloads with Sonarr. However, if you mounted the /media/qbittorrent export to a local file system also called /media/qbittorrent then no Remote Path Mapping is required because Sonarr will look where the download client told it to and find the media.

Thank you very much! I just removed the remote path mapping. Still having the same issue, but at least I know about that now.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.