Sonarr won't move downloaded files

Savell Martin

Contributor
Joined
Jun 10, 2013
Messages
164
Hey guys,
So just setup my first FreeNAS box and Sonarr/SABnzbd.
Sonarr finds stuff, passes it to SAB and SAB downloads it and then just nothing.
If I do a manual import and select the completed folder it works, renames and moves the files to the new media directory.
But for some reason it just wont do it automatically.
I get this error in Sonarr:
Import failed, path does not exist or is not accessible by Sonarr: /media/completed/series/xxxxxshowhere

My setup:
Mount Points:
/mnt/jailhouse/downloads/completed/series
/mnt/jailhouse/iocage/jails/sonarr/root/download
/mnt/vault/media/series
/mnt/jailhouse/iocage/jails/sonarr/root/media/series
/mnt/vault/media/series_extra
/mnt/jailhouse/iocage/jails/sonarr/root/media/series_extra
/mnt/vault/media/anime
/mnt/jailhouse/iocage/jails/sonarr/root/media/anime

SAB tv category is set to use the completed/series folder
SAB is also set to
Permissions for completed downloads = 777

FreeNAS:
I have created an Admin user and on the Download dataset and Media datasets I have set full permissions.
Read, Write, & Execute all boxes ticked.

If I got into Sonarr and manual import, select the /download/xxxxxshowhere directory and click auto import it works straight away and moves it into the Anime folder on my media dataset

Please help me with what im missing or what I should have changed to get this to work automatically.
 
Last edited:

Savell Martin

Contributor
Joined
Jun 10, 2013
Messages
164
Can anyone help... I really want to get this working.

Also I just noticed that the error from Sonarr says:
/media/completed/series
Surely this should be /downloads/completed/series?

How is this like that?
 

Savell Martin

Contributor
Joined
Jun 10, 2013
Messages
164
So I have spent all day trying to get this to work and I just cannot.
This is the issue with FreeNAS, and no one can help because things are so shut down that no one know what the heck is going on.

I've created users sabnzbd (350) and sonarr (351) as I could see these were the ID's they were using when moving files. I made both part of the same group, and made both the media and downloads full 777 access and still nada.
Still no dice... So I added sabnzbd as the owner of /mnt/jailhouse/downloads and now the error saying unable to change permissions on /media/downloads is gone...

But still cannot move files via Sonarr. If I do it manually it works. Same message.

When SAB downloads and unpacks a file to downloads/complete/series it set as -rw-rw-rw-
Even changing this to 777 Sonarr still cannot pickup and move files. I'm really at a loss here.
 
D

dlavigne

Guest
Were you able to resolve this? If not, any errors in /var/log/messages when it fails? What is the full error from Sonarr?
 

Savell Martin

Contributor
Joined
Jun 10, 2013
Messages
164
@dlavigne no I gave up and moved away from freenas reluctantly. Got dockers setup in OMV in one night. I really want to get freenas to work but no one helps here or on Reddit. Just seems no one knows how to get plugins to work correctly. I'm 99% sure it's because each plugin has its own user so they can't use each others downloaded files. I created users based on the plugins pids and then they show up with the username not pid. I tried giving permissions but nada. I've been messing with it for over a month. Followed every guide and just didn't work. Don't want to run it if the next update causes me another month of grief and then just give up with my data locked into freenas.

Really wanted this to work
 

Savell Martin

Contributor
Joined
Jun 10, 2013
Messages
164
Is there a way I can change all the plugins to use the same user account?
I believe this may be the solution as then all the separate plugins can use the same permissions to access and move files around.

Is this possible? Lets say use the media user?
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Is there a way I can change all the plugins to use the same user account?
I believe this may be the solution as then all the separate plugins can use the same permissions to access and move files around.

Is this possible? Lets say use the media user?
You create them with all the same uid.

I also think your problem was just using the wrong path. So the download client has to use the same path as sonarr. Basically the download client replies to sonarr when it's finished and gives a path relative to it's jail. Sonarr then tries to copy that path from it's own jail. If that path doesn't exist the copy fails.

Jails and plugins are very simple actually. People just don't bother taking a step back and thinking.
 

Savell Martin

Contributor
Joined
Jun 10, 2013
Messages
164
Trust me I tried, I removed them multiple times, ive read every guide and tried for over a month...
How do I create a jail with the same UID?
I got SABnzbd and so on installed via the plugin system, as doing it manually didnt work.

Seriously point me in the right direction I'll do it
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Trust me I tried, I removed them multiple times, I've read every guide and tried for over a month...
How do I create a jail with the same UID?
I got SABnzbd and so on installed via the plugin system, as doing it manually didnt work.

Seriously point me in the right direction I'll do it
Well nothing seems to work for you but works for thousands of other people.

Guides are dumb and should not be followed unless you understand what they are actually doing. The special piece of creating jails such as transmission, sonarr, SABnzbd, radarr and plex is that you understand how users/groups work, how permissions work and how jail mount points work.

In your initall post you said you had two paths /downloads/ and /media these didn't match and that is your problem. You need to mount the exact same dataset in every jail to the exact same path. If you don't do this sonarr can not do the copy unless you specify a special setting in sonarr under advanced(i forget what it is called). Next you need to create a group that owns your media and directories. Most people call this group media and freenas actually already has it setup. Now in each jail you need to add your service user(sonarr, plex, transmission, sabnzbd) to this group. Then you need to make the group for all your media on freenas match this group and give group read/write/execute permissions on your directories and read/write for files.

Now you have a working setup. Good luck take your time and learn how it all works. You will have to learn this on any other system also.
 

Savell Martin

Contributor
Joined
Jun 10, 2013
Messages
164
I'm sorry but this in inherently the issue with FreeNAS.
They have a plugin system, but yet you shouldnt use it, you should go and re-write the book and figure it out.

Sure if I have all the time in the world I'd love to.

Why is simple tasks/apps that work on all other systems such a ballache with FreeNAS?
I cant tell you how much I want to use FreeNAS but then if an update breaks a plugin I dont want to be sitting there for another month trying to figure it out. Right now I've asked many times and no one can effectively direct me to the issue.

The 2 shares is because /downloads is on a mirror SSD for downloads/vm's/plugins that stuff.
The /media is my pool of 12 drives for long term storage.. so yes they are different shares as thats how it needs to be.
This is how I've done it on unRAID, OMV, and others without issue, but not with FreeNAS.

I really REALLY want to get this to work, but my gosh there needs to be an easier solution for all this crap.
 

Savell Martin

Contributor
Joined
Jun 10, 2013
Messages
164
In your initall post you said you had two paths /downloads/ and /media these didn't match and that is your problem. You need to mount the exact same dataset in every jail to the exact same path. If you don't do this sonarr can not do the copy unless you specify a special setting in sonarr under advanced(i forget what it is called). Next you need to create a group that owns your media and directories. Most people call this group media and freenas actually already has it setup. Now in each jail you need to add your service user(sonarr, plex, transmission, sabnzbd) to this group. Then you need to make the group for all your media on freenas match this group and give group read/write/execute permissions on your directories and read/write for files.

Can you elaborate on this part, and how to do it correctly?
FYI both Sonarr, SAB had the same dataset of Downloads. Just Sonarr also had Media to move those files there.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
They all need the exact same dataset with the exact same destination path.

I'm not sure what to elaborate on, i told you exactly how to set things up.
 

Savell Martin

Contributor
Joined
Jun 10, 2013
Messages
164
They all need the exact same dataset with the exact same destination path.

I'm not sure what to elaborate on, i told you exactly how to set things up.
I'm saying they were... I only had one download dataset where SAB would drop the files.
Like I also said, when using Sonarr and doing a manual import it works fine... so it can see and read the directories. I just wont do it automatically.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Sonarr: /media/completed/series/
Ok so sonarr said this path had issues. With the info you provided that path does not exist in sonarr. So can you tell me does that path exist in the sonarr jail? If it does exist can you show me the permission on each folder in the path?
 

Savell Martin

Contributor
Joined
Jun 10, 2013
Messages
164
It's too late now. I've rebuilt it like 3 times since this post. I'll try again today and get back to you
 

RSVP

Explorer
Joined
Feb 11, 2016
Messages
73
It usually has to do about permissions and the user being different per jail, plugin what have you. And yes, no one answers or if they do it can be kurt. Why i think freenas has taken a pile.. that and the failed 10 version or what have you. The site never updated any info from warden to iocage about permissions. There was huge thread pinned to the top back in 9.3 that worked.

I have old notes think these work. but dont want to bork your jails 816 is my user and group ID number that owns the pool. so i changed the user in each jail

Sonarr
**************
pw groupadd -n media -g 816
pw useradd -n media -u 816 -g 816 -d /nonexistent -s /usr/sbin/nologin

service sonarr onestop
chown -R media:media /usr/local/share/sonarr
chown -R media:media /usr/local/sonarr
sysrc 'sonarr_user=media'
service sonarr start

Radarr
***************
pw groupadd -n media -g 816
pw useradd -n media -u 816 -g 816 -d /nonexistent -s /usr/sbin/nologin

service radarr onestop
chown -R media:media /usr/local/share/radarr
chown -R media:media /usr/local/radarr
sysrc 'radarr_user=media'
service radarr start

Sabnzbd
***********
pw useradd -n newmedia -u 816 -d /nonexistent -s /usr/sbin/nologin
chown -R newmedia:newmedia /usr/local/sabnzbd
sysrc 'sabnzbd_user=newmedia'
chown -R newmedia:newmedia /usr/local/share/sabnzbdplus
chown -R newmedia:newmedia /var/run/sabnzbd
service sabnzbd start
 

apextrooper

Dabbler
Joined
Jul 5, 2014
Messages
10
I think that SweetAndLow may be onthe right track.
Assuming that the download client and sonarr are in separate jails, each will have a different file system and ip address
In Sonarr go to Settings->Download Client
at the bottom of the page add a remote path mapping.
The Host field is the ip address of the download client
The Remote Path field is the path to the download files on the download client
The Local Path is the path to the files in the Sonarr client
The download client API reports its path (the Remote Path)
Sonarr indexes to the host IP address and searches for the Remote path returned by the API
It uses this to find the local path to the the download files in Sonarr.

And yes the either the UID or GID must match in Sonarr and the download client as described above by RSVP. In my case I'm accessing through the group so the file permissions in FreeNAS must be arranged for it.
You may need to change the user that Sonarr and Sabnzbd uses I remember a description of this elsewhere I think in the Sonarr forums. Sorry no link, I'd have to find it. Please post it here if you work it out.
 
Joined
Nov 24, 2019
Messages
1
Ok so sonarr said this path had issues. With the info you provided that path does not exist in sonarr. So can you tell me does that path exist in the sonarr jail? If it does exist can you show me the permission on each folder in the path?

HI there, I have the exact same issue (Freenas 11.2), however I have qbittorrent, radarr, and sonarr running in the same jail.

Radarr has no issues pushing to qbt and upon file completion, renaming and moving, but Sonarr does - I can manually import, which indicates that there is a path issue, but I can't quite understand why Sonarr does and Radarr doesn't. I've started a series of fresh jails to see whether I've done something misconfiging them to start, to no avail.

Conceptually I understand that there must be a pathing issue, but for the life of me I can't see why, as both services are running in the same jail, share the same owner and the same group.

I'd appreciate any advice you can provide.
 

appliance

Explorer
Joined
Nov 6, 2019
Messages
96
omv to freenas mover here: i did this setup very quickly, just name it the same way instead of crazy paths
ideally create one dataset for the purpose of downloads /mnt/[pool/]downloads
in each jail settings, map /mnt/downloads to........ well, mnt/downloads
without any hassle, all torrent jails operate on the same single path, and sonarr/radarr/couchpotato also.
no need mapping settings. didn't even tweak permissions, but later i created jail users under root and put them in media group. so in case permissions are needed, i chmod the folder whose is owned by user:whoever group:media. also names then show up in windows, which is cool.
this also allows me to see the same exact paths in each shell, and zfs replicate all jails without unneccessary always changing temporary files (the incomplete downloads). i wouldn't put anything but configs in jails.
 
Top