Resource icon

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

kazooless

Dabbler
Joined
Aug 9, 2013
Messages
32
I don't see why it wouldn't work with iocage I just think he hasn't written and tested the scripts yet.

Agreed, which is why I went ahead and tried it. The fact it is mostly working seems to support that too. I think it is just the issue of the cert directory either not correct, or there are instructions missing on how to populate it with the cert.pem file. I'd guess it is an openssl task, but I don't know how to do it (and I've searched for help first).
 

Benc

Dabbler
Joined
Nov 5, 2015
Messages
37
I'm also having quite a few issues...

This is what i get everytime i try to create a iocage jail:
Code:
root@freenas:~ # iocage create -n "plex" -p /tmp/pkg.json -r 11.1-RELEASE ip4_addr="vnet0|192.168.1.11" defaultrouter="192.168.1.1" vnet="on" allow_raw_sockets="1" boot="on"
plex successfully created!
Testing SRV response to FreeBSD
Error: error sending query: Error creating socket

I'm having same problem, but with one difference - first time I created jail without problem. In the process I did mess with permissions, so I decided to start over and destroyed jail. After that I get this same error every time.
 

kazooless

Dabbler
Joined
Aug 9, 2013
Messages
32
Agreed, which is why I went ahead and tried it. The fact it is mostly working seems to support that too. I think it is just the issue of the cert directory either not correct, or there are instructions missing on how to populate it with the cert.pem file. I'd guess it is an openssl task, but I don't know how to do it (and I've searched for help first).

I finally found it. I found an article that says FreeBSD doesn't install any CA root certificates by default. You have to install them from ports.

Code:
pkg install ca_root_nss
 

ezra

Contributor
Joined
Jan 15, 2015
Messages
124
Awsome guide thanks. Trying to fix PlexPass...

Performed all your commands, adjusted to my needs (IP etc) then when i get to this point:

Code:
root@freenas:/mnt/SSD # iocage exec plex sysrc "plexmediaserver_plexpass_enable=YES"
plexmediaserver_plexpass_enable:  -> YES

root@freenas:/mnt/SSD # iocage exec plex sysrc plexmediaserver_plexpass_support_path="/config"
plexmediaserver_plexpass_support_path:  -> /config

root@freenas:/mnt/SSD # iocage exec plex service plexmediaserver_plexpass start
/etc/rc.conf: plexmediaserver-plexpass_enable=YES: not found
/etc/rc.conf: plexmediaserver-plexpass_support_path=/config: not found
plexmediaserver_plexpass does not exist in /etc/rc.d or the local startup
directories (/usr/local/etc/rc.d), or is not executable
True


I cannot access my plex server at specified ip:32400/web

Also I've found that if you specify
Code:
ip4_addr="vnet0|xxx.xxx.xx.x/24"
it will display it inside the new 11.1 WEBGUI as
Code:
vnet0|xxx.xxx.xx.x/24
inside the IPV4 address section of the Jail config.

Please advise.

Kind regards.
 

Pentaflake

Explorer
Joined
Jul 8, 2014
Messages
91
I finally found it. I found an article that says FreeBSD doesn't install any CA root certificates by default. You have to install them from ports.

Code:
pkg install ca_root_nss

Correct that is actually why a number of the applications all include that as a default pkg to install on creation. I just haven't had time to sit down and write them up for iocage as I don't use them personally so its fairly low on my priority list in my free time.

For the most part you should be able to create a iocage jail and console into it and then run the rest of the directions the same. There have only been a few hiccups for things like pkgs that were installed in warden based jails templates that are not installed by default in the iocage template.

First let me say THANK YOU :) for these great instructions. Now for my question... All my jails appear to be working except for OMBI. When I stop it using IOCAGE command it displays the below errors. When I stop it from inside the jail it just hangs on trying to stop mono-sgen. Any help would be appreciated.
Bump, i'm also getting this issue.
I haven't really seen this with mine but I stopped using OMBI recently so I'll have to see when I have some time to take a look. Ombi had issues stopping sometimes as well on warden so it might be an issue with ombi on freebsd via mono.
 

MoonPie

Dabbler
Joined
Dec 13, 2014
Messages
20
I haven't really seen this with mine but I stopped using OMBI recently so I'll have to see when I have some time to take a look. Ombi had issues stopping sometimes as well on warden so it might be an issue with ombi on freebsd via mono.[/QUOTE]

Thanks for any help you can provide. You say you are not using OMBI - are you using a better alternative than OMBI?
 

Pentaflake

Explorer
Joined
Jul 8, 2014
Messages
91
Awsome guide thanks. Trying to fix PlexPass...

Performed all your commands, adjusted to my needs (IP etc) then when i get to this point:

Code:
root@freenas:/mnt/SSD # iocage exec plex sysrc "plexmediaserver_plexpass_enable=YES"
plexmediaserver_plexpass_enable:  -> YES

root@freenas:/mnt/SSD # iocage exec plex sysrc plexmediaserver_plexpass_support_path="/config"
plexmediaserver_plexpass_support_path:  -> /config

root@freenas:/mnt/SSD # iocage exec plex service plexmediaserver_plexpass start
/etc/rc.conf: plexmediaserver-plexpass_enable=YES: not found
/etc/rc.conf: plexmediaserver-plexpass_support_path=/config: not found
plexmediaserver_plexpass does not exist in /etc/rc.d or the local startup
directories (/usr/local/etc/rc.d), or is not executable
True


I cannot access my plex server at specified ip:32400/web

Also I've found that if you specify
Code:
ip4_addr="vnet0|xxx.xxx.xx.x/24"
it will display it inside the new 11.1 WEBGUI as
Code:
vnet0|xxx.xxx.xx.x/24
inside the IPV4 address section of the Jail config.

Please advise.

Kind regards.

Can you double check everything you ran? I just ran everything in the guide with a test jail just to double check it again today and it looks to work fine. The only thing I did different was just created a /config instead of mounting one in as this was just a test jail. The install messages from the pkg during setup are sniped out just to cutdown on extra text in the example below.

Code:
root@freenas:~ # echo '{"pkgs":["plexmediaserver-plexpass","ca_root_nss"]}' > /tmp/pkg.json
root@freenas:~ # iocage create -n "test-plex" -p /tmp/pkg.json -r 11.1-RELEASE ip4_addr="vnet0|10.0.10.100/24" defaultrouter="10.0.10.1" vnet="on" allow_raw_sockets="1" boot="on" 
test-plex successfully created!
Testing SRV response to FreeBSD
Testing DNSSEC response to FreeBSD

Installing pkg...
Installing supplied packages:
  - plexmediaserver-plexpass...
  - ca_root_nss...
* Starting test-plex
  + Started OK
  + Configuring VNET OK
  + Starting services OK
root@freenas:~ # rm /tmp/pkg.json
root@freenas:~ # iocage exec test-plex mkdir -p /config
root@freenas:~ # iocage exec test-plex chown -R plex:plex /config
root@freenas:~ # iocage exec test-plex sysrc "plexmediaserver_plexpass_enable=YES"
plexmediaserver_plexpass_enable:  -> YES
root@freenas:~ # iocage exec test-plex sysrc plexmediaserver_plexpass_support_path="/config"
plexmediaserver_plexpass_support_path:  -> /config
root@freenas:~ # iocage exec test-plex service plexmediaserver_plexpass start
Starting plexmediaserver_plexpass.
root@freenas:~ # iocage exec test-plex service plexmediaserver_plexpass status
plexmediaserver_plexpass is running as pid 26165.


I haven't really seen this with mine but I stopped using OMBI recently so I'll have to see when I have some time to take a look. Ombi had issues stopping sometimes as well on warden so it might be an issue with ombi on freebsd via mono.
Thanks for any help you can provide. You say you are not using OMBI - are you using a better alternative than OMBI?

I am not using anything currently as I don't really need it and I felt it was missing some features I would have liked. In addition currently there is no way I have found with a number of different paths to get the v3 that will be replacing v2 eventually to function on FreeBSD using both mono with the windows version or using the linux version with linux binary support in freebsd. The bad part is there isn't official support for FreeBSD in dotnetcore that v3 is written in (https://github.com/tidusjar/Ombi/issues/1564).
 
Last edited:

Wolfeman0101

Patron
Joined
Jun 14, 2012
Messages
428
Awsome guide thanks. Trying to fix PlexPass...

Performed all your commands, adjusted to my needs (IP etc) then when i get to this point:

Code:
root@freenas:/mnt/SSD # iocage exec plex sysrc "plexmediaserver_plexpass_enable=YES"
plexmediaserver_plexpass_enable:  -> YES

root@freenas:/mnt/SSD # iocage exec plex sysrc plexmediaserver_plexpass_support_path="/config"
plexmediaserver_plexpass_support_path:  -> /config

root@freenas:/mnt/SSD # iocage exec plex service plexmediaserver_plexpass start
/etc/rc.conf: plexmediaserver-plexpass_enable=YES: not found
/etc/rc.conf: plexmediaserver-plexpass_support_path=/config: not found
plexmediaserver_plexpass does not exist in /etc/rc.d or the local startup
directories (/usr/local/etc/rc.d), or is not executable
True


I cannot access my plex server at specified ip:32400/web

Also I've found that if you specify
Code:
ip4_addr="vnet0|xxx.xxx.xx.x/24"
it will display it inside the new 11.1 WEBGUI as
Code:
vnet0|xxx.xxx.xx.x/24
inside the IPV4 address section of the Jail config.

Please advise.

Kind regards.
There is a typo. Edit your /etc/rc.conf to read:
Code:
plexmediaserver_plexpass_enable="YES"
plexmediaserver_plexpass_support_path="/config"
 

ZodiacUHD

Patron
Joined
Aug 28, 2015
Messages
226
I’m having a few issues with my jails, i can create them, Vnet works, but as soon as i rebooted they weren’t accessible anymore even if running
Code:
iocage list
was listing them as “up”. I tried adding tunables as described here https://github.com/iocage/iocage/blob/master/doc/build/html/_sources/networking.txt. I changed em0 with igb1 (which is my NIC name running ifconfig) but it ended up breaking all networking. I had to get in via IPMI and restore defaults. As you can guess i’m not in a great spot, any help would be really appreciated, do i have to change anything from the suggested tunables? Thank you very much.
 

ezra

Contributor
Joined
Jan 15, 2015
Messages
124
Never mind, i ran your commands just changing the test-plex to plex and it works... thank you for your quick response and help mate, much appreciated!
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
plexmediaserver_plexpass_enable="YES" plexmediaserver_plexpass_support_path="/config"
plexmediaserver-plexpass, not plexmediaserver_plexpass.
Edit: wrong
 
Last edited:

Wolfeman0101

Patron
Joined
Jun 14, 2012
Messages
428
plexmediaserver-plexpass, not plexmediaserver_plexpass.
That's not how mine is:
Code:
root@plex:~ # cat /etc/rc.conf
host_hostname="plex"
cron_flags="$cron_flags -J 15"

# Disable Sendmail by default
sendmail_enable="NONE"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"

# Run secure syslog
syslogd_flags="-c -ss"

# Enable IPv6
ipv6_activate_all_interfaces="YES"
plexmediaserver_plexpass_enable="YES"
plexmediaserver_plexpass_support_path="/config"
root@plex:~ # service plexmediaserver_plexpass status
plexmediaserver_plexpass is running as pid 36891.
root@plex:~ #

The package is plexmediasever-plexpass but the service is plexmediaserver_plexpass
 

ezra

Contributor
Joined
Jan 15, 2015
Messages
124
He's right, you can't use this command
Code:
echo '{"pkgs":["plexmediaserver_plexpass","ca_root_nss"]}' > /tmp/pkg.json
To build plex but you have to use:
Code:
echo '{"pkgs":["plexmediaserver-plexpass","ca_root_nss"]}' > /tmp/pkg.json


After that you can just use commands like
Code:
service plexmediaserver_plexpass status


I believe this is just how the pkg file named in the repo
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504

Pentaflake

Explorer
Joined
Jul 8, 2014
Messages
91
There isn't a difference, iocage exec is just using jexec itself to run whatever you want. Though if you wanted a shell in your jail created with iocage your better off doing iocage console <jailname> than jexec <JID> tcsh as the former will do an actual login with all the environment setup (home,shell,path,term etc etc). iocage console <jailname> is calling login -f root by default.
 

ZodiacUHD

Patron
Joined
Aug 28, 2015
Messages
226
There isn't a difference, iocage exec is just using jexec itself to run whatever you want. Though if you wanted a shell in your jail created with iocage your better off doing iocage console <jailname> than jexec <JID> tcsh as the former will do an actual login with all the environment setup (home,shell,path,term etc etc). iocage console <jailname> is calling login -f root by default.


Thank you very much, well explained. I wanted to go for nextcloud in iocage and that solved all my doubts.
 

OGCleric

Cadet
Joined
Aug 11, 2017
Messages
2
Hello All, well this is my first post ever with this freenas community and want to say thanks first to all that help noobs like me by making great guides like this.

I started moving my jails to "iocage" and I'm doing jackett right now. I get everything running but for some reason after re-starting the jail with iocage restart jackett it says its running with root privileges.

Sorry if I said something wrong or if I'm using the wrong terminology. Still learning.

Well I think the post above mine helped. So when using iocage commands they are executed by the root user. If I restart from within the console with service jackett restart the root privilege msg go's away.
 
Last edited:

Pentaflake

Explorer
Joined
Jul 8, 2014
Messages
91
Hello All, well this is my first post ever with this freenas community and want to say thanks first to all that help noobs like me by making great guides like this.

I started moving my jails to "iocage" and I'm doing jackett right now. I get everything running but for some reason after re-starting the jail with iocage restart jackett it says its running with root privileges.

Sorry if I said something wrong or if I'm using the wrong terminology. Still learning.

Well I think the post above mine helped. So when using iocage commands they are executed by the root user. If I restart from within the console with service jackett restart the root privilege msg go's away.

It is not actually running as root you can check this for yourself by looking at the user the process is running as iocage exec jackett ps aux.
Code:
root@freenas:~ # iocage exec jackett ps aux
USER      PID %CPU %MEM    VSZ    RSS TT  STAT STARTED    TIME COMMAND
root    26408  0.0  0.0  10500   1932  -  IsJ  14:46   0:00.00 /usr/sbin/syslogd -c -ss
root    26469  0.0  0.0  12592   1948  -  SsJ  14:46   0:00.00 /usr/sbin/cron -J 15 -s
jackett 26547  0.0  0.0  10468   1624  -  IsJ  14:46   0:00.00 daemon: /usr/local/bin/mono[26548] (daemon)
jackett 26548  0.0  0.8 240380 128012  -  SJ   14:46   0:02.26 /usr/local/bin/mono /usr/local/share/Jackett/JackettConsole.exe -d /config (mono-sgen)
root    32198  0.0  0.0  21288   2124  2  R+J  15:17   0:00.00 ps aux

I've opened an issue on the github for jackett that this is not functioning correctly on FreeBSD.

Issue: https://github.com/Jackett/Jackett/issues/2419
Test for root: https://github.com/Jackett/Jackett/commit/05d57980465265fa42c349df1c5b1acf28000ba0
 
Top