Jump to content
linuxserver.io

[Support] Linuxserver.io - Sonarr

1242 posts in this topic Last Reply

Recommended Posts

Posted (edited)

UMASK value and files permissions incorrectly set, or at least I believe them to be.

 

I originally had the Binhex version of Sonarr installed, but wanted to use v3, so I 'migrated' to the linuxserver version by changing the Repository value to linuxserver/sonarr:preview and hitting apply. This all worked without a hitch and all data was kept and everything worked as it should.

 

I recently noticed that a lot of my file permissions on unRAID were set incorrectly, so I fixed all those using chmod and chown. After noticing this I set all relevant dockers; NZBGet, Radarr, NZBHydra and Sonarr to have the UID = 99, GID = 100 and UMASK = 002. Based on all the info I've read a mask value of 002 should give 664 for files -rw-rw-r--. However, after the file is imported by Sonarr and renamed, the file permissions keep showing up as 644, -rw-r--r--.

 

I did notice that the Binhex version of Sonarr has the UMASK key value as "UMASK", where this version is "UMASK_SET". I have since modified this, reloaded the docker, but the files keep showing up with -rw-r--r--.

 

My last ditch effort would be to completely remove Sonarr, install it again, and start over to see if this fixes the issue.

 

I figured I might as well ask here 1st to see if anyone has any input as to why this would occur. I looked at the file through the terminal, while it was still in NZBGet and the file permissions are what they should be -rw-rw-r--.

 

Anyone have any ideas?

Edited by unRAIDuser7
add info

Share this post


Link to post

I am having the same issues with sonarr permissions. Everything seems to have the wrong permissions. I did a clean install of the preview branch.

 

At this point I have to run the permission fix tool every time I want to mess with the files.

Share this post


Link to post
6 minutes ago, LateNight said:

@unRAIDuser7 @TexasUnraid have you tried the "Set Permissions" option in Sonarr, as explained at: 

 

I saw those options but no explanation of how they work so I didn't mess with them. Still pretty new to linux and don't fully understand the permissions.

 

From what I know 777 is full permissions and what I would want on the files, so why does that show 0644 and 0755? Wouldn't that limit permissions in some way?

 

Also, seems there are 2 ways to adjust permissions in linux, one allows you to set permissions and the other only allows you to subtract permissions? I was not sure which one this used.

Share this post


Link to post

I just took the brute force approach and added every permissions variable to the docker I could find and so far it seems to be working

firefox_VGiu30MFth.jpg

Share this post


Link to post

Sorry, should have linked to the second response and not the thread.

image.png.cf3956232eb1dbcff8335c12388bb400.png

 

I was also having permission issues until I enabled the Set Permissions option. I did change the chown User to 99, and chown Group to 100 but it appears either works.

Share this post


Link to post

If I have anymore issues I will try that then, although in V3 most of those options have been removed, you only have the file chmod option now.

Share this post


Link to post

My Sonarr container is huge compared to radarr - 88GB vs 515MB.

Is there anywhere I can look to check why this is so large. I have increased the size of the docker image, but it doesn't help, as it just grows to fill the image space.

Share this post


Link to post

Container Size button will tell you why its that huge

Share this post


Link to post
13 hours ago, bevinet said:

My Sonarr container is huge compared to radarr - 88GB vs 515MB.

Is there anywhere I can look to check why this is so large. I have increased the size of the docker image, but it doesn't help, as it just grows to fill the image space.

The usual reason for writing into docker.img is specifying a path in an application that doesn't correspond to a container path in your mappings. Common mistakes are not using the same upper/lower case as your container path, or using a relative path (not beginning in /).

Share this post


Link to post
On 8/4/2020 at 11:54 AM, LateNight said:

@unRAIDuser7 @TexasUnraid have you tried the "Set Permissions" option in Sonarr, as explained at: 

 

In the end, this is what I ended up doing, setting the permissions within sonarr/radarr itself.

 

I don't understand why the UMASK variable doesn't work from within the docker settings. If it doesn't work, then why even have it in there?

Share this post


Link to post

Hi All

 

Im getting an error on Sonarr at the moment and the port is confirmed to not be in use. Even changing the port doesnt work. It seems its an error internal to the docker. Any suggestions?
 

[Fatal] ConsoleApp: Address already in use. This can happen if another instance of Sonarr is already running another application is using the same port (default: 8989) or the user has insufficient permissions

 

Share this post


Link to post

Good evening all

 

Was wondering if anyone else have had this problem. im running unraid 6.8.3. and running sonar V3. 

The Sonarr app stopped working. when i try to go on to the webui i get "ERR_CONNECTION_REFUSED". this happened over the night. i did not install any new containers when it started. when i looked at the log it gave me the error " Epic Fail!" (I dont see anything epic about it)

Here is the log i get.

 

EPIC FAIL! System.InvalidCastException: Specified cast is not valid.
at System.Data.SQLite.SQLiteDataReader.VerifyType (System.Int32 i, System.Data.DbType typ) [0x000cd] in <61a20cde294d4a3eb43b9d9f6284613b>:0
at System.Data.SQLite.SQLiteDataReader.GetInt32 (System.Int32 i) [0x0002b] in <61a20cde294d4a3eb43b9d9f6284613b>:0
at NzbDrone.Core.Datastore.Migration.add_configurable_qualities.ConvertQualities (System.Data.IDbConnection conn, System.Data.IDbTransaction tran) [0x00038] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Datastore\Migration\037_add_configurable_qualities.cs:42
at FluentMigrator.Runner.Processors.SQLite.SQLiteProcessor.Process (FluentMigrator.Builders.Execute.PerformDBOperationExpression expression) [0x00038] in <137fb96feee44f379d6a8fba4e172d1c>:0
at FluentMigrator.Builders.Execute.PerformDBOperationExpression.ExecuteWith (FluentMigrator.IMigrationProcessor processor) [0x00000] in <c16130ff2bfb4746b4fb36de17115e3e>:0
at FluentMigrator.Runner.MigrationRunner+<>c__DisplayClass72_0.<ExecuteExpressions>b__1 () [0x00011] in <137fb96feee44f379d6a8fba4e172d1c>:0
at FluentMigrator.Runner.StopWatch.Time (System.Action action) [0x00006] in <137fb96feee44f379d6a8fba4e172d1c>:0
at FluentMigrator.Runner.MigrationRunner.AnnounceTime (System.String message, System.Action action) [0x0000c] in <137fb96feee44f379d6a8fba4e172d1c>:0
at FluentMigrator.Runner.MigrationRunner.ExecuteExpressions (System.Collections.Generic.ICollection`1[T] expressions) [0x000a5] in <137fb96feee44f379d6a8fba4e172d1c>:0
at FluentMigrator.Runner.MigrationRunner.ExecuteMigration (FluentMigrator.IMigration migration, System.Action`2[T1,T2] getExpressions) [0x0005a] in <137fb96feee44f379d6a8fba4e172d1c>:0
at FluentMigrator.Runner.MigrationRunner.ApplyMigrationUp (FluentMigrator.Infrastructure.IMigrationInfo migrationInfo, System.Boolean useTransaction) [0x0010f] in <137fb96feee44f379d6a8fba4e172d1c>:0
at FluentMigrator.Runner.MigrationRunner.MigrateUp (System.Boolean useAutomaticTransactionManagement) [0x000af] in <137fb96feee44f379d6a8fba4e172d1c>:0
at NzbDrone.Core.Datastore.Migration.Framework.MigrationController.Migrate (System.String connectionString, NzbDrone.Core.Datastore.Migration.Framework.MigrationContext migrationContext) [0x000a2] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Datastore\Migration\Framework\MigrationController.cs:51
at NzbDrone.Core.Datastore.DbFactory.CreateMain (System.String connectionString, NzbDrone.Core.Datastore.Migration.Framework.MigrationContext migrationContext) [0x0000b] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Datastore\DbFactory.cs:117
at NzbDrone.Core.Datastore.DbFactory.Create (NzbDrone.Core.Datastore.Migration.Framework.MigrationContext migrationContext) [0x00027] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Datastore\DbFactory.cs:82
at NzbDrone.Core.Datastore.DbFactory.Create (NzbDrone.Core.Datastore.Migration.Framework.MigrationType migrationType) [0x00000] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Datastore\DbFactory.cs:70
at NzbDrone.Core.Datastore.DbFactory.RegisterDatabase (NzbDrone.Common.Composition.IContainer container) [0x00000] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Datastore\DbFactory.cs:48
at NzbDrone.Host.NzbDroneServiceFactory.Start () [0x00037] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Host\ApplicationServer.cs:60
at NzbDrone.Host.Router.Route (NzbDrone.Host.ApplicationModes applicationModes) [0x0007f] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Host\Router.cs:56
at NzbDrone.Host.Bootstrap.Start (NzbDrone.Host.ApplicationModes applicationModes, NzbDrone.Common.EnvironmentInfo.StartupContext startupContext) [0x0003d] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Host\Bootstrap.cs:78
at NzbDrone.Host.Bootstrap.Start (NzbDrone.Common.EnvironmentInfo.StartupContext startupContext, NzbDrone.Host.IUserAlert userAlert, System.Action`1[T] startCallback) [0x0007f] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Host\Bootstrap.cs:41
at NzbDrone.Console.ConsoleApp.Main (System.String[] args) [0x0002e] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Console\ConsoleApp.cs:41
Press enter to exit...
[Info] Bootstrap: Starting Sonarr - /app/sonarr/bin/Sonarr.exe - Version 3.0.3.928

and after i tried to delete the container and the image it gives me the same message. it loops until it gives up. just for funn i tried V2, and that worked like a charm. but i would like to stay on V3 if at all possible 

 

Im unable to find a solution on my own so i hope anyone else have seen this and have some magic we can sprinkle over this problem. 

 

in advance, thanks for your time 

Edited by Parabux
spelling

Share this post


Link to post
On 5/19/2019 at 8:58 AM, thatsthefrickenlightning said:

Thank you for this! Fixed my hardlink problem without too much headache.

 

Summing up for any lurkers/Googlers: I removed all volume mounts in the docker settings except for config aka appdata for both sonarr/radarr and my torrent client. Then I pointed /mnt/ to /mnt/ for both my torrent client docker and radarr/sonarr, and now hardlinks are automatically created succesfully. This can be verified with Krusader by opening a terminal in either your torrents folder or your episode/film folder and typing 'stat *filename*'. Among the output is the Links count, which should say 2, meaning the data is linked to by 2 files in total: a hardlink.

 

Feel free to correct me if I got anything wrong there.

Does that mean deleting Host Path 2 and Host Path 3 and creating a new Host Path called /mnt or just changing them both to /mnt/

CMM9kfj.png

Share this post


Link to post
On 10/18/2020 at 12:10 PM, LeGourmand said:

Does that mean deleting Host Path 2 and Host Path 3 and creating a new Host Path called /mnt or just changing them both to /mnt/

CMM9kfj.png

I left /data and /config alone, deleted /media and created /mnt ( = /mnt) for Sonarr, Radarr and qBitTorrentvpn.

Share this post


Link to post
5 hours ago, thatsthefrickenlightning said:

I left /data and /config alone, deleted /media and created /mnt ( = /mnt) for Sonarr, Radarr and qBitTorrentvpn.

Massive thanks!
I just did a quick test with one TV show and it works! Now I just need to check/fix everything that I downloaded since moving to unraid.

Share this post


Link to post
16 hours ago, LeGourmand said:

Massive thanks!
I just did a quick test with one TV show and it works! Now I just need to check/fix everything that I downloaded since moving to unraid.

You're very welcome! Perhaps this is a bit of hillbilly tech, but if you have your entire library in your torrent client and in your plex server and they should be hardlinked, you could just delete your whole Plex library. If the files are hardlinked, there should be no change in the drive space indication in unraid.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.