Ubuntu Importing keeps failing from sabnzbd d/ls

Sonarr version (exact version): 3.0.6.1196
Mono version (if Sonarr is not running on Windows): 6.12.0.122
OS: Ubuntu 20.04.3 LTS
Debug logs:
Description of issue:

sonarr correctly sends wanted episode to sabnzbd (3.3) running on localhost.
sabnzbd fetches and correctly puts episode in downloads/completed dir. Permissions on that are wide-open.
sonarr stops trying after “Importing” in the queue activity.

Debug log snippet is here:

21-10-5 20:38:45.3|Debug|TrackedDownloadService|Tracking 'sabnzbd:Star.Trek.Discovery.S03E01.iNTERNAL.1080p.WEB.h264-KOGi': ClientState=Completed SonarrStage=Downloading Episode='Star Trek Discovery - S03E01 WEBDL-1080p v1' OutputPath=/var/snap/sabnzbd/common/Downloads/complete/Star.Trek.Discovery.S03E01.iNTERNAL.1080p.WEB.h264-KOGi.
21-10-5 20:38:45.3|Debug|Parser|Parsing string 'Star.Trek.Discovery.S03E01.iNTERNAL.1080p.WEB.h264-KOGi'
21-10-5 20:38:45.3|Debug|Parser|Episode Parsed. Star Trek Discovery - S03E01 
21-10-5 20:38:45.3|Debug|Parser|Language parsed: English
21-10-5 20:38:45.3|Debug|QualityParser|Trying to parse quality for Star.Trek.Discovery.S03E01.iNTERNAL.1080p.WEB.h264-KOGi
21-10-5 20:38:45.3|Debug|Parser|Quality parsed: WEBDL-1080p v1
21-10-5 20:38:45.3|Debug|Parser|Release Group parsed: KOGi
21-10-5 20:38:45.5|Debug|Api|[GET] /api/v3/queue?page=1&pageSize=20&sortDirection=ascending&sortKey=timeleft&includeUnknownSeriesItems=false: 200.OK (174 ms)
21-10-5 20:38:45.5|Debug|DownloadedEpisodesImportService|Processing path: /var/snap/sabnzbd/common/Downloads/complete/Star.Trek.Discovery.S03E01.iNTERNAL.1080p.WEB.h264-KOGi
21-10-5 20:38:45.5|Debug|Parser|Parsing string 'Star.Trek.Discovery.S03E01.iNTERNAL.1080p.WEB.h264-KOGi'
21-10-5 20:38:45.6|Debug|Parser|Episode Parsed. Star Trek Discovery - S03E01 
21-10-5 20:38:45.6|Debug|Parser|Language parsed: English
21-10-5 20:38:45.6|Debug|QualityParser|Trying to parse quality for Star.Trek.Discovery.S03E01.iNTERNAL.1080p.WEB.h264-KOGi
21-10-5 20:38:45.6|Debug|Parser|Quality parsed: WEBDL-1080p v1
21-10-5 20:38:45.6|Debug|Parser|Release Group parsed: KOGi
21-10-5 20:38:45.6|Debug|DiskScanService|Scanning '/var/snap/sabnzbd/common/Downloads/complete/Star.Trek.Discovery.S03E01.iNTERNAL.1080p.WEB.h264-KOGi' for video files
21-10-5 20:38:45.6|Debug|DiskScanService|1 video files were found in /var/snap/sabnzbd/common/Downloads/complete/Star.Trek.Discovery.S03E01.iNTERNAL.1080p.WEB.h264-KOGi
21-10-5 20:38:45.6|Debug|ImportDecisionMaker|Analyzing 1/1 files.
21-10-5 20:38:45.6|Debug|Parser|Parsing string 'Star.Trek.Discovery.S03E01.iNTERNAL.1080p.WEB.h264-KOGi'
21-10-5 20:38:45.6|Debug|Parser|Episode Parsed. Star Trek Discovery - S03E01 
21-10-5 20:38:45.6|Debug|Parser|Language parsed: English
21-10-5 20:38:45.6|Debug|QualityParser|Trying to parse quality for Star.Trek.Discovery.S03E01.iNTERNAL.1080p.WEB.h264-KOGi
21-10-5 20:38:45.6|Debug|Parser|Quality parsed: WEBDL-1080p v1
21-10-5 20:38:45.6|Debug|Parser|Release Group parsed: KOGi
21-10-5 20:38:45.6|Debug|DownloadProcessingService|Failed to process download: Star.Trek.Discovery.S03E01.iNTERNAL.1080p.WEB.h264-KOGi

[v3.0.6.1196] System.IO.FileNotFoundException: Media file does not exist: /var/snap/sabnzbd/common/Downloads/complete/Star.Trek.Discovery.S03E01.iNTERNAL.1080p.WEB.h264-KOGi/Star.Trek.Discovery.S03E01.iNTERNAL.1080p.WEB.h264-KOGi.mkv
  at NzbDrone.Core.MediaFiles.MediaInfo.VideoFileInfoReader.GetMediaInfo (System.String filename) [0x00641] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\MediaFiles\MediaInfo\VideoFileInfoReader.cs:216 
  at NzbDrone.Core.MediaFiles.MediaInfo.VideoFileInfoReader.GetRunTime (System.String filename) [0x00000] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\MediaFiles\MediaInfo\VideoFileInfoReader.cs:220 
  at NzbDrone.Core.MediaFiles.EpisodeImport.DetectSample.IsSample (NzbDrone.Core.Tv.Series series, System.String path, System.Boolean isSpecial) [0x00062] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\MediaFiles\EpisodeImport\DetectSample.cs:48 
  at NzbDrone.Core.MediaFiles.EpisodeImport.ImportDecisionMaker+<>c__DisplayClass13_0.<GetNonSampleVideoFileCount>b__0 (System.String file) [0x00000] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\MediaFiles\EpisodeImport\ImportDecisionMaker.cs:193 
  at System.Linq.Enumerable.Count[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) [0x0002e] in <5b415632df1f4365ae2242b1a257bb5b>:0 
  at NzbDrone.Core.MediaFiles.EpisodeImport.ImportDecisionMaker.GetNonSampleVideoFileCount (System.Collections.Generic.List`1[T] videoFiles, NzbDrone.Core.Tv.Series series, NzbDrone.Core.Parser.Model.ParsedEpisodeInfo downloadClientItemInfo, NzbDrone.Core.Parser.Model.ParsedEpisodeInfo folderInfo) [0x00045] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\MediaFiles\EpisodeImport\ImportDecisionMaker.cs:191 
  at NzbDrone.Core.MediaFiles.EpisodeImport.ImportDecisionMaker.GetImportDecisions (System.Collections.Generic.List`1[T] videoFiles, NzbDrone.Core.Tv.Series series, NzbDrone.Core.Download.DownloadClientItem downloadClientItem, NzbDrone.Core.Parser.Model.ParsedEpisodeInfo folderInfo, System.Boolean sceneSource, System.Boolean filterExistingFiles) [0x0004c] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\MediaFiles\EpisodeImport\ImportDecisionMaker.cs:72 
  at NzbDrone.Core.MediaFiles.EpisodeImport.ImportDecisionMaker.GetImportDecisions (System.Collections.Generic.List`1[T] videoFiles, NzbDrone.Core.Tv.Series series, NzbDrone.Core.Download.DownloadClientItem downloadClientItem, NzbDrone.Core.Parser.Model.ParsedEpisodeInfo folderInfo, System.Boolean sceneSource) [0x00000] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\MediaFiles\EpisodeImport\ImportDecisionMaker.cs:54 
  at NzbDrone.Core.MediaFiles.DownloadedEpisodesImportService.ProcessFolder (System.IO.DirectoryInfo directoryInfo, NzbDrone.Core.MediaFiles.EpisodeImport.ImportMode importMode, NzbDrone.Core.Tv.Series series, NzbDrone.Core.Download.DownloadClientItem downloadClientItem) [0x000b2] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\MediaFiles\DownloadedEpisodesImportService.cs:198 
  at NzbDrone.Core.MediaFiles.DownloadedEpisodesImportService.ProcessPath (System.String path, NzbDrone.Core.MediaFiles.EpisodeImport.ImportMode importMode, NzbDrone.Core.Tv.Series series, NzbDrone.Core.Download.DownloadClientItem downloadClientItem) [0x00034] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\MediaFiles\DownloadedEpisodesImportService.cs:89 
  at NzbDrone.Core.Download.CompletedDownloadService.Import (NzbDrone.Core.Download.TrackedDownloads.TrackedDownload trackedDownload) [0x0002c] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Download\CompletedDownloadService.cs:116 
  at NzbDrone.Core.Download.DownloadProcessingService.Execute (NzbDrone.Core.Download.ProcessMonitoredDownloadsCommand message) [0x00085] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Download\DownloadProcessingService.cs:66 

Actual filesystem on localhost is:

root@htpc2:/var/snap/sabnzbd/common/Downloads/complete/Star.Trek.Discovery.S03E01.iNTERNAL.1080p.WEB.h264-KOGi# ls -l
total 3301944
-rwxrwxrwx 1 root root 3381163437 Oct 25  2020 Star.Trek.Discovery.S03E01.iNTERNAL.1080p.WEB.h264-KOGi.mkv
-rwxrwxrwx 1 root root       4858 Oct 25  2020 star.trek.discovery.s03e01.internal.1080p.web.h264-kogi.nfo
-rwxrwxrwx 1 root root       9851 Oct 25  2020 star.trek.discovery.s03e01.internal.1080p.web.h264-kogi.srr

Can’t figure out where the problem is. Filesystem looks ok (including permissions).

Would you leave your front door open with all your life savings and personal information in plain site with a neon sign saying take my stuff?

No? Then why are you running as root that is just plain stupid.

What poor guide did you follow that told you to run things as root so we can ensure users avoid that guide going forward?

You also should not be downloading to a snap’s folder as that is hazardous to the health of your downloads

Also you’re rather out of date in Sonarr by a few hundred versions. Upgrade.

Seems simply put sonarr cannot access the file

Sonarr says:

/var/snap/sabnzbd/common/Downloads/complete/Star.Trek.Discovery.S03E01.iNTERNAL.1080p.WEB.h264-KOGi/Star.Trek.Discovery.S03E01.iNTERNAL.1080p.WEB.h264-KOGi.mkv

Your show:
/var/snap/sabnzbd/common/Downloads/complete/Star.Trek.Discovery.S03E01.iNTERNAL.1080p.WEB.h264-KOGi/Star.Trek.Discovery.S03E01.iNTERNAL.1080p.WEB.h264-KOGi.mkv

So it’s going to be some sort of permissions issues; the file no longer is accessible by the user/group sonarr is running as when sonarr goes to evaluate the file against media info. This is probably due to your poor setup.

See this for good paths https://trash-guides.info/Hardlinks/How-to-setup-for/Native/

See the docker guide https://wiki.servarr.com/docker-guide - ignore the docker specifics - to get a little understanding of how to do permissions and ownership right. If you’re 777/666 things and/or running as root you’re doing things completely wrong.

Thanks for spending all that time regarding the sabnzbd daemon. Of course it needs to be changed. I’m relatively experienced with linux, but snap is somewhat new and surprisingly Ubuntu installed it to run as root directly from install. If you have a quick link on how to change the UID/GID of a snap service, that would be helpful. The childish shade is not helpful.

To address some of your other points that still had nothing to do with why it’s not working, the complete dir is actually a symlink, it’s not in the snap vol.

If you looked closely at the log, and the ls -l output, you’d notice that the file permissions should be plenty for sonarr to access the file.

So after your rant that didn’t help anyone you finally mention that you don’t know what the problem is (“some sort of permissions issues”) despite the directory listing indicating otherwise.

Thanks for all the help.

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