I’ve got Sonarr running as a service on a 2012 R2 server. ImportApprovedEpisodes fails due to what I assume to be a permissions issue.
Sonarr should have access through everyone, or my account (the account services are run under). Permissions on the folders, as well as individual files are Full Control for Everyone, as well as my account.
Settings:
My account and Everyone have permissions to both the download and destination folder.
The service was running under system, I changed it over to my account (also an admin)
Troubleshooting:
Imports all pending episodes when I reboot my server.
Same issue with AV off
Version: 2.0.0.3953, 2.0.0.4099
Log:
System.UnauthorizedAccessException: Access to the path is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.File.InternalMove(String sourceFileName, String destFileName, Boolean checkHost) at NzbDrone.Common.Disk.DiskProviderBase.MoveFile(String source, String destination, Boolean overwrite) in M:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Common\Disk\DiskProviderBase.cs:line 210 at NzbDrone.Common.Disk.DiskTransferService.TryMoveFileVerified(String sourcePath, String targetPath, Int64 originalSize) in M:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Common\Disk\DiskTransferService.cs:line 471 at NzbDrone.Common.Disk.DiskTransferService.TransferFile(String sourcePath, String targetPath, TransferMode mode, Boolean overwrite, DiskTransferVerificationMode verificationMode) in M:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Common\Disk\DiskTransferService.cs:line 215 at NzbDrone.Common.Disk.DiskTransferService.TransferFile(String sourcePath, String targetPath, TransferMode mode, Boolean overwrite, Boolean verified) in M:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Common\Disk\DiskTransferService.cs:line 90 at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.TransferFile(EpisodeFile episodeFile, Series series, List1 episodes, String destinationFilePath, TransferMode mode) in M:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:line 118
at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.MoveEpisodeFile(EpisodeFile episodeFile, LocalEpisode localEpisode) in M:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:line 78
at NzbDrone.Core.MediaFiles.UpgradeMediaFileService.UpgradeEpisodeFile(EpisodeFile episodeFile, LocalEpisode localEpisode, Boolean copyOnly) in M:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\MediaFiles\UpgradeMediaFileService.cs:line 64
at NzbDrone.Core.MediaFiles.EpisodeImport.ImportApprovedEpisodes.Import(List1 decisions, Boolean newDownload, DownloadClientItem downloadClientItem) in M:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\MediaFiles\EpisodeImport\ImportApprovedEpisodes.cs:line 86
Are the source and destination locations on local disks or network shares?
If you stop the service and run C:\ProgramData\NzbDrone\NzbDrone.Console.exe do you have the same issue?
Running NzbDrone.Console.exe yields the same error.
Log:
System.UnauthorizedAccessException: Access to the path is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalMove(String sourceFileName, String destFileName, Boolean checkHost)
at NzbDrone.Common.Disk.DiskProviderBase.MoveFile(String source, String destination, Boolean overwrite) in M:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Common\Disk\DiskProviderBase.cs:line 210
at NzbDrone.Common.Disk.DiskTransferService.TryMoveFileVerified(String sourcePath, String targetPath, Int64 originalSize) in M:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Common\Disk\DiskTransferService.cs:line 471
at NzbDrone.Common.Disk.DiskTransferService.TransferFile(String sourcePath, String targetPath, TransferMode mode, Boolean overwrite, DiskTransferVerificationMode verificationMode) in M:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Common\Disk\DiskTransferService.cs:line 215
at NzbDrone.Common.Disk.DiskTransferService.TransferFile(String sourcePath, String targetPath, TransferMode mode, Boolean overwrite, Boolean verified) in M:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Common\Disk\DiskTransferService.cs:line 90
at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.TransferFile(EpisodeFile episodeFile, Series series, List1 episodes, String destinationFilePath, TransferMode mode) in M:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:line 118 at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.MoveEpisodeFile(EpisodeFile episodeFile, LocalEpisode localEpisode) in M:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:line 78 at NzbDrone.Core.MediaFiles.UpgradeMediaFileService.UpgradeEpisodeFile(EpisodeFile episodeFile, LocalEpisode localEpisode, Boolean copyOnly) in M:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\MediaFiles\UpgradeMediaFileService.cs:line 64 at NzbDrone.Core.MediaFiles.EpisodeImport.ImportApprovedEpisodes.Import(List1 decisions, Boolean newDownload, DownloadClientItem downloadClientItem) in M:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\MediaFiles\EpisodeImport\ImportApprovedEpisodes.cs:line 86
T:\... are the files stored on a NAS? is that a mapped network drive?
Seeing the specific error in the Debug log, we definitely need Trace level logs. (please note that Trace logging is a lot more verbose, so each log file lasts mere minutes, so be sure to have one with the error and enough context)
You mentioned that it gets imported after a reboot, is that true?
T:\ is just the drive letter. Both source and destination drives are local, D and T respectively.
Trace logging here. There are also ~17 import errors that are unrelated to the import issue (misnamed episodes in drone factory).
After a reboot (both with service running as system and myself) it imports all episodes in activity that have been downloaded, as well as files in my drone factory folder. After that I can go download new episodes and they sit in activity and error out.
Ok, download https://technet.microsoft.com/en-us/sysinternals/processexplorer.aspx
Run as administrator.
On the menu you have Find->Find handle or dll…
type in Idiotest then hit search, screenshot the result.
(Yes, this finds any and all processes on the computer that have a handle open to anything with Idiotest in the name)
Edit: If that gives no results, try another phrase.
Tixati should be irrelevant since the problem persists with or without it running. It might also be worth mentioning CouchPotato uses the same source directory and has no issues.
Added category in SABNzbd and Sonarr: Sonarr
Set path: D:\Test
I’m able to download, but my activity was cleared and it isn’t seeing the new path. Just for testing, I changed my Drone Factory folder to the new path and I’m getting the same error.
I also tried shutting down SAB and running an import, just for fun, and I had the same issue.
@Taloth, @markus101, if it’s easier I can just reinstall, but I’d love to know what the issue is, so I’ve been holding off. Thanks again for all your help.
You definitely need to disable the drone factory. set the interval to zero and set the path to empty.
It interferes with completed download handling (Sonarr querying the sab api to get completed downloads).
Check if the completed download in sab has the correct category (as configured in Sonarr), case-sensitive. (If you’re on sab 1.0, then the category shouldn’t be ‘series’, it’s a known sab bug)
Then check Activity->History to see if it was already imported, and obviously Activity->Queue.
If that still yields nothing, then let us know and we’ll look at some more logs.
Ok, if the show is still in Activity->Queue, it should try reimport every minute. Can you get a few minutes of trace level logging? I fully expect it to be the same as before, but better safe than a wild goose chase.
Have we determined that the issue lies on the source side not the destination side?
I’d like to copy one of the pending files to another location then try manual import to import it (from Wanted: Missing). Another test would be to move the video file to the series folder and rescan the series in Sonarr, once imported in Sonarr rename the series and make sure that file is renamed.
The fact that it imports when the computer starts, leads me to believe that something running on the system is conflicting with it. Does you user auto-login when the system boots? If so it’d be a good test to try without it logging in automatically, but Sonarr and SAB running as services and queue up some downloads to see if they import after they complete.
I’m having some interesting permissions issues on the destination drive. I’m able to move some stuff, but not others and I can’t seem to modify permissions on it. I’m going to format my drive pool and set it up again, the restore from a backup and see if that helps any. I’ll let you know as soon as it’s done (though 11 TB is going to take a minute to restore).
I don’t have my account set to auto-logon, but when I reboot it doesn’t import anything unless I sign in. I don’t know how relevant that is, but I figured I’d mention it.