(Tutorial) How To Install Plex in a FreeNAS 11.2 Jail

OctaneZ

Dabbler
Joined
Aug 6, 2011
Messages
24
I was having too much trouble with the PBI, it kept failing, wouldn't upgrade. Tore it down built new plugin/pbi/jail for plex, and it didnt work again, (after 3 years of working, I know a lot is changing under the hood right now.

I have a new problem. My jail (standard) "Plex" seems to "move", it has been jls listed as 4,6, and now 9. The NIC also changes, and the route fails.

Here is rc.conf in "Plex" Jail:
Code:
portmap_enable="NO"
sshd_enable="NO"
sendmail_enable="NO"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
hostname="Plex"
devfs_enable="YES"
devfs_system_ruleset="devfsrules_common"
inet6_enable="YES"
ip6addrctl_enable="YES"
rtsold_enable="YES"
ifconfig_epair5b_ipv6="inet6 accept_rtadv auto_linklocal"
plexmediaserver_enable="YES"
ifndconfig_epair3b_ipv6="inet6 accept_rtadv auto_linklocal"
ifconfig_epair1b_ipv6="inet6 accept_rtadv auto_linklocal"


The IPv4 address is hardcoded to 192.168.0.60 and never changes across reboots or jail restarts.
Code:
root@Plex:~ # ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
        inet 127.0.0.1 netmask 0xff000000
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
epair1b: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=8<VLAN_MTU>
        ether 02:ff:b0:00:0a:0b
        inet 192.168.0.60 netmask 0xffffffff broadcast 192.168.0.60
        inet6 fe80::ff:b0ff:fe00:a0b%epair1b prefixlen 64 scopeid 0x2
        inet6 2604:xxxx:100f:xxxx:ff:xxxx:fe00:a0b prefixlen 64 autoconf
        nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
        media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
        status: active


ping fails: "55" is the FreeNAS server, "01" is the gateway.
Code:
root@Plex:~ # ping 192.168.0.55
PING 192.168.0.55 (192.168.0.55): 56 data bytes
ping: sendto: Network is unreachable
ping: sendto: Network is unreachable
^C
--- 192.168.0.55 ping statistics ---
2 packets transmitted, 0 packets received, 100.0% packet loss
root@Plex:~ # ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1): 56 data bytes
ping: sendto: Network is unreachable
ping: sendto: Network is unreachable
^C
--- 192.168.0.1 ping statistics ---
2 packets transmitted, 0 packets received, 100.0% packet loss


The routing table looks totally hosed, but at least it is using "epair1b":
Code:
root@Plex:~ # netstat -r
Routing tables

Internet:
Destination        Gateway            Flags      Netif Expire
localhost          link#1             UH          lo0
Plex               link#2             UHS         lo0
192.168.0.60/32    link#2             U       epair1b

Internet6:
Destination        Gateway            Flags      Netif Expire
::                 localhost          UGRS        lo0
default            fe80::d217:c2ff:fe UG      epair1b
localhost          link#1             UH          lo0
::ffff:0.0.0.0     localhost          UGRS        lo0
2604:6000:100f:803 link#2             U       epair1b
2604:6000:100f:803 link#2             UHS         lo0
fe80::             localhost          UGRS        lo0
fe80::%lo0         link#1             U           lo0
fe80::1%lo0        link#1             UHS         lo0
fe80::%epair1b     link#2             U       epair1b
fe80::ff:b0ff:fe00 link#2             UHS         lo0
ff01::%lo0         localhost          U           lo0
ff01::%epair1b     fe80::ff:b0ff:fe00 U       epair1b
ff02::             localhost          UGRS        lo0
ff02::%lo0         localhost          U           lo0
ff02::%epair1b     fe80::ff:b0ff:fe00 U       epair1b


I am also unable to ping it from the subnet. The GUI/login/jail all worked fine, I let it chug through 4+ TB of data and build the DB. Thoughts as to how to proceed? I may try switching off IPv6, but I am not sure why the jail is moving from 4, to 6, and currently 9, though it seems to be limited to those number right now.

Here is the current "jls" output:
Code:
[benc@freenas] /mnt/fourslot-data/benc# jls
   JID  IP Address      Hostname                      Path
     1  -               firefly_2                     /mnt/fourslot-data/jails/firefly_2
     3  -               s3cmd_1                       /mnt/fourslot-data/jails/s3cmd_1
     5  -               transmission_1                /mnt/fourslot-data/jails/transmission_1
     9  -               Plex                          /mnt/fourslot-data/jails/Plex


Current Train: FreeNAS-9.10-STABLE (...)
Update Server: http://update.freenas.org/FreeNAS
Freenas Build (Plex Jail Build the same):
Code:
# uname -a
FreeBSD freenas.local 10.3-STABLE FreeBSD 10.3-STABLE #0 455d13d(9.10-STABLE): Sun Jun 26 22:47:03 PDT 2016     root@build.ixsystems.com:/tank/home/nightlies/build-freenas9/_BE/objs/tank/home/nightlies/build-freenas9/_BE/trueos/sys/FreeNAS.amd64  amd64
 

OctaneZ

Dabbler
Joined
Aug 6, 2011
Messages
24
Well, after that very lengthy post, disabling IPv6 AND removing AUTOCONF, and removing IPv6 Gateway, and saving and restarting the jail, and it starts up!

it did "move" again:
Code:
benc@freenas] /mnt/fourslot-data/benc# jls
   JID  IP Address      Hostname                      Path
     1  -               firefly_2                     /mnt/fourslot-data/jails/firefly_2
     3  -               s3cmd_1                       /mnt/fourslot-data/jails/s3cmd_1
     5  -               transmission_1                /mnt/fourslot-data/jails/transmission_1
    10  192.168.0.60    Plex                          /mnt/fourslot-data/jails/Plex


--- update --- before posting
restarting the jail again, turned on IPv6 and hosed the route table and /etc/resolve.conf
I had to turn off IPv6 in Jails-->Configuration, and then it still hosed /etc/resolve.conf

it is now at jail slot 16. Put I can ping in and out, and fetch/curl/pkg! Though jls shows " - " as the IP again.

Hope this helps someone
 

OctaneZ

Dabbler
Joined
Aug 6, 2011
Messages
24
Okay, definitely a networking problem at this point, the web interface seems to be listening on a non-existent IPv6 autoconf.

root@Plex:~ # sockstat -4l
USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS
plex Plex DLNA 18764 13 udp4 *:1900 *:*
plex Plex DLNA 18764 16 tcp4 *:1949 *:*
plex Plex DLNA 18764 19 udp4 *:2632 *:*
plex Plex DLNA 18764 22 udp4 *:8706 *:*
plex Plex DLNA 18764 25 tcp4 *:32469 *:*
plex Plex DLNA 18764 28 udp4 *:21996 *:*
plex Plex DLNA 18764 31 udp4 *:17613 *:*
plex Plex DLNA 18764 62 udp4 *:55982 *:*
plex Plex Scrip 18736 5 tcp4 127.0.0.1:50257 *:*
plex Plex Media 18735 66 udp4 *:1901 *:*
plex Plex Media 18735 67 udp4 192.168.0.60:42997 *:*
plex Plex Media 18735 68 udp4 *:32414 *:*
plex Plex Media 18735 69 udp4 *:32410 *:*
plex Plex Media 18735 70 udp4 *:32412 *:*
plex Plex Media 18735 71 udp4 *:32413 *:*
plex Plex Media 18735 72 udp4 192.168.0.60:29274 *:*
plex Plex Media 18735 73 udp4 192.168.0.60:27489 *:*
root syslogd 10032 9 udp4 *:514 *:*

root@Plex:~ # sockstat -6l
USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS
plex Plex Media 18735 55 tcp6 *:32400 *:*
plex Plex Media 18735 56 tcp6 ::1:32401 *:*
root syslogd 10032 8 udp6 *:514 *:*

root@Plex:~ # sockstat -P tcp
USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS
plex Plex DLNA 18764 16 tcp4 *:1949 *:*
plex Plex DLNA 18764 25 tcp4 *:32469 *:*
plex Plex DLNA 18764 34 tcp4 192.168.0.60:23263 192.168.0.143:8008
plex Plex DLNA 18764 61 tcp4 127.0.0.1:25706 127.0.0.1:50257
plex Plex DLNA 18764 74 tcp4 127.0.0.1:19565 127.0.0.1:50257
plex Plex Scrip 18736 5 tcp4 127.0.0.1:50257 *:*
plex Plex Media 18735 55 tcp6 *:32400 *:*
plex Plex Media 18735 56 tcp6 ::1:32401 *:*
? ? ? ? tcp4 192.168.0.60:47422 172.217.3.4:80
? ? ? ? tcp4 192.168.0.60:11027 172.217.3.4:80
? ? ? ? tcp4 127.0.0.1:50257 127.0.0.1:25492
? ? ? ? tcp4 192.168.0.60:13817 172.217.3.4:80
? ? ? ? tcp4 127.0.0.1:50257 127.0.0.1:19565
? ? ? ? tcp4 127.0.0.1:50257 127.0.0.1:25706

root@Plex:~ # cat /etc/rc.conf
portmap_enable="NO"
sshd_enable="NO"
sendmail_enable="NO"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
hostname="Plex"
devfs_enable="YES"
devfs_system_ruleset="devfsrules_common"
inet6_enable="NO"
ip6addrctl_enable="NO"
rtsold_enable="YES"
plexmediaserver_enable="YES"

root@Plex:~ # ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
inet 127.0.0.1 netmask 0xff000000
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
epair0b: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8<VLAN_MTU>
ether 02:ff:b0:00:09:0b
inet 192.168.0.60 netmask 0xffffff00 broadcast 192.168.0.255
nd6 options=9<PERFORMNUD,IFDISABLED>
media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
status: active

Thoughts other than backup, tear down, new jail, migrate Plex data?
 

Drew Heath

Explorer
Joined
Mar 7, 2016
Messages
80
Has anyone seen issues trying to go to the latest version (1.1.0.2611)? When running the update/upgrade my system is showing that everything is up to date (1.0.3.2461).

Thank you in advance for any assistance.
 

EvanVanVan

Patron
Joined
Feb 1, 2014
Messages
211
Has anyone seen issues trying to go to the latest version (1.1.0.2611)? When running the update/upgrade my system is showing that everything is up to date (1.0.3.2461).

Thank you in advance for any assistance.

I believe the answer is, if you want the incremental updates immediately you have to update the old way and not via packages. Packages were much faster but I did like my immediate updates so I use the old instructions that are still on the Plex forums.
 

Drew Heath

Explorer
Joined
Mar 7, 2016
Messages
80
I believe the answer is, if you want the incremental updates immediately you have to update the old way and not via packages. Packages were much faster but I did like my immediate updates so I use the old instructions that are still on the Plex forums.
You wouldn't happen to have a link on the manual method would you? My BSD skills are limited.
 

EvanVanVan

Patron
Joined
Feb 1, 2014
Messages
211

GlassVial

Dabbler
Joined
Sep 25, 2016
Messages
16
About to pull my hair out here trying to update Plex:

> First off, stop Plex with the following command:
> service plexmediaserver stop

No problem here...but then:

> To actually update Plex, run the following command:
> pkg update && pkg upgrade multimedia/plexmediaserver

Fail: "pkg: multimedia/plexmediaserver is not installed, therefore upgrade is impossible"

I've tried other methods and they fail too, I'm at a total loss here. I'm not a Plexpass/Premium user so I'm not going to use that method or pkg, I'm also not a BSD Guru.

So, help, please?
 

adrianwi

Guru
Joined
Oct 15, 2013
Messages
1,231
I tend to just update the whole jail when I'm upgrading so run 'pkg update' and then 'pkg upgrade'.
 

Drew Heath

Explorer
Joined
Mar 7, 2016
Messages
80
About to pull my hair out here trying to update Plex:

> First off, stop Plex with the following command:
> service plexmediaserver stop

No problem here...but then:

> To actually update Plex, run the following command:
> pkg update && pkg upgrade multimedia/plexmediaserver

Fail: "pkg: multimedia/plexmediaserver is not installed, therefore upgrade is impossible"

I've tried other methods and they fail too, I'm at a total loss here. I'm not a Plexpass/Premium user so I'm not going to use that method or pkg, I'm also not a BSD Guru.

So, help, please?

After pkg update, run pkg upgrade plexmediaserver
 

Drew Heath

Explorer
Joined
Mar 7, 2016
Messages
80
Upgraded 20 pkg's, none of which were PMS. Tried both commands again after the pkg upgrade command and get the same error as above.
How did you originally install Plex? Did you use pkg?
 

Drew Heath

Explorer
Joined
Mar 7, 2016
Messages
80
This will not work in the plugin. You will need to wait until the plugin is updated. I switched to using a standard jail instead of the plugin because they take so long to update versions.
 

GlassVial

Dabbler
Joined
Sep 25, 2016
Messages
16
This will not work in the plugin. You will need to wait until the plugin is updated. I switched to using a standard jail instead of the plugin because they take so long to update versions.

I tried hitting the update button next to the plugin, that doesn't work, either. I guess I can just live with the older version.
 

Drew Heath

Explorer
Joined
Mar 7, 2016
Messages
80
I tried hitting the update button next to the plugin, that doesn't work, either. I guess I can just live with the older version.
I have never had issues with upgrading a plugin. Try restarting NAS and trying again. How comfortable are you with BSD? If you have a good understanding, running Plex in a standard jail is pretty straight forward.
 
Top