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

JJT211

Patron
Joined
Jul 4, 2014
Messages
323
I suspect that, at the end of the day, the issue is related to running Plex in a jail, but your media is actually outside of the jail. The mounts would need r/w access to be able to modify the original media files. You might try the Plex forum for more discussion about deleting media. Look for posts about running on Linux or FreeBSD.

But for my curiosity, why would you want to allow the Plex client to delete media? I manage my media from the same shares I use to upload.

Reason why? Convience. Sometimes the movies or Tv shows it auto downloads throuh Sonarr/Radarr are bad downloads for various reasons. And once I find its bad, its much easier to delete right away once its discovered. If I dont do it right then and there, Ill forget about it the next time i get to my PC.

Anyhoo, from the guide, below are the commands I used to mount my shares to jail
https://forums.freenas.org/index.ph...darr-lidarr-jackett-transmission-organizr.58/

Code:
iocage fstab -a plex /mnt/tank1/apps/plex /config nullfs rw 0 0
iocage fstab -a plex /mnt/tank1/video /mnt/video nullfs ro 0 0


In the first command I see the config is mounted "rw" but in the second the share is mounted "ro"

What does the "o" in "ro" mean? Shouldnt it be "rw" as well?
 

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
Really? ro means "read only". I would read up on 'iocage fstab' to learn what some of the commands are. You can edit the jail fstab to change the mount from read only to read-write. Although, I don't really know if that will allow you to delete from the Plex client, as I have never tried that feature.
 

anfieldroad

Dabbler
Joined
Dec 21, 2018
Messages
32
Followed these instructions - all I get is "Looking for servers"

No instructions I find for Plex on FreeNas work.
 

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
I know it can be frustrating. Most of the instructions posted on the forum for a manual install are more complicated than they need to be, involve extra steps which aren't necessary, or install extra software which isn't required. Of course, many of these folks are not trying to create a basic Plex install and their instructions are tailored to their systems - but if you don't understand each step in the process it is easy to get lost. I personally never use scripts posted on the forum unless I have read them carefully and understand each and every step.

First order of business: Please post your system specs and the version of FreeNAS you are running. Assuming that you are on FreeNAS 11.2, did you consider using the plugin? If not, then why not? To implement and maintain a manual install will require some understanding of FreeBSD commands and working at the command line.
 

anfieldroad

Dabbler
Joined
Dec 21, 2018
Messages
32
I am running FreeNAS 11.2
My configuration is a VLAN subnet 10.10.0.0/16 which has FreeNAS server on it and a virtual IP from FreeNAS for the Jail. I have been using the bridge0 interface to do my networking. The jail is confirmed to have full connectivity on my network.

I have tried using all of the following:
PlexMediaServer plugin
PlexMediaServer PlexPass
Manually Created Jail following the instructions provided in this thread.

I have set my AllowedNetworks to 0.0.0.0/0 or 0.0.0.0/0.0.0.0 or a list of network addresses including 127.0.0.1/32, 10,10.0.0/16 and various other VLANs that need access.

I have set the Allow.Raw_Sockets
I have sworn at this thing, I would kick it if I could. It is bloody useless.

What else can I try?

I had this working on 11.1 including do multicasting across subnets with two routers* and it WORKED but I did have an issue where scanning media was not working, I could scan all day long but it would not find media copied across using linux but would find media copied on windows, yeah weird I know... the linux ownerships were the plex user and group on the FreeNAS and global read permissions - 644 on all files, 755 on directories. Lesson of the day is don't mount the plex filesystem on my linux server which has the storage for my current plex media server on my network.

I really wish now I had not deleted that jail but created a new one instead and kept the old one for comparison of settings but it should be easy to do this!

* I plan to create a thread with instructions on how to do this! I have my first hop being a Cisco Layer3 3750G switch and my second hop being a linux router/server
 

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
What are your system specs? Installing Plex really isn't that difficult and I have to think that maybe the problem lies somewhere in your networking setup or permissions.

If your data is being stored on a Linux server, what are you using FreeNAS for?
 

anfieldroad

Dabbler
Joined
Dec 21, 2018
Messages
32
Its a Core i3 550 3.2GHz with 2 cores, 16GB RAM, dual HP 360T gigabit NIC plus onboard NIC.

The dual NIC is used for trunking vlans off my cisco switch, mostly backend storage networks for my Lab ESXi cluster. The onboard NIC is not VLAN trunked and is on my server management network - this is used for the web client access and the plex jail also has an IP on this network using bridge0 interface.

The IP for Plex is configured in DNS with forward and reverse zones, no DHCP is used and the default gateway is correctly specified.

Data is not stored on Linux, it's the NFS export of the volume used for plex mounted on my Linux server which is currently running my to-be-decommed plex once I sort this issue out. I mounted it so I could copy all the content across.
 

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
Well, you have a reasonably complicated network, and you are running FreNAS on old hardware. Lots of little things to go wrong. If it were me, I would put the FreenAS server into a simple network, then make certain everything is working properly. At least, this would allow you to determine if the problem is really with your FreeNAS installation, or somewhere else.
 

anfieldroad

Dabbler
Joined
Dec 21, 2018
Messages
32
1) It's hardly complicated, it's not a flat home-network-behind-a-consumer-router, granted, but it's hardly complicated. Lets be clear, it works for everything else I am doing, it worked for Plex on 11.1 before I updated my FreeNAS so we can rule the networking out - unless Plex 11.2 changed the way it is doing stuff.
2) Old hardware? It's not that old, and it's FreeNAS not Windows 10. I've got FreeNAS running happily on another 2RU server using old Celerons on a Tyan serverboard and Ultra320! Works fine! This particular system I am trying to run PMS on is a board and CPU from the last couple of years. It's NOT old hardware!

Can someone please provide some actual attempts to assist me in resolving this instead of just trying to blame my network or my hardware which worked fine on 11.1?
 

dtom10

Explorer
Joined
Oct 16, 2014
Messages
81
1) It's hardly complicated, it's not a flat home-network-behind-a-consumer-router, granted, but it's hardly complicated. Lets be clear, it works for everything else I am doing, it worked for Plex on 11.1 before I updated my FreeNAS so we can rule the networking out - unless Plex 11.2 changed the way it is doing stuff.
2) Old hardware? It's not that old, and it's FreeNAS not Windows 10. I've got FreeNAS running happily on another 2RU server using old Celerons on a Tyan serverboard and Ultra320! Works fine! This particular system I am trying to run PMS on is a board and CPU from the last couple of years. It's NOT old hardware!

Can someone please provide some actual attempts to assist me in resolving this instead of just trying to blame my network or my hardware which worked fine on 11.1?

Just improve on your contingency. Keep an old machine SW-ise around for redundancy. There's no one to keep your back but yourself.
 

anfieldroad

Dabbler
Joined
Dec 21, 2018
Messages
32
Just improve on your contingency. Keep an old machine SW-ise around for redundancy. There's no one to keep your back but yourself.

improve on contingency?

Again, I re-iterate - this was WORKING on 11.1 perfectly well. I only recreated the plex jail because I wanted a jail I could manage through the new interface. I am not exactly running a production environment supporting an enterprise environment, this is my low-priority storage NAS, it is used for user fileshares, media and backups in my household.

Now why is it nobody is giving me any suggestions on things to actually try to fix this issue and just giving me useless responses? Are there no actual experts on here?
 

dtom10

Explorer
Joined
Oct 16, 2014
Messages
81
I'm in your boat mate. Things that used to work do not anymore. It's the new wave of sprints and agiles that develop cancer in the end. It's ok, the contingency is that you keep an old machine running the year-old version which works. If it's not broken, don't fix it. That kind of dated mentality.
 
Last edited:

anfieldroad

Dabbler
Joined
Dec 21, 2018
Messages
32
I believe the contingency is to roll back to 11.1 somehow... let me guess, that means re-installing?
 

dtom10

Explorer
Joined
Oct 16, 2014
Messages
81
Yep, doing it as I type. Just detach those pools.
 

anfieldroad

Dabbler
Joined
Dec 21, 2018
Messages
32
I got it working, in the end it turned out just adding a single network to "allowedNetworks" solved it - it does not like wildcards, it does not like multiple entries such as:

allowedNetworks="10.20.0.0/16 10.30.0.0/16 192.168.50.0/24"
or
allowedNetworks="10.20.0.0/255.255.0.0 10.30.0.0/255.255.0.0 192.168.50.0/255.255.255.0"

Anyone had any success doing something like the above?
 

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
@anfieldroad and @dtom10
I don't think the snarky responses are warranted. Yes, it can be frustrating when things don't work as you want, but the experienced folks here are only trying to help - afterall, we can't see your screens and we can never know all the things you have done that can affect the performance of the system.

I got it working, in the end it turned out just adding a single network to "allowedNetworks" solved it - it does not like wildcards, it does not like multiple entries such as:

allowedNetworks="10.20.0.0/16 10.30.0.0/16 192.168.50.0/24"
or
allowedNetworks="10.20.0.0/255.255.0.0 10.30.0.0/255.255.0.0 192.168.50.0/255.255.255.0"

Anyone had any success doing something like the above?
In this case, the fix was a Plex server configuration parameter - not a FreeNAS installation problem. Which is why I had suggested that you put the Plex server on a simple network and make certain the problem really was with the Plex installation in FreeNAS and not somewhere else.

FYI - I believe the correct syntax for allowedNetworks when specifying multiple networks is to separate the networks with commas.

Glad you got it working.
 

dtom10

Explorer
Joined
Oct 16, 2014
Messages
81
Hi @pschatz100

I apologize for my lack of temper. I've been trying to consolidate&migrate some older hw running previous versions of Freenas (pre-11.2). I'm having all sorts of issues especially with VMs and jails not working anymore.

I'm currently trying to restore my previous level of functionality due to stuff not working as it used to.

I've been running Freenas for a good while now (5+ years) without this sort of issues. I realize it's a major upgrade but I'm working to address the teething pains now.

Regards and a Happy New Year!
 

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
Hi @pschatz100

I apologize for my lack of temper. I've been trying to consolidate&migrate some older hw running previous versions of Freenas (pre-11.2). I'm having all sorts of issues especially with VMs and jails not working any more.
I think existing jails should continue to work under newer versions of FreeNAS. If they are old warden jails, then you will have to log into the legacy user interface to see them via the GUI, but other than that they should still be good. However, since FreeBSD 11.1 has been EOL'd, you might not be able to run updates within older jails. This is not a fault of FreeNAS. I did not remove any old warden jails until I had new iocage replacements running as I liked. As long as you don't have networking conflicts, they should be OK.

As for VM's, I don't run any so I can't comment from personal experience. However, from comments posted here in the forum, some of the new tools for VM's require certain advanced instructions within the CPU that your core i3-550 may not support. If you are having difficulty creating VM's with the new tools, you might want to double check their hardware requirements.
 

dtom10

Explorer
Joined
Oct 16, 2014
Messages
81
Sorry for the interruption,

Didn't mean to highjack the thread, I have different pain points than OP.

I have opened my own thread about jails and soon I'll follow up with a VM related one if I don't get my stuff going.

Cheers for the kind attitude.
 

Mark_the_Red

Dabbler
Joined
May 3, 2017
Messages
28
I got it working, in the end it turned out just adding a single network to "allowedNetworks" solved it - it does not like wildcards, it does not like multiple entries such as:

allowedNetworks="10.20.0.0/16 10.30.0.0/16 192.168.50.0/24"
or
allowedNetworks="10.20.0.0/255.255.0.0 10.30.0.0/255.255.0.0 192.168.50.0/255.255.255.0"

Anyone had any success doing something like the above?

Unix-tard here. I am having the same problem. Where did you find the allowedNetworks option in Freenas? I looked at every option. I am stuck on the Plex can't find my server setting. My jail can ping / broadcast to the world. I tried all the other pointers in other threads,sshd tunnelling and still can't get my server to be located. I am so frustrated with this as my 11.1 Freenas worked perfectly on the same network and I have a ridiculously simple network. This has given me hope, but I cannot locate the allowedNetwork setting in Freenas. Is this only accessible from ssh? Appreciate the help.
 
Top