Resource icon

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

Wolfeman0101

Patron
Joined
Jun 14, 2012
Messages
428
Thanks for the help so far @Pentaflake !
It seems I've run into another snag. I just couldn't get the sonarr install to work. I kept getting errors. Now I know it's not supposed to work like this, but I decided to reboot my FreeNAS and try again.
Aaaand now none of the iocage-built instances have network access outside their jails. The SABNZBD jail works fine but the Plex, PlexPy and Organizr ones I've set up cannot.

Looking at the result of iocage get all plexpass, everything seems to be as it should (I think):
Code:
defaultrouter:192.168.1.1
host_hostname:plexpass
interfaces:vnet0:bridge0
ip4:new
ip4_addr:vnet0|192.168.1.120/24
ip4_saddrsel:1


In each cage the /etc/resolv.conf looks fine, with the DNS servers showing up (oddly, the gateway is last on the list, but putting it at the top didn't resolve anything).

But still, the instances can't see outside the network, with any ping showing
Code:
root@plexpass:~ # ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
ping: sendto: No route to host
ping: sendto: No route to host
ping: sendto: No route to host


Traceroute shows
Code:
no route to host 
as well.

Is there something I need to do to kickstart the networking for the iocage instances?
Thanks for the help so far @Pentaflake !
It seems I've run into another snag. I just couldn't get the sonarr install to work. I kept getting errors. Now I know it's not supposed to work like this, but I decided to reboot my FreeNAS and try again.
Aaaand now none of the iocage-built instances have network access outside their jails. The SABNZBD jail works fine but the Plex, PlexPy and Organizr ones I've set up cannot.

Looking at the result of iocage get all plexpass, everything seems to be as it should (I think):
Code:
defaultrouter:192.168.1.1
host_hostname:plexpass
interfaces:vnet0:bridge0
ip4:new
ip4_addr:vnet0|192.168.1.120/24
ip4_saddrsel:1


In each cage the /etc/resolv.conf looks fine, with the DNS servers showing up (oddly, the gateway is last on the list, but putting it at the top didn't resolve anything).

But still, the instances can't see outside the network, with any ping showing
Code:
root@plexpass:~ # ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
ping: sendto: No route to host
ping: sendto: No route to host
ping: sendto: No route to host


Traceroute shows
Code:
no route to host 
as well.

Is there something I need to do to kickstart the networking for the iocage instances?
Seems like there are some bugs with iocage. Adding these lines to the tuneables fixed it for me.

https://forums.freenas.org/index.php?threads/iocage-vnet0-and-bridge0.59964/
 

JonM

Dabbler
Joined
Mar 29, 2017
Messages
19
Yeah I had to downgrade sqlite3 before Radarr would start.

How did you do this? using pkg? I'm having the same issue with plexpy now but can't figure how to go back to the version of sqlite that works.

Many thanks!
 

usergiven

Dabbler
Joined
Jul 15, 2015
Messages
49
Thanks for setting up this thread! On 11.1, I get this error when trying to get plexpass up and running:
Code:
root@freenasmini:~ # iocage create -n "plex" -p /tmp/pkg.json -r 11.1-RELEASE ip4_addr="vnet0|192.168.1.28/24" 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

Command run: drill _http._tcp.pkg.freebsd.org SRV

***So I ran the command***

root@freenasmini:~ # drill _http._tcp.pkg.freebsd.org SRV
;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 7863
;; flags: qr rd ra ; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;; _http._tcp.pkg.freebsd.org.  IN	  SRV

;; ANSWER SECTION:
_http._tcp.pkg.freebsd.org.	 299	 IN	  SRV	 10 10 80 pkgmir.geo.freebsd.org.
_http._tcp.pkg.freebsd.org.	 299	 IN	  SRV	 50 10 80 pkg0.nyi.freebsd.org.
_http._tcp.pkg.freebsd.org.	 299	 IN	  SRV	 50 10 80 pkg0.bme.freebsd.org.
_http._tcp.pkg.freebsd.org.	 299	 IN	  SRV	 50 10 80 pkg0.isc.freebsd.org.

;; AUTHORITY SECTION:

;; ADDITIONAL SECTION:

;; Query time: 151 msec
;; SERVER: 8.8.4.4
;; WHEN: Sat Dec 30 11:50:18 2017
;; MSG SIZE  rcvd: 206

I'm not sure what I'm looking at but it seems to have queried once, got responses so there's not an error? If I continue the process of setting up the jail, I run into a lot of other issues so I'm thinking the error creating the socket is the deal. Anyone run into this before?
 

Pentaflake

Explorer
Joined
Jul 8, 2014
Messages
91
Thanks for setting up this thread! On 11.1, I get this error when trying to get plexpass up and running:
Code:
root@freenasmini:~ # iocage create -n "plex" -p /tmp/pkg.json -r 11.1-RELEASE ip4_addr="vnet0|192.168.1.28/24" 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

Command run: drill _http._tcp.pkg.freebsd.org SRV

***So I ran the command***

root@freenasmini:~ # drill _http._tcp.pkg.freebsd.org SRV
;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 7863
;; flags: qr rd ra ; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;; _http._tcp.pkg.freebsd.org.  IN	  SRV

;; ANSWER SECTION:
_http._tcp.pkg.freebsd.org.	 299	 IN	  SRV	 10 10 80 pkgmir.geo.freebsd.org.
_http._tcp.pkg.freebsd.org.	 299	 IN	  SRV	 50 10 80 pkg0.nyi.freebsd.org.
_http._tcp.pkg.freebsd.org.	 299	 IN	  SRV	 50 10 80 pkg0.bme.freebsd.org.
_http._tcp.pkg.freebsd.org.	 299	 IN	  SRV	 50 10 80 pkg0.isc.freebsd.org.

;; AUTHORITY SECTION:

;; ADDITIONAL SECTION:

;; Query time: 151 msec
;; SERVER: 8.8.4.4
;; WHEN: Sat Dec 30 11:50:18 2017
;; MSG SIZE  rcvd: 206

I'm not sure what I'm looking at but it seems to have queried once, got responses so there's not an error? If I continue the process of setting up the jail, I run into a lot of other issues so I'm thinking the error creating the socket is the deal. Anyone run into this before?

It looks like your jail doesn't have proper networking as it can't complete a dns lookup required to install packages during jail setup. It would work fine from your host as that has access to the internet. You could try the steps in https://forums.freenas.org/index.php?threads/iocage-vnet0-and-bridge0.59964/ with the correct interface names for your setup.
 

fixer

Cadet
Joined
Dec 23, 2017
Messages
5
Hello, folks. I made a similar setup for Medusa using INCSlayer's steps from here.

Medusa
Code:
echo '{"pkgs":["python27","py27-sqlite3","unrar","git","openssl","ca_root_nss"]}' > /tmp/pkg.json
iocage create -n "medusa" -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 medusa /mnt/tank1/apps/medusa /config nullfs rw 0 0
iocage fstab -a medusa /mnt/tank1/torrents /mnt/torrents nullfs rw 0 0
iocage fstab -a medusa /mnt/tank1/video /mnt/video nullfs rw 0 0
iocage exec medusa "git clone https://github.com/pymedusa/Medusa.git /usr/local/medusa"
iocage exec medusa "cp /usr/local/medusa/runscripts/init.freebsd /usr/local/etc/rc.d/medusa"
iocage exec medusa "chmod 755 /usr/local/etc/rc.d/medusa"
iocage exec medusa "pw user add medusa -c medusa -u 372 -d /nonexistent -s /usr/bin/nologin"
iocage exec medusa "chown -Rf medusa:medusa /usr/local/medusa"
iocage exec medusa "sysrc "medusa_enable=YES""
iocage exec medusa sysrc "medusa_datadir=/config"
iocage exec medusa chown -Rf medusa:medusa /usr/local/medusa /config
iocage exec medusa "service medusa start"

Medusa should be available at http://<JailIP>:8081
 

Pentaflake

Explorer
Joined
Jul 8, 2014
Messages
91
@Wolfeman0101 check your /etc/pkg/FreeBSD.conf in the Plexpass cage. In my cage I noticed the updates were set to quarterly instead of latest. When I changed that and did a pkg upgrade I got the build that matched Freshports.

Even with FreshPorts having the latest version (1.11.0.4666) pkg using the latest repo does not. Your likely still going to see delays using that like we had seen before on 11.0. EDIT: it looks like they are getting updates up in less then 24 hours to the latest repo for plex added optional steps to the guide
Code:
root@test-plex:~ # cat /usr/local/etc/pkg/repos/FreeBSD.conf
FreeBSD: {
    url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest"
}
root@test-plex:~ # pkg update
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
root@test-plex:~ # pkg search plexmediaserver-plexpass
plexmediaserver-plexpass-1.11.0.4633 Plex Media Server component

It is bad practice by the way to make changes to /etc/pkg/FreeBSD.conf. You should create a FreeBSD.conf at /usr/local/etc/pkg/repos/ if you want to use the latest repo instead.
mkdir -p /usr/local/etc/pkg/repos
vi /usr/local/etc/pkg/repos/FreeBSD.conf

Code:
FreeBSD: {
    url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest"
}
 
Last edited:

usergiven

Dabbler
Joined
Jul 15, 2015
Messages
49
It looks like your jail doesn't have proper networking as it can't complete a dns lookup required to install packages during jail setup. It would work fine from your host as that has access to the internet. You could try the steps in https://forums.freenas.org/index.php?threads/iocage-vnet0-and-bridge0.59964/ with the correct interface names for your setup.
Thank you kindly, needed to remember that even though iocage commands can be run outside the jail you still have an isolated space. That thread was helpful, to others who maybe running oldschool jails who are having trouble with the bridge0, I already had bridge0 because of old jails and needed to focus on bridge1 for iocage. Working perfectly now.
 

itsryan

Dabbler
Joined
Jan 11, 2017
Messages
20
Since I was getting messages saying my plex media server was out of date I found a way to update plex.
Code:
Login to SSH or Shell (up to you)
iocage console plex
ee /etc/pkg/FreeBSD.conf

Change quarterly to latest
url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest"

ESC 
leave editor
save changes

service plexmediaserver_plexpass restart
(I have plexpass and I forgot to turn off the server before updating but it all worked in the end)


As far as i know if their is any other jails that wont update this trick should fix it.

Source https://forums.freenas.org/index.ph...age-style-plugins-pkg-repo.55225/#post-385472 and https://forums.freenas.org/index.ph...age-style-plugins-pkg-repo.55225/#post-427542
 

Pentaflake

Explorer
Joined
Jul 8, 2014
Messages
91
Since I was getting messages saying my plex media server was out of date I found a way to update plex.
Code:
Login to SSH or Shell (up to you)
iocage console plex
ee /etc/pkg/FreeBSD.conf

Change quarterly to latest
url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest"

ESC 
leave editor
save changes

service plexmediaserver_plexpass restart
(I have plexpass and I forgot to turn off the server before updating but it all worked in the end)


As far as i know if their is any other jails that wont update this trick should fix it.

Source https://forums.freenas.org/index.ph...age-style-plugins-pkg-repo.55225/#post-385472 and https://forums.freenas.org/index.ph...age-style-plugins-pkg-repo.55225/#post-427542

It is bad practice to make changes to /etc/pkg/FreeBSD.conf. You should create a FreeBSD.conf at /usr/local/etc/pkg/repos/ if you want to use the latest repo instead.
mkdir -p /usr/local/etc/pkg/repos
vi /usr/local/etc/pkg/repos/FreeBSD.conf

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

The guide was just updated to include that a few minutes ago now that I saw it worked with the recent update in less then 24hours.
 

cpts

Dabbler
Joined
Aug 9, 2011
Messages
22
It is bad practice to make changes to /etc/pkg/FreeBSD.conf. You should create a FreeBSD.conf at /usr/local/etc/pkg/repos/ if you want to use the latest repo instead.
mkdir -p /usr/local/etc/pkg/repos
vi /usr/local/etc/pkg/repos/FreeBSD.conf

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

The guide was just updated to include that a few minutes ago now that I saw it worked with the recent update in less then 24hours.

I've done the following:

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

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


And I'm stuck at version 1.9.2.4285 (on plexpass). Should I edit the /etc/pkg/FreeBSD.conf instead?
 

Pentaflake

Explorer
Joined
Jul 8, 2014
Messages
91
I've done the following:

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

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


And I'm stuck at version 1.9.2.4285 (on plexpass). Should I edit the /etc/pkg/FreeBSD.conf instead?

Did you run a pkg update and a pkg upgrade?
 

Wolfeman0101

Patron
Joined
Jun 14, 2012
Messages
428
Followed the steps for Jackett and I'm not able to start it.

root@Packers:~ # iocage exec jackett service jackett restart
jackett not running?
Starting jackett.
Unmatched '"'.
Unmatched '"'.
/usr/local/etc/rc.d/jackett: WARNING: failed to start jackett
True
root@Packers:~ #
 

Patrick1227

Cadet
Joined
Apr 1, 2017
Messages
5
Followed the steps for Jackett and I'm not able to start it.

root@Packers:~ # iocage exec jackett service jackett restart
jackett not running?
Starting jackett.
Unmatched '"'.
Unmatched '"'.
/usr/local/etc/rc.d/jackett: WARNING: failed to start jackett
True
root@Packers:~ #
I had the same problem. Either one of your “‘s are not right or are missing. When I had that issue one of mine were upside down


Sent from my iPhone using Tapatalk
 

fixer

Cadet
Joined
Dec 23, 2017
Messages
5
After restarting FreeNAS server I cannot connect to any of the created iocage jails. Did anyone experience anything like that?
 

usergiven

Dabbler
Joined
Jul 15, 2015
Messages
49
After restarting FreeNAS server I cannot connect to any of the created iocage jails. Did anyone experience anything like that?
When you say cannot connect do you mean that you can't access your jails via command line or the plugins aren't loading when you type in the correct address?
 

Wolfeman0101

Patron
Joined
Jun 14, 2012
Messages
428
I had the same problem. Either one of your “‘s are not right or are missing. When I had that issue one of mine were upside down


Sent from my iPhone using Tapatalk
I copied and pasted from the guide. I checked it and I'm not seeing any missing.
 
Top