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

tograf

Cadet
Joined
Jul 12, 2014
Messages
5

camilo suarez

Explorer
Joined
Feb 28, 2014
Messages
86
im planing to install plex soon, but im wondering what are the difference between one instalation method and the other.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Plex Plugin:
Simple
Updates take longer to install(>6hours)
Updates depend on someone making the port->pbi->plugin
can't install the plex pass version if you subscribe

Plex Port Install:
little more complex
you control the updates/you have to do them manually
you can install plex pass version if you want
updates only depend on someone making the port.
updates are fast to install(<1m)
 

hungarianhc

Patron
Joined
Mar 11, 2014
Messages
234
UPDATE: I got it working, but I'm not deleting my initial text, just to preserve the issue. Bottom line to fix... Once I moved the metadata to a new dataset, I had to make sure Plex was the owner of the dataset. I checked the box to update permissions recursively, and then I rebooted the jail, verified that the UIDs matched, etc, and then I tried again, and it worked. So... yeah... Permissions, permissions, permissions!

Hi everyone,

I'm wondering if I can get some help on this issue... I have my jails on a small SSD, and I just moved my Plex metadata over to its own dataset on my raid-z-2 pool. I moved the "Plex Media Server" directory inside of plexdata over to my new dataset. Then I created a symlink called "Plex Media Server" in the same location, and it references the new data. The issues comes now when I try to start up Plex...

Code:
root@Plex:/ # service plexmediaserver start                                 
install: mkdir /usr/local/plexdata/Plex Media Server: File exists           
Starting plexmediaserver.                                                   
root@Plex:/ # service plexmediaserver status                                
plexmediaserver is not running.                                             
root@Plex:/ #                                                               
                  


I would appreciate any help!
 
Last edited:

hungarianhc

Patron
Joined
Mar 11, 2014
Messages
234
Okay... new question... I have this thing rockin' now with my storage mounted in another ZFS dataset... all good... but when I made the initial install, I just did the standard plexmediaserver install. How do I migrate to the plexpass version?
 

mka

Contributor
Joined
Sep 26, 2013
Messages
107
Is it possible to downgrade to plex port 9.9.10 or 9.9.7? 9.9.12 keeps crashing even freshly installed while 9.9.7 run for months without a glitch.
 

hungarianhc

Patron
Joined
Mar 11, 2014
Messages
234
Is it possible to downgrade to plex port 9.9.10 or 9.9.7? 9.9.12 keeps crashing even freshly installed while 9.9.7 run for months without a glitch.
I've had some issues with the most recent build as well, but I don't believe it's actually crashing. If you use the shell to get into the jail, you can check by running the following:
Code:
service plexmediaserver_plexpass status

Get rid of the plexpass part if you're just using the standard build, but when I used the most recent Plex build, and I couldn't log in, and then I ran status, it said it was still running. I then issue the stop command, issued the start command, and then it was up and running again. So... I can't help you with downgrading, but I would be curious to know if Plex has actually *crashed* or if it's hanging. If it's hanging, don't terminate it... I wonder if there are some logs we can capture or something to send to the Plex folks so they can fix it up!
 

mka

Contributor
Joined
Sep 26, 2013
Messages
107
It has crashed numerous times (with signal 6... usually some sort of memory access error). And only the "Plex Media Server" did crash... the DLNA process did survive. I was using the pbi plugin before and did a restart every time the plex server went missing. After a few days I had time to checked the process list of that jail and about 20 Plex DLNA processes were running (one for every restart).
 

mka

Contributor
Joined
Sep 26, 2013
Messages
107
I did revert back to 9.9.7 by
  1. service plexmediaserver stop
  2. doing a make deinstall clean on the ports version from 9.9.12
  3. did download the Makefile, distinfo, pkg-plist from http://www.freshports.org/multimedia/plexmediaserver/ resp here: http://svnweb.freebsd.org/ports/head/multimedia/plexmediaserver/?pathrev=350372
  4. did another make all install
  5. service plexmediaserver start
And this version did not only survive the first 20min but ATM more than 24h... seems to be stable again. I didn't know what the problem with 9.9.12 was but I hope it will get fixed and I don't have to stick with 9.9.7 forever :)
 

camilo suarez

Explorer
Joined
Feb 28, 2014
Messages
86
Yesterday i updated my server to 9.2.17 and then updated the plex to the last version via de GUI and it only lasted like 10 minutes to do the update. how many files you got in plex that it takes hours to update via the GUI?
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
I wanted to throw a question out here about "portupgrade" and how it interacts with pkgng. My manual plex-pass update has quite working because I think it expects to be using the new package tool. I'm not sure if I need to update it or install it or what? Anyone else notice they can't update using portupgrade?

Code:
root@plexmediaserver:~ # cat plex-update.sh
#!/bin/sh

portsnap fetch update
portupgrade -ay
service plexmediaserver_plexpass restart


UPDATE:
Code:
===>  Checking if pkg already installed
pkg-static: PACKAGESITE in pkg.conf is no longer supported.  Convert to the new repository style.  See pkg.conf(5)
pkg-static: Cannot parse configuration file!
*** [check-already-installed] Error code 70

Stop in /usr/ports/ports-mgmt/pkg.
*** [/usr/ports/ports-mgmt/pkg/work/.install_done.pkg._usr_local] Error code 1

Stop in /usr/ports/ports-mgmt/pkg.
*** [pkg-depends] Error code 1

Stop in /usr/ports/security/ca_root_nss.
*** [stage] Error code 1

Stop in /usr/ports/security/ca_root_nss.
** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade20140917-84453-tojzsh env UPGRADE_TOOL=portupgrade UPGRADE_PORT=ca_root_nss-3.16.3 UPGRADE_PORT_VER=3.16.3 make

I think I started down the wrong path here. I think it is trying to build pkg and is failing during the update.
 

EvanVanVan

Patron
Joined
Feb 1, 2014
Messages
211
I'm having problems mounting my Media folder within Plex.

I added the storage to my jail:

Code:
Source: /mnt/volume1/Media
Destination: /media/Media (In shell beforehand I created the Media sub-folder with mkdir -m 777 Media)

But then, when I do:
Code:
ls -l /mnt (within the Plex Jail shell)

Returns: total 0

Code:
ls -l media

Returns: Total 35
drwxr-xr-x 265 1001 nogroup 265 Sep 26 07:14 Media


I tried to add "Media:*:1001:plex" to the bottom of the /etc/group file, with no success.

Any advice?

Thanks

Edit: Idk, exactly what I did, but it turns out I needed to do "Media:*:2004:plex" in my case, Since I guess my plex group had an id of 2004. Anyway it seems to be working now
 
Last edited:

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
you mounted it at /media not /mnt. so when you did ls /mnt of course it would return nothing since there is nothing there. You probably wanted to do ls /media/Media
 

TheDubiousDubber

Contributor
Joined
Sep 11, 2014
Messages
193
I'm trying to follow this guide I ran portsnap fetch extract, the screen starts rolling and is ended by:
Building new INDEX files... done. The following is a copy straight from the terminal running the following command in the guide:

root@plex:~ # cd /usr/ports/multimedia/plexmediaserver/ && make install clean
===> plexmediaserver-0.9.9.13.525_1 pkg(8) must be version 1.3.8 or greater, bu
t you have 1.2.7_2. You must upgrade the ports-mgmt/pkg port first.
*** [install] Error code 1

Stop in /usr/ports/multimedia/plexmediaserver.
root@plex:/usr/ports/multimedia/plexmediaserver #

As far as I can tell there is no update available. I tried installing port upgrade but I get a similar error:

===> portupgrade-2.4.12_2,2 pkg(8) must be version 1.3.8 or greater, but you ha
ve 1.2.7_2. You must upgrade the ports-mgmt/pkg port first.
*** [install] Error code 1

Stop in /usr/ports/ports-mgmt/portupgrade.
root@plex:/usr/ports/ports-mgmt/portupgrade #

I tried fetching an update and there are none available. I'm thoroughly lost.
 

mjws00

Guru
Joined
Jul 25, 2014
Messages
798
You need to rebuild pkg. The repository only has 1.3.7. If you build from source you'll have 1.3.8.

#make -C /usr/ports/ports-mgmt/pkg build deinstall install clean
 

EvanVanVan

Patron
Joined
Feb 1, 2014
Messages
211
I'm trying to follow this guide I ran portsnap fetch extract, the screen starts rolling and is ended by:
Building new INDEX files... done. The following is a copy straight from the terminal running the following command in the guide:

root@plex:~ # cd /usr/ports/multimedia/plexmediaserver/ && make install clean
===> plexmediaserver-0.9.9.13.525_1 pkg(8) must be version 1.3.8 or greater, bu
t you have 1.2.7_2. You must upgrade the ports-mgmt/pkg port first.
*** [install] Error code 1

Stop in /usr/ports/multimedia/plexmediaserver.
root@plex:/usr/ports/multimedia/plexmediaserver #

As far as I can tell there is no update available. I tried installing port upgrade but I get a similar error:

===> portupgrade-2.4.12_2,2 pkg(8) must be version 1.3.8 or greater, but you ha
ve 1.2.7_2. You must upgrade the ports-mgmt/pkg port first.
*** [install] Error code 1

Stop in /usr/ports/ports-mgmt/portupgrade.
root@plex:/usr/ports/ports-mgmt/portupgrade #

I tried fetching an update and there are none available. I'm thoroughly lost.

Or the other solution from the above poster's thread, https://forums.freenas.org/index.php?threads/installing-plex-in-a-jail.23678/ I followed dlavigne's post and got it working.
 

TheDubiousDubber

Contributor
Joined
Sep 11, 2014
Messages
193
You need to rebuild pkg. The repository only has 1.3.7. If you build from source you'll have 1.3.8.

#make -C /usr/ports/ports-mgmt/pkg build deinstall install clean

So I followed this and installed using the command given by the OP, only I appended '-plexpass' to install the plexpass version

Then I issued the echo command and then get the following when trying to start the service:

root@plex:~ # service plexmediaserver start
plexmediaserver does not exist in /etc/rc.d or the local startup
directories (/usr/local/etc/rc.d)
root@plex:~ #

I followed this guide to a t and for some reason I run into an issue at every step.
 

krikboh

Patron
Joined
Sep 21, 2013
Messages
209
You need to add plexpass to the service start command also.


Sent from my iPhone using Tapatalk
 

TheDubiousDubber

Contributor
Joined
Sep 11, 2014
Messages
193
do you append -plexpass to the echo command as well? I thought I tried all the iterations of -plexpass and omiting -plexpass but kept getting some errors about not finding /etc/r.d or whatever or something similar
 
Top