I have had som problems with the way Sonarr imports shows.
Sonarr found some episodes, grapped them and imported them.
One of the episodes was in a bad quality so i used the manual search function to locate a better version. But when the file was done it doesn’t get imported.
I haven’t had any problems with this before so i tried with some other shows and same problem.
I have checked the ownership of the folders and checked that there was proper access to those folder for Sonarr.
This is what i get in the logs:
Couldn’t import episode /usr/local/deluge/var/Downloads/Arrow.S04E04.1080p.WEB-DL.DD5.1.H.264-KiNGS[rarbg]/Arrow.S04E04.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv: Destination already exists [/volume1/MediaFolder/Serier/Arrow/Season 04/S04E04 - Beyond Redemption.mkv]
System.IO.IOException: Destination already exists [/volume1/MediaFolder/Serier/Arrow/Season 04/S04E04 - Beyond Redemption.mkv]
at NzbDrone.Common.Disk.DiskTransferService.ClearTargetPath (System.String targetPath, Boolean overwrite) [0x0001e] in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Common\Disk\DiskTransferService.cs:244
at NzbDrone.Common.Disk.DiskTransferService.TransferFile (System.String sourcePath, System.String targetPath, TransferMode mode, Boolean overwrite, Boolean verified) [0x001d9] in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Common\Disk\DiskTransferService.cs:135
at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.TransferFile (NzbDrone.Core.MediaFiles.EpisodeFile episodeFile, NzbDrone.Core.Tv.Series series, System.Collections.Generic.List1 episodes, System.String destinationFilePath, TransferMode mode) [0x0010e] in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:118 at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.MoveEpisodeFile (NzbDrone.Core.MediaFiles.EpisodeFile episodeFile, NzbDrone.Core.Parser.Model.LocalEpisode localEpisode) [0x0005e] in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:80 at NzbDrone.Core.MediaFiles.UpgradeMediaFileService.UpgradeEpisodeFile (NzbDrone.Core.MediaFiles.EpisodeFile episodeFile, NzbDrone.Core.Parser.Model.LocalEpisode localEpisode, Boolean copyOnly) [0x00119] in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\MediaFiles\UpgradeMediaFileService.cs:64 at NzbDrone.Core.MediaFiles.EpisodeImport.ImportApprovedEpisodes.Import (System.Collections.Generic.List1 decisions, Boolean newDownload, NzbDrone.Core.Download.DownloadClientItem downloadClientItem) [0x0024e] in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\MediaFiles\EpisodeImport\ImportApprovedEpisodes.cs:90
This has otherwise worked perfect up until now.
EDIT: I have tried the manual import feature but that is also failing.
It’s not supposed to overwrite, it’s supposed to recycle/delete the existing episode and then import the new one.
The error is thrown in ClearTargetPath, which is part of the import. so that file shouldn’t even be there.
Best would be to check the log (trace) to see all stages of the UpgradeMediaFileService (specifically this part).
I checked the logs this morning and saw that Sonarr is trying to remove the file, and probably succeeds.
I’m using Deluge on Synology. Sonarr can send the torrent to Deluge and track it’s progress. But as soon as the file is imported the torrent isn’t removed from Deluge and thus keeps trying to import the same file over and over. The files it’s complaining about is imported, i can see that in Plex.
The Logs view is just error, warn, info. What I meant was the log files, as in System->Logs->Files. At trace level (Settings->General->Log level), it logs more info about the process.
I have activated the Trace level log. But the problem vanished earlier today…? I suddenly received notifications from pushover that the 5 shows i had problems with was imported. Checked Deluge and Sonarr and they were gone, done. Sonarr had done it’s thing.
Sadly this happened before i activated the Trace logging.
I will se tomorrow if the problem happens again. The next show is ready there.
Will report back.
Its not trying to remove the existing file, just trying to copy it over, which means Sonarr doesn’t know that the file was previously imported (something else imported it or it failed after the file was copied and Sonarr wasn’t aware).
I think it likely started working after Sonarr rescanned the disk, saw the file was there then properly deleted it before importing.
When Sonarr successfully imports an episode it will stop tracking that torrent for import and won’t ever try to import it again. To track this down the most telling thing would be the logs before the failure because the destination exists, is there a failed copy in there causing issues?
The only program with access to that specific folder is Sonarr. I’m currently using Deluge but i have also tried Transmission, uTorrent and rTorrent. It’s running on a Synology NAS.
I don’t have anything else importing. Emby and Plex is installed but, as far as i know, they can’t import files.
I have just tried to force a rescan, there is five shows in queue right now. It doesn’t seem to have an effect.
When the 5 shows have been cleared from the queue i will clear the logs and then activate trace. I reckon there is an log ready tomorrow.