Resource icon

FN11.3 iocage jails - Plex, Tautulli, Sonarr, Radarr, Lidarr, Jackett, Transmission, Organizr

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
step #4, has hardcoded stuff which makes no sense?
Code:
iocage fstab -a jackett /mnt/tank1/apps/jackett /config nullfs rw 0 0


I've changed /tank1/ to the following

/iocage/
/POOLNAMEHERE/ (obviously, my pool name)
Neither of these work.

I'm guessing the jackett section needs a bit of work (sorry guys, thanks regardless)


I've now fixed my commands that were wrong previously, this continues to be a problem. The guide is suggesting some kind of hardcoded "tank1" folder. Worse still is the '/apps/' folder, where is this? I can't find it anywhere at all, in order to correct the command.
 

anmnz

Patron
Joined
Feb 17, 2018
Messages
286
I've now fixed my commands that were wrong previously, this continues to be a problem. The guide is suggesting some kind of hardcoded "tank1" folder. Worse still is the '/apps/' folder, where is this? I can't find it anywhere at all, in order to correct the command.
Just create an empty directory somewhere and use that. The guide writer has a pool called "tank1" and is letting jailed applications keep their configuration outside the jail datasets, in subdirectories of /mnt/tank1/apps. But thats just their convention. Any location will do. If it was me I would skip this step at first until I had the jail working anyway, then go back and destroy/recreate the jail with this external config directory mounted and check that.
 
Last edited:

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
Just create an empty directory somewhere and use that. The guide writer has a pool called "tank1" and is letting jailed applications keep their configuration outside the jail datasets, in subdirectories of /mnt/tank1/apps. But thats just their convention. Any location will do. If it was me I would skip this step at first until I had the jail working anyway, then go back and destroy/recreate the jail with this external config directory mounted and check that.
Thank you for that!
Guide could do with a tweak to fix it, I'll mess again tomorrow
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
The guide continues to have issues, quite frustrating how many are broken. (yes, I'm re-writing it to fix it up)
I've fixed all the commands (I can) to get things working.

This one is also dead.

Code:
[root@freenastest ~]# iocage exec jackett mkdir /usr/local/etc/rc.d			
mkdir: /usr/local/etc: No such file or directory 
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
Anyone able to explain this to me? I don't understand.

Code:
[root@freenastest ~]# iocage exec jackett chmod u+x /usr/local/etc/rc.d/jackett
																			  
[root@freenastest ~]# iocage exec jackett service jackett restart			  
env: /usr/local/etc/rc.d/jackett: No such file or directory					
True																			
[root@freenastest ~]# cd /mnt/iocage/jails/jackett/root/usr/local/etc/rc.d/	
[root@freenastest /mnt/iocage/jails/jackett/root/usr/local/etc/rc.d]# ls -l	
total 14																		
-rwxrw-rw-  1 nobody  nogroup  1576 Jul  5 10:52 jackett						
[root@freenastest /mnt/iocage/jails/jackett/root/usr/local/etc/rc.d]#		  
																	


?!
 

toliman

Cadet
Joined
Feb 9, 2014
Messages
7
Anyone able to explain this to me? I don't understand.

Code:
[root@freenastest /mnt/iocage/jails/jackett/root/usr/local/etc/rc.d]# ls -l
total 14																	
-rwxrw-rw-  1 nobody  nogroup  1576 Jul  5 10:52 jackett

?!

it's strange that the editor you used, saved it as nobody:nogroup. startup scripts (files stored in /etc/rc.d/) need to be root owned, or regular users could add things to the system for when it's rebooted next.

if you're unfamiliar with editors, run "iocage console jackett" to enter into the jail's 'world' which opens up a shell/console inside the jail for changing things.

you can also run most of the commands prefaced with "iocage exec" while in the console of that jail,
which saves time if you're typing the commands by hand over SSH/putty, or your SSH client of choice, or through the web terminal.

to change it so that your edits will stick, "chown root:wheel /usr/local/etc/rc.d/jackett"

Then we're going to check it's working, by installing nano in the jail with "pkg install nano"
(if you're familiar with linux, vi is 'powerful' but it is in no way intuitive)

use "nano /usr/local/etc/rc.d/jackett" to open, once the content is loaded, Ctrl-W will save, Ctrl-X will exit.

you can then continue with the rest of the guide, just omit the "iocage exec" from each line, as you don't need it while within the jail.

once finished, type exit to return back to the shell for FreeNAS. (if confused, check the "prompt" which should say root@jackett . If it still says root@jackett, run "exit")

hope that saves some future grief.
Edit: fixed typo
 
Last edited:

mow4cash

Contributor
Joined
Jan 20, 2017
Messages
132
Anyone able to explain this to me? I don't understand.

Code:
[root@freenastest ~]# iocage exec jackett chmod u+x /usr/local/etc/rc.d/jackett
																			 
[root@freenastest ~]# iocage exec jackett service jackett restart			 
env: /usr/local/etc/rc.d/jackett: No such file or directory					
True																			
[root@freenastest ~]# cd /mnt/iocage/jails/jackett/root/usr/local/etc/rc.d/	
[root@freenastest /mnt/iocage/jails/jackett/root/usr/local/etc/rc.d]# ls -l	
total 14																		
-rwxrw-rw-  1 nobody  nogroup  1576 Jul  5 10:52 jackett						
[root@freenastest /mnt/iocage/jails/jackett/root/usr/local/etc/rc.d]#		 
																	


?!
Make a new jail from the start and post the cli output. You will have to manually install your pkgs if you are getting that dns error.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
This has become an incredibly frustrating experience, obviously my lack of skills isn't helping I admit, but things surely aren't working right here, they just can't be right. Under both u5 and nightly

I continue to follow the guide or make minor tweaks.
Due to networking issues, I am now running some changes (DHCP on the jail, this results in the jail working 'properly')

1: echo '{"pkgs":["mono","curl","ca_root_nss"]}' > /tmp/pkg.json
2: iocage create -n "jackett" -p /tmp/pkg.json -r 11.1-RELEASE dhcp=on vnet="on" allow_raw_sockets="1" boot="on"
vs
iocage create -n "jackett" -p /tmp/pkg.json -r 11.1-RELEASE ip4_addr="vnet0|192.168.0.121/255.255.255.0" defaultrouter="192.168.0.254" vnet="on" allow_raw_sockets="1" boot="on"
3: iocage set bpf=yes jackett
4: iocage set bpf=no jackett
5: iocage set bpf=yes jackett
(There appears to be some kind of bug with the "bpf" flag on jails)
6: rm /tmp/pkg.json
7: iocage fstab -a jackett /mnt/POOLNAME/data/jailconfigs/jackett /config nullfs rw 0 0
8: iocage exec jackett ln -s /usr/local/bin/mono /usr/bin/mono

Here's where things hit the fan,

Code:
[root@freenas ~]# iocage exec jackett ln -s /usr/local/bin/mono /usr/bin/mono  
jackett is not running, starting jail										  
jail: mount.fstab: /mnt/iocage/jails/jackett/root/config: No such file or directory


NOTE: The end result of my DHCP change early results in no more errors creating the initial jail, surely this is a good thing?
DHCP = ON
Code:
Installing updates... done.													
jackett successfully created!												  
jackett requires bpf=yes!													  
[root@freenas ~]#	


vs

Fixed IP
Code:
Installing updates... done.													
jackett successfully created!												  
Testing SRV response to FreeBSD												
Error: error sending query: General LDNS error								
{repo} could not be reached, please check your DNS	



LONG story short, why on EARTH would changing the creation of the jail, from ipv4 fixed, to DHCP result in the 8'th command to fail with a darn folder issue "No such file or directory" of all things?? Totally baffling.
 

toliman

Cadet
Joined
Feb 9, 2014
Messages
7
If you have network problems from within the jail, it is possible that your jail needs to be recreated rather than the trial and error of diagnosing the new kerfuffle that iocage and VNET has introduced in 11.1-U4 and U5.

Honestly, it's faster to recreate the iocage unless you have an idea of what to diagnose.

The errors during creating the jail in the first stage, are hard to fix, speaking from personal experience(s).

Without the GUI for the jail, you will need to destroy the iocage twice (sigh) using "iocage destroy jackett". Yep, twice. Iocage is not quite ready for prime time imo, but if you're familiar with Linux, this is status quo.

At this stage, it is better to force the VNET / iocage to use a static IP for management purposes, then in your router, assign it to the server using the MAC address and the IP address(es) so they are reserved for the iocage. Then you can swap to DHCP. or you can memorise the MAC...

That said, the epair0b solution, and the system tunables for U5 have fixed plex for me, and this feels very much like how I learned how Linux works... IE through days of suffering and misery due to frustration of driver and support failure with no chance of having a working system.

Sent from my SM-G965F using Tapatalk
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
If you have network problems from within the jail, it is possible that your jail needs to be recreated rather than the trial and error of diagnosing the new kerfuffle that iocage and VNET has introduced in 11.1-U4 and U5.

Unfortunately, I have in fact run those commands multiple times, I'm using VM Snapshots and trying from U5 and nightly back and forth to mess around.
I want consistent behaviour, which is what I am reproducing.


Honestly, it's faster to recreate the iocage unless you have an idea of what to diagnose.

The errors during creating the jail in the first stage, are hard to fix, speaking from personal experience(s).

Without the GUI for the jail, you will need to destroy the iocage twice (sigh) using "iocage destroy jackett". Yep, twice. Iocage is not quite ready for prime time imo, but if you're familiar with Linux, this is status quo.

Do we know why this needs to be done twice? Has this bug been reported? Is it exclusive to FreeNAS or FreeBSD as a whole?
Also, to re-state, thanks to VM Snapshotting, I am 100% starting Fresh.


At this stage, it is better to force the VNET / iocage to use a static IP for management purposes, then in your router, assign it to the server using the MAC address and the IP address(es) so they are reserved for the iocage. Then you can swap to DHCP. or you can memorise the MAC...

You have this around the wrong way. If I create a jail, under my VM using iocage and I set the IP, the jail is 'broken' with stuffed networking. Due to the nature of VMWare, if I set DHCP, it straight up correctly creates my jail.


Here's my *assumption* on what's going wrong (re-read my last big post outlining it)
Somehow, the 'fixed' jail creation process, with DHCP is downloading some kind of update which is changing the file structure of the jail. It's able to contact the repository and download stuff and patch more than the fixed IP jail.

That's my guess. It has something to do with this /config/ folder?
I'm absoloutely with you 100% with what you're saying and I acknowledge I'm hardly a guru, but I am being thorough enough to re-create the issue consistently here and it feels like that creation process is simply doing 'different things' to my jail, what I don't know?

Re-read my original post, under the assumption I've tried it at least 4 times.
Code:
jail: mount.fstab: /mnt/iocage/jails/jackett/root/config: No such file or directory


I'm going to do some more testing right now, see if I can't spot it.

For anyone still following my gargantuan amount of posts in this entire subthread *THIS* *THIS* is why mid-skill and casual FreeNAS users, want docker and plugins to be working consistently, reliably and easily. They just want it as simple as a synology box. The plugins, (while not always updated) have been generally simple to use and we darn well appreciate it.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
P.s I just re tested using ipv4 fixed method, all 8 steps work (later on is broken, another story) but for some reason that dhcp change during creation, is breaking something?
 

Pentaflake

Explorer
Joined
Jul 8, 2014
Messages
91
This has become an incredibly frustrating experience, obviously my lack of skills isn't helping I admit, but things surely aren't working right here, they just can't be right. Under both u5 and nightly

I continue to follow the guide or make minor tweaks.
Due to networking issues, I am now running some changes (DHCP on the jail, this results in the jail working 'properly')

1: echo '{"pkgs":["mono","curl","ca_root_nss"]}' > /tmp/pkg.json
2: iocage create -n "jackett" -p /tmp/pkg.json -r 11.1-RELEASE dhcp=on vnet="on" allow_raw_sockets="1" boot="on"
vs
iocage create -n "jackett" -p /tmp/pkg.json -r 11.1-RELEASE ip4_addr="vnet0|192.168.0.121/255.255.255.0" defaultrouter="192.168.0.254" vnet="on" allow_raw_sockets="1" boot="on"
3: iocage set bpf=yes jackett
4: iocage set bpf=no jackett
5: iocage set bpf=yes jackett
(There appears to be some kind of bug with the "bpf" flag on jails)
6: rm /tmp/pkg.json
7: iocage fstab -a jackett /mnt/POOLNAME/data/jailconfigs/jackett /config nullfs rw 0 0
8: iocage exec jackett ln -s /usr/local/bin/mono /usr/bin/mono

Here's where things hit the fan,

Code:
[root@freenas ~]# iocage exec jackett ln -s /usr/local/bin/mono /usr/bin/mono  
jackett is not running, starting jail										  
jail: mount.fstab: /mnt/iocage/jails/jackett/root/config: No such file or directory


NOTE: The end result of my DHCP change early results in no more errors creating the initial jail, surely this is a good thing?
DHCP = ON
Code:
Installing updates... done.													
jackett successfully created!												  
jackett requires bpf=yes!													  
[root@freenas ~]#	


vs

Fixed IP
Code:
Installing updates... done.													
jackett successfully created!												  
Testing SRV response to FreeBSD												
Error: error sending query: General LDNS error								
{repo} could not be reached, please check your DNS	



LONG story short, why on EARTH would changing the creation of the jail, from ipv4 fixed, to DHCP result in the 8'th command to fail with a darn folder issue "No such file or directory" of all things?? Totally baffling.

I've finally had some time to actually catch up on this but the issues you were having with the jail creation commands are documented in the main post. It specifically has an example on what you need to replace in the jail creation command.

For any jail below that has commands for iocage all commands should be run from the FreeNAS host. On the iocage create command for each jail you MUST replace <IP>,<MASK>,<GATEWAY> with the correct values for your setup.

Example:
iocage create -n "jailname" -p /tmp/pkg.json -r 11.1-RELEASE ip4_addr="vnet0|192.168.1.100/24" defaultrouter="192.168.1.1" vnet="on" allow_raw_sockets="1" boot="on"

The guide also has a explanation of the required datasets/folders to use the guide in the paragraphs before the commands if you don't create them the fstab creation commands will fail. Based on the posts you made you didn't read it initially. I have updated the jackett section to the latest release url and created a test jail this morning for jackett and it worked fine (https://pastebin.com/raw/1sAdk4Rq). I'm not sure what to tell you, numerous people have used this guide without issues.

As a number of people have suggested if your system is having issues with networking in iocage jails on your system you should open a bug report with Freenas you can do this from their site (http://bugs.freenas.org/) or if you already have an account there from the support section under system menu in the FreeNAS webui.

I try to keep up with this thread but its a community guide and I don't have time to constantly check it everyday but I do update when there are issues.

Unrelated to this post Mono is now finally updated to have support for BoringSSL in mono so it can now connect to github and other sites using only TLS1.2.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
I've finally had some time to actually catch up on this but the issues you were having with the jail creation commands are documented in the main post. It specifically has an example on what you need to replace in the jail creation command.



The guide also has a explanation of the required datasets/folders to use the guide in the paragraphs before the commands if you don't create them the fstab creation commands will fail. Based on the posts you made you didn't read it initially. I have updated the jackett section to the latest release url and created a test jail this morning for jackett and it worked fine (https://pastebin.com/raw/1sAdk4Rq). I'm not sure what to tell you, numerous people have used this guide without issues.

As a number of people have suggested if your system is having issues with networking in iocage jails on your system you should open a bug report with Freenas you can do this from their site (http://bugs.freenas.org/) or if you already have an account there from the support section under system menu in the FreeNAS webui.

I try to keep up with this thread but its a community guide and I don't have time to constantly check it everyday but I do update when there are issues.

Unrelated to this post Mono is now finally updated to have support for BoringSSL in mono so it can now connect to github and other sites using only TLS1.2.


Ok so firstly, thank you for the guide, it is totally appreciated!
To be clear, I don't like stuff being inconsistent. It seems when I run FreeNAS under a VM, it's inconsistent, that's very frustrating for me and obviously for this thread!
I want to help test and learn and yet I stumble in to some of the oddest problems.

My point? I've run your guide on my live machine, surprise, surprise, it works far better, but not 100%


So literally the only issue now is the final command.
Code:
[root@freenas ~]# iocage exec jackett service jackett restart				   
env: /usr/local/etc/rc.d/jackett: No such file or directory					 
True																			
[root@freenas ~]#															   


That file, does in fact exist

Code:
[root@freenas ~]# iocage exec jackett service jackett restart				   
env: /usr/local/etc/rc.d/jackett: No such file or directory					 
True																			
[root@freenas ~]# cd /mnt/iocage/jails/jackett/root/usr/local/etc/rc.d/		 
[root@freenas /mnt/iocage/jails/jackett/root/usr/local/etc/rc.d]# ls			
jackett																		 
[root@freenas /mnt/iocage/jails/jackett/root/usr/local/etc/rc.d]#


Any idea? All other commands, appeared to work.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
I fixed my issues under VMWare, finally. I wasn't creating the jail correctly via cli using dhcp. Seems VMware does NOT like manually set ip, which makes sense.
Link for answer: https://forums.freenas.org/index.ph...ware-having-iocage-networking-problems.68379/

That being said, my post above, the last command is the final problem. Even on my main machine, followed the guide to the letter there and it still fails, thoughts?
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
I am having the same issue across 2 entirely different jails, I'm literally one step away from getting this working and my lack of knowledge is holding me back (and I suspect, the guide is missing one small thing, what, I don't know?

Check this out.

Code:
[root@freenas ~]# iocage exec radarr service radarr start					   
env: /usr/local/etc/rc.d/radarr: No such file or directory					 
True																			
[root@freenas ~]# iocage exec jackett service jackett start					 
env: /usr/local/etc/rc.d/jackett: No such file or directory					 
True																			
[root@freenas ~]# iocage exec radarr ls -l /usr/local/etc/rc.d/				 
total 9																		 
-rwxrwxrwx  1 1003  1002  1533 Jul  7 18:53 radarr							 
																			   
[root@freenas ~]# iocage exec jackett ls -l /usr/local/etc/rc.d/				
total 9																		 
-rwxrw-rw-  1 1003  1002  1576 Jul  7 10:59 jackett							 
																			   
[root@freenas ~]#							   



I tried messing with chmod 777 in one jail (radarr) still, I can't run the service, literally the last command to both guides. What am I doing wrong here? I think that every other aspect has worked properly?
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
I used chmod and chown and neither of these seem to help?
 

Laurence Milton

Dabbler
Joined
Apr 2, 2017
Messages
16
I am running FREENAS 11.1 Stable
I have successfully installed Plex and Sonarr under iocage and both are running fine. I have sabNZBD and Radarr running under the old Warden jails.

I am trying to set up Radarr under iocage but am having problems setting up the initial iocage jail for radarr. When I run:-
Code:
 iocage create -n "radarr" -p /tmp/pkg.json -r 11.1-RELEASE ip4_addr="vnet0|192.168.1.20/24>" defaultrouter="192.168.1.254" vnet="on" allow_raw_sockets="1" boot="on" 

I get the dreaded message:- "Error: error sending query: Error creating socket"

I have read through all 24 pages of this thread and tried the suggested solutions including adding Tunables: -
Freenas SS.jpg


Unfortunately nothing seems to work.
Just wondering if there are any other suggestions of what I could try.

Thanks
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
I have manually made my own qbittorrent iocage jail. It was extremely easy using the existing guide and mixing in some commands from the other guides (radarr, jackett)

I believe, based on what I know, really easy to update just with pkg update and upgrade, since it's installed from freshports?

How do I update radarr, jackett though, since I installed those manually from the github repository / zip file? Is there an easy solution?
 

mow4cash

Contributor
Joined
Jan 20, 2017
Messages
132
Ok so firstly, thank you for the guide, it is totally appreciated!
To be clear, I don't like stuff being inconsistent. It seems when I run FreeNAS under a VM, it's inconsistent, that's very frustrating for me and obviously for this thread!
I want to help test and learn and yet I stumble in to some of the oddest problems.

My point? I've run your guide on my live machine, surprise, surprise, it works far better, but not 100%


So literally the only issue now is the final command.
Code:
[root@freenas ~]# iocage exec jackett service jackett restart				  
env: /usr/local/etc/rc.d/jackett: No such file or directory					
True																			
[root@freenas ~]#															  


That file, does in fact exist

Code:
[root@freenas ~]# iocage exec jackett service jackett restart				  
env: /usr/local/etc/rc.d/jackett: No such file or directory					
True																			
[root@freenas ~]# cd /mnt/iocage/jails/jackett/root/usr/local/etc/rc.d/		
[root@freenas /mnt/iocage/jails/jackett/root/usr/local/etc/rc.d]# ls			
jackett																		
[root@freenas /mnt/iocage/jails/jackett/root/usr/local/etc/rc.d]#


Any idea? All other commands, appeared to work.

Use ee editor. Something happened for me when I copy and pasted the text with notepad and I had the same issues about the file not being there when indeed it was. Had me stumped for a bit.
 
Top