Help with Plex

Status
Not open for further replies.

LLeo

Dabbler
Joined
Jun 3, 2017
Messages
28
  • 1 - Connect to your FreeNAS Server via SSH or open the Shell via Web GUI
  • 2 - Type: jls and note the # of your Plex Media Server Jail
  • 3 - Type: jexec #jailnumber csh (for example: jexec 1 csh)
  • 4 - Type: fetch -o PMS_Updater.sh https://raw.githubusercontent.com/mstinaff/PMS_Updater/master/PMS_Updater.sh
  • 5 - Type: chmod 755 PMS_Updater.sh
  • 6 - Type: ./PMS_Updater.sh -vv -a
  • 7 - Done! You are on the newest version again
Thanks for the input. I've tried the same method from a different place but this is what I get:

[root@freenas ~]# jexec 1 csh
root@plexmediaserver_1:/ # fetch -o PMS_Updater.sh https://raw.githubusercontent.com/mstinaff/PMS_Updater/master/PMS_Updater.sh
PMS_Updater.sh 100% of 8818 B 4758 kBps 00m00s
root@plexmediaserver_1:/ # chmod 755 PMS_Updater.sh
chmod: PMS_Updater.sh: Operation not permitted

I did a copy/paste of yours just in case I mistyped on my try. Do I need to be in [user}@freenas instead of root maybe? I'm doing it from Shell fyi. This all started when I upped to 11 from 9.3. Plex was working fine before. Plex 11 installed the plugin 1.5.5 but when setting it up, I couldn't get to the root/media folders just /plex folders. So I checked Plex site and they showed a 1.7.x version so thought upgrading might help. So now I have two problems: I can't get to my previous Plex folders AND updating (as above) isn't happening. Any clues would be apreciated.
 

indivision

Guru
Joined
Jan 4, 2013
Messages
806
I had the same folder restriction that you describe. I got around it by pointing the storage connection to a folder within the area that it does give you. It's in "/var/db/..." or something right? Upgrading won't give you access to the root media folder.

Regarding the upgrade not happening, are you trying to revive an old install of Plex? Or, is your media in a separate volume?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
chmod: PMS_Updater.sh: Operation not permitted
You probably have Windows permissions on your jails dataset, which will break all kinds of things.
 

LLeo

Dabbler
Joined
Jun 3, 2017
Messages
28
Thanks for the reply. I'm about a month old in Freenas so my command line navigation is lacking. I'm learning slowly from a two month old Raspberry Pi experiment, too. Anyway, I had a fully working Freenas 9.3 with Plex working until I decided to upgrade to the 11 release a few days ago. Of course, it wiped out the "old" Plex. Previously, my Plex had been installed but not jailed if I'm saying it right and I could point to my regularly stored datasets without a problem, in other words I could navigate in Plex to "Add Folders" that weren't jailed. I noticed in 11 when I did install the "new" Plex, it automatically created the jail system which it didn't do in 9.3. The "new" Plex installs in a jail but when "Add Folder" in the Plex web interface it opens to /plex as root with all its folders but you can't navigate into the Freenas/root/media folders where the data is. The "old" Plex started in root so you could set the proper data folders just fine.

So as far as I know, I'm not reviving an old install. I basically started over with the Freenas 11 upgrade and "successfully" reinstalled a new Plex 1.5.5 which did so in a jail format which locked me out of the former process of adding folders from my root system. I'm running a simple file server noob build without the bells and whistles of VM's and multiple iterations. Just a home server (switched from Windows Home Server 2011) to store my files/media with a little redundancy for safety. I'm successfully dragging and dropping files from my Win10 box onto Freenas and then accessing them when needed again, so I've got the process down with permissions, SMB, etc. It's just the Plex thing recently bugging me. After moving GB's of media onto Freenas (normally replayed to TV through Roku with WHS2011) but NOW I can't access it in this "new" attempt in Plex.

Another suggestion was to manually type in the paths in Plex but that didn't work either. Don't mean to rant. My Win10 Plex does just fine . . . but 99% of my files are on Freenas now! Lol!
 

LLeo

Dabbler
Joined
Jun 3, 2017
Messages
28
You probably have Windows permissions on your jails dataset, which will break all kinds of things.
I noticed in another thread you were helping dreccy straighten out his Jail/Plex structures impressively while someone else was badgering him, I think. I'm new to this also so I have no idea how to fix "Windows permissions on your jails dataset." I'm going back to the other thread step by step with my folder structure using your hints to dreccy to see if that solves my Plex headache.Thanks.

Right now I have uninstalled Plex, Back to ground zero. Although there should be nothing in "jails", my directory shows root server folders of data, i.e., Pictures, Video, Audio, etc-- my stored data in separate folders on the root then also a "jails" directory with 3 .warden-template files. Question: Since Plex is gone now, should I delete that "jails" directory BEFORE I start following your instructions you gave to dreccy? Plex WAS the only jail. When I do attempt a Plex reinstall, those will rebuild , right?

Thanks s much for your patience!
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Thanks for the reply. I'm about a month old in Freenas so my command line navigation is lacking. I'm learning slowly from a two month old Raspberry Pi experiment, too. Anyway, I had a fully working Freenas 9.3 with Plex working until I decided to upgrade to the 11 release a few days ago. Of course, it wiped out the "old" Plex. Previously, my Plex had been installed but not jailed if I'm saying it right and I could point to my regularly stored datasets without a problem, in other words I could navigate in Plex to "Add Folders" that weren't jailed. I noticed in 11 when I did install the "new" Plex, it automatically created the jail system which it didn't do in 9.3. The "new" Plex installs in a jail but when "Add Folder" in the Plex web interface it opens to /plex as root with all its folders but you can't navigate into the Freenas/root/media folders where the data is. The "old" Plex started in root so you could set the proper data folders just fine.

So as far as I know, I'm not reviving an old install. I basically started over with the Freenas 11 upgrade and "successfully" reinstalled a new Plex 1.5.5 which did so in a jail format which locked me out of the former process of adding folders from my root system. I'm running a simple file server noob build without the bells and whistles of VM's and multiple iterations. Just a home server (switched from Windows Home Server 2011) to store my files/media with a little redundancy for safety. I'm successfully dragging and dropping files from my Win10 box onto Freenas and then accessing them when needed again, so I've got the process down with permissions, SMB, etc. It's just the Plex thing recently bugging me. After moving GB's of media onto Freenas (normally replayed to TV through Roku with WHS2011) but NOW I can't access it in this "new" attempt in Plex.

Another suggestion was to manually type in the paths in Plex but that didn't work either. Don't mean to rant. My Win10 Plex does just fine . . . but 99% of my files are on Freenas now! Lol!
Good information here. One thing that you should know is that jails will probably never work correctly after updating from major release to major release. So you went from freebsd 9.3 too freebsd 11, this has a abi change and causes userspace from older releases to not work. Now sometimes things will just keep humming along just fine because the change is minimal but it will always be broken. You will also notice that freebsd 9.3 is end of life so you no longer get package updates or security fixes, this is expected since you should be upgrading.

So best practices would be to rebuild your jails with each major release upgrade.

For the other topic of adding storage and selecting it in the Plex ui. Can you show a screen shot of the add media selection I'm Plex? I see a browser button and path that I can select and type in. You're saying this doesn't exist? I find this really hard to believe on a fresh install.

Sent from my Nexus 5X using Tapatalk
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
Can you show a screen shot of the add media selection I'm Plex?
Or better yet could someone like @Ericloewe split this off into it's own topic since it has nothing to do with the OP and will need to have some more troubleshooting done to figure it out.
 

indivision

Guru
Joined
Jan 4, 2013
Messages
806
The "new" Plex installs in a jail but when "Add Folder" in the Plex web interface it opens to /plex as root with all its folders but you can't navigate into the Freenas/root/media folders where the data is. The "old" Plex started in root so you could set the proper data folders just fine.

Yes. As noted before, this is some kind of change that I also saw.

Older versions of the Plex plugin gave the Plex app access to root. So, you could add that "media" folder. But, newer versions of the plugin give you access to some other folder and you can't reach that root folder.

But, you don't need to use that root media folder to accomplish your goals. Start up the jail. Open the cli for the jail (not the main freenas shell). Navigate to the folder that Plex DOES have access to and make a new folder there for your media (something like "mkdir media"). Then, in FreeNAS, add storage in the jails section and point your media volume at the new directory you just created. Now, you should have a directory that Plex can reach that contains all of your files.

All that said, from reading your posts, it sounds like there could be something more going on here. Did you somehow put your media files directly into the old Plex jail? Instead of a separate volume?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
But, newer versions of the plugin give you access to some other folder and you can't reach that root folder.
You can't reach the root folder from the GUI browser (and I agree that's odd), but nothing stops you from simply typing in /media/tv (or whatever) for the path.
 

indivision

Guru
Joined
Jan 4, 2013
Messages
806
Hm. I believe I tried that and it wouldn't save. Using the new location wasn't difficult and I'm assuming there could be some security reason to stay there anyway.
 

LLeo

Dabbler
Joined
Jun 3, 2017
Messages
28
The last person I discussed this with was SweetAndLow. It was late and time for bed. And a couple of other people also commented so I'll post this for everyone because all comments were helpful. I was in the process this evening of taking screenshots as S&L suggested AFTER I did the reinstall of Plex from the plugin menu. I started the "let me try this first" method for Add Folder with the same result of the "/plex" dead end. I mounted and unmounted my "movies" in different places, finally getting to the source/destination in Plex but still couldn't accomplish what danb35 suggested. But I thought about it a little and it dawned on me the path was incorrect . . . maybe. In the Plex "dead end" window I typed /jails/mnt/media/movies and voila! I now have MOVIES working!

At work this happens all the time. Someone yells "Help!" but when I walk in the room suddenly the computer problems just vanish! So I go to the Freenas forums and you guys do the same for me! Lol! Y'all are an inspiration. Just your little nudges pushed me along enough! Thanks so much. If anyone wants a deeper explanation of the process, I'll oblige. It may be a software glitch in Plex but many other sources I read settled on "We'll just have to wait until Plex fixes it!" Now you don't have to wait.

Thanks so much, folks! Now on to build my other folders in Plex!
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
The last person I discussed this with was SweetAndLow. It was late and time for bed. And a couple of other people also commented so I'll post this for everyone because all comments were helpful. I was in the process this evening of taking screenshots as S&L suggested AFTER I did the reinstall of Plex from the plugin menu. I started the "let me try this first" method for Add Folder with the same result of the "/plex" dead end. I mounted and unmounted my "movies" in different places, finally getting to the source/destination in Plex but still couldn't accomplish what danb35 suggested. But I thought about it a little and it dawned on me the path was incorrect . . . maybe. In the Plex "dead end" window I typed /jails/mnt/media/movies and voila! I now have MOVIES working!

At work this happens all the time. Someone yells "Help!" but when I walk in the room suddenly the computer problems just vanish! So I go to the Freenas forums and you guys do the same for me! Lol! Y'all are an inspiration. Just your little nudges pushed me along enough! Thanks so much. If anyone wants a deeper explanation of the process, I'll oblige. It may be a software glitch in Plex but many other sources I read settled on "We'll just have to wait until Plex fixes it!" Now you don't have to wait.

Thanks so much, folks! Now on to build my other folders in Plex!
That is an incorrect path. You should never mount a path or store data inside the jail dataset.

Sent from my Nexus 5X using Tapatalk
 
Status
Not open for further replies.
Top