Resource icon

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

afmiller

Contributor
Joined
Dec 11, 2013
Messages
106
Did you get this resolved? I am having the same problem. I have tried the tunables, with no luck.

I did, the tunables is what solved it for me. Can you post a screen shot of your tunables or send it to me in a message. Verify the settings compared to mine
 

Michael De Cou

Explorer
Joined
Aug 12, 2016
Messages
50
So I am just trying to get a base jail created, and I am finding that networking is a challenge. I see all sorts of posts about iocage networking issues, but am not sure the cause. If I create a jail in the gui, it occasionally seems to work. I can go into the jail through jexec and ping out to the outside world or local network. Upon reboot, that connectivity goes away. Other times, the jail will not function correctly from the start.

I have seen posts about adding tunables, but I have not had any success with that. The one question i have with this is with the interface name. My interface to my network is a LAGG interface, named lagg0. I have tried to use "lagg0" in the tunables, and found that upon reboot, the interface is not configured correctly and needs to be reconfigured from the local terminal.

If there are any tricks i should try for this, I'd love to hear them.

If I should just wait for 11.2 before messing with iocage, that may be an option too.

Thanks
 
Joined
Jan 13, 2017
Messages
17
Does anyone know how to update Plex with iocage? I tried "iocage exec plex pkg upgrade" and that does not seem to work.
 

Pistolwhip

Dabbler
Joined
Feb 24, 2016
Messages
18
I just do

pkg update && pkg upgrade -y

Seems to work fine. Note that if plexmediaserver[-plexpass] upgrades you also need to restart the service so the updated binaries run.
 

Michael De Cou

Explorer
Joined
Aug 12, 2016
Messages
50
I did, the tunables is what solved it for me. Can you post a screen shot of your tunables or send it to me in a message. Verify the settings compared to mine
I will provide as soon as I get back online... power outage thanks to a storm in NJ.

I can tell you I could use some help with the tunable that references the interface. My link to the network is an aggregation, named lagg0. When i rebooted with the tunable referencing lagg0, i had to go into the main console and reset the interface including IP address. Freenas was unable to initiate the web interface with that tunable. As stated, I will provide once the server is back up.

THanks
 

Candle

Dabbler
Joined
Aug 24, 2017
Messages
10
Would anyone please be able to give a step by step on this step?

"Create an rc file for ombi using your favorite editor at /mnt/iocage/jails/ombi/root/usr/local/etc/rc.d/ombi"

Tried a couple different ways, but I am a n00b and nothing worked. Thanks for your help.
 

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
nano /mnt/iocage/jails/ombi/root/usr/local/etc/rc.d/ombi
paste into nano
ctrl-X to save
 

ere109

Contributor
Joined
Aug 22, 2017
Messages
190
Does anyone know how to update Plex with iocage? I tried "iocage exec plex pkg upgrade" and that does not seem to work.
I did some further reading, because neither
Code:
iocage update
or
Code:
pkg update
was doing anything for me. It turns out, the FN development team has switched to a "quarterly" update, so while Plex may release a new version, by default, FN will only update the new version every three months. This was done to help them avoid chasing their tales with every update.
There is another page about how to defeat this and go back to immediate packages, but not sure the benefit - other than not getting that splash screen.
 

John Regan

Cadet
Joined
Sep 7, 2013
Messages
8
Hi,

Thanks for the instructions and all the great comments here that have got me up and running with Plex ... almost ;)

Plex is up and running, has connection to the internet all media has been added and metadata downloaded...

The main issue I have is playing transcoded media (non transcoded is fine) and from looking at the plex logs I see this:

Mar 07, 2018 00:29:01.879 [0x80d651a00] DEBUG - HTTP 200 response from GET https://plex.tv/api/codecs/easyaudioencoder?build=freebsd-x86_64&deviceId=redacted&oldestPreviousVersion=1.11.0.4666-fc63598ba&version=141
Mar 07, 2018 00:29:01.879 [0x80d651a00] DEBUG - HTTP requesting GET https://downloads.plex.tv/codecs/141/freebsd-x86_64/EasyAudioEncoder-freebsd-x86_64.zip
...
Mar 07, 2018 00:29:02.138 [0x80d651a00] DEBUG - HTTP 200 response from GET https://downloads.plex.tv/codecs/141/freebsd-x86_64/EasyAudioEncoder-freebsd-x86_64.zip
Mar 07, 2018 00:29:02.181 [0x80d651a00] ERROR - Unzip: could not set executable bit on output file
Mar 07, 2018 00:29:02.182 [0x80d651a00] ERROR - CodecManager: failed to extract zip
Mar 07, 2018 00:29:02.182 [0x80d651a00] ERROR - Error configuring transcoder: Decoder install failed: eac3_eae
Mar 07, 2018 00:29:02.182 [0x80d651a00] DEBUG - Streaming Resource: Terminated session 0x80c82e20:lg6uul2uwkf2fhbmxf0ksl0h with reason Conversion failed. A required codec could not be found or failed to install.
Mar 07, 2018 00:29:02.182 [0x80afd4100] DEBUG - Killing job.

So I am assuming this is some permissions issue but if I su to plex and curl the same file and unzip it in the codecs directory all seems fine so I am stuck...

In my /mnt/apps/plex/Plex Media Server/Codecs I see a dir is created (EasyAudioEncoder-141-freebsd-x86_64.tmp):

root@valhalla:/mnt/tank/apps/plex/Plex Media Server/Codecs # ls -al
total 88
drwxrwxr-x+ 4 plex plex 5 Mar 7 17:44 .
drwxrwxr-x+ 9 plex plex 10 Mar 7 17:43 ..
-rwxrwxr-x+ 1 plex plex 36 Mar 6 20:45 .device-id
drwxrwxr-x+ 2 plex plex 9 Mar 6 22:46 b077134-1269-freebsd-x86_64
drwxrwxr-x+ 3 plex plex 3 Mar 7 17:44 EasyAudioEncoder-141-freebsd-x86_64.tmp

Inside that is a dir EasyAudioEncoder

and under that a file
-rwxrwxr-x+ 1 plex plex 1366640 Mar 7 17:44 EasyAudioEncoder

Plex is running with the plex user, so I am stuck here...

Also regarding updates to plex I see there is a 1.12 version out there but I have 1.11.0.4666 - have tried adding the repository and pkg update and upgrade but nothing seems to happen for me here.

Appreciate any suggestions :D
 

John Regan

Cadet
Joined
Sep 7, 2013
Messages
8
OK figured out the transcoding issue.

The directory has a + next to it which means had windows ACL so had to use setfacl -b on directory to remove as I found any chmod operation failed. Now transcoding is up and running :)

Still would like to figure out how to upgrade and what the latest version is though ... not really sure of the correct commands and does not seem to be working and is 1.11.0.4666 what everyone else has?
 

Pistolwhip

Dabbler
Joined
Feb 24, 2016
Messages
18
For more frequent upgrades you need to do the optional step of putting the 'latest' repo back into the jail:


iocage exec <jail> "mkdir -p /usr/local/etc/pkg/repos"
iocage exec <jail> "vi /usr/local/etc/pkg/repos/FreeBSD.conf"

Note: The above uses the vi editor.

Contents of FreeBSD.conf:
Code:
FreeBSD: {
	url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest"
}


After that a simple pkg update && pkg upgrade in the jail should do the trick.
Note that if plexmediaserver does upgrade you need to restart the service so the new version gets launched.
 

John Regan

Cadet
Joined
Sep 7, 2013
Messages
8
Thanks Piostolwhip ... sorry a bit of a noob so did not realise the commands had to be executed in the jail :oops:.

I used:

Code:
iocage exec plex "pkg update && pkg upgrade"


which worked great and now on 1.12.xxxx.

Guess I can stick that in a cron job with a
Code:
iocage restart plex 
after it and run every week to keep up to date.
 

Prasanth

Contributor
Joined
Mar 2, 2014
Messages
100
Thanks Piostolwhip ... sorry a bit of a noob so did not realise the commands had to be executed in the jail :oops:.

I used:

Code:
iocage exec plex "pkg update && pkg upgrade"


which worked great and now on 1.12.xxxx.

Guess I can stick that in a cron job with a
Code:
iocage restart plex 
after it and run every week to keep up to date.

heres the cron script that i have running every morning for plex updates

Code:
#!/bin/sh
iocage exec plex "pkg update && pkg upgrade -y"
iocage restart plex   


I wish there was a way to limit the restart only if plex actually updated
 

Prasanth

Contributor
Joined
Mar 2, 2014
Messages
100
Here's a better cronjob. Can be expanded to include any of the other jails you want as well

Code:
#!/bin/sh

if iocage exec plex "pkg update && pkg upgrade -y" | ! grep -q 'Your packages are up to date.'; then
  echo "Plex was updated; will restart the jail"
  iocage restart plex
else
  echo "Plex is up to date!"
fi

if iocage exec plexpy "pkg update && pkg upgrade -y" | ! grep -q 'Your packages are up to date.'; then
  echo "Plexpy was updated; will restart the jail"
  iocage restart plexpy
else
  echo "Plexpy is up to date!"
fi


New to bash scripting so please let me know if you see an issue with the code. Thanks
 

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
I can't update my version of Radarr thru the GUI I get the error:
Code:
v0.2.0.910] System.Net.WebException: Error: SecureChannelFailure (The authentication or decryption has failed.) ---> System.IO.IOException: The authentication or decryption has failed.

I believe it's because I need to upgrade my version of mono currently at 5.2.0. something to do with the version of TLS
pkg update && pkg upgrade -y
doesn't do it. Any thoughts?
 
Joined
Jan 13, 2017
Messages
17
Got it working.


ifconfig bridge0 addm lagg0 up


Solved it for me. [edit]Without any other tunables.[/edit]

ifconfig of the working setup

lagg0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500

options=98<VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>

ether 00:1f:29:56:a4:4d

inet 10.10.10.13 netmask 0xffffff00 broadcast 10.10.10.255

nd6 options=9<PERFORMNUD,IFDISABLED>

media: Ethernet autoselect

status: active

groups: lagg

laggproto lacp lagghash l2,l3,l4

laggport: em1 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING>

laggport: em2 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING>

laggport: em3 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING>

laggport: em4 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING>

bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500

ether 02:dd:2e:0f:13:00

nd6 options=9<PERFORMNUD,IFDISABLED>

groups: bridge

id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15

maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200

root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0

member: lagg0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>

ifmaxaddr 0 port 7 priority 128 path cost 5000

member: vnet0:1 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>

ifmaxaddr 0 port 9 priority 128 path cost 2000

vnet0:1: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500

description: associated with jail: plex

options=8<VLAN_MTU>

ether 02:ff:60:14:fa:09

hwaddr 02:d9:50:00:09:0a

nd6 options=1<PERFORMNUD>

media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)

status: active

groups: epair


I had the same problem with lagg0. I was able to get it working with lagg0 when the system was up but it would not survive a reboot. I removed the aggregation and everything is working fine now. Does yours survive the reboot?
 

John Regan

Cadet
Joined
Sep 7, 2013
Messages
8
I just setup transmission and openvpn from the instructions and is working fine ....thanks Pentaflake and all that have added to them, but I have a couple of questions.

1) Surely where it says to copy the ipfw_rules, openvpn.conf and edit the settings.json this is wrong?

So /config is mounted to /mnt/tank1/apps/transmission:

Code:
iocage fstab -a transmission /mnt/tank1/apps/transmission /config nullfs rw 0 0


now told to:

"Create your Firewall rules using your favorite editor at /mnt/tank1/apps/transmission/config/ipfw_rules"

Surely this should be /mnt/tank1/apps/transmission/ipfw_rules or else in the jail you end up with a root/config/config directory ???

Same for openvpn.conf and settings.json?

2) Where do I add the preinit task? Is this in the Jail itself, there is an exec_prestart and exec_start there or is this under tasks -> init/shutdown scripts?

"If you are going to going to use the vpn, you will need add a preinit task in the webui to run the following command as well as run it once before you setup the jail. This adds a rule to the default devfs_ruleset applied to all iocage jails to allow them to access tun devices.
devfs rule -s 4 add path 'tun*' unhide"

Thanks
 
Joined
Jan 13, 2017
Messages
17
I came from rTorrent/ruTorrent and loved it. I then moved to Transmission because I'm new to FreeNAS which is horrible imho and completely unusable. The web interface is awful and it lacks TONS of functionality. I did some research based on the installs given here by Pentaflake and was able to get deluge working perfectly. Here is what I did (I kept the format the same as the resource article):

Code:
echo '{"pkgs":["deluge","ca_root_nss"]}' > /tmp/pkg.json
iocage create -n "deluge" -p /tmp/pkg.json -r 11.1-RELEASE ip4_addr="vnet0|<IP>/<MASK>" defaultrouter="<GATEWAY>" vnet="on" allow_raw_sockets="1" boot="on"
rm /tmp/pkg.json
iocage fstab -a deluge /mnt/tank1/apps/deluge /config nullfs rw 0 0
iocage fstab -a deluge /mnt/tank1/torrents /mnt/torrents nullfs rw 0 0
iocage exec deluge sysrc -f /etc/rc.conf deluged_enable="YES"
iocage exec deluge sysrc -f /etc/rc.conf deluged_user="nobody"
iocage exec deluge sysrc -f /etc/rc.conf deluged_confdir="/config"
iocage exec deluge sysrc -f /etc/rc.conf deluge_web_enable="YES"
iocage exec deluge sysrc -f /etc/rc.conf deluge_web_user="nobody"
iocage exec deluge sysrc -f /etc/rc.conf deluge_web_confdir="/config"
iocage exec deluge chown -R nobody:nobody /config
iocage exec deluge service deluged start
iocage exec deluge service deluge_web start

Deluge will be running on http://<IP>:8112


I hope this helps someone. Please let me know if anyone sees anything I could have done differently.
 
Last edited:
Top