FreeNAS 11.3 - Iocage Upgrade Killed PMS Server Settings

Server Version#: Freenas 11.3-U1
Player Version#: PlexMediaServer-1.18.8.2527-740d4c206-FreeBSD-amd64

I updated FreeNAS from 11.2 train to 11.3 as well as iocage from 11.2 to 11.3.

I was able to manually update PMS fine in FreeNAS 11.2 using WinSCP but its directory changed in 11.3.

Fine, no biggy I find its location and was unable to update manually the same way. However, after the iocage update I would bet that I tried 31 times to no avail. Well, for one reason or antoher the 32nd time worked but now not only have I lost web GUI access to all of my server settings PMS also no longer retrieves any metadata either. Movies on the server from a certain date back are OK but movies added since have no metadata other than file name.

I was worried about those accessing it remotely but it appears to work fine.

Any help on how to correct this?

Is VNET maybe disabled after the jail upgrade?

1 Like

I think that if VNET was disabled the jail would not run at all.

In fact I just opened the jail itself and can see that VNET is ticked. If I untick the box a red prompt pops up stating that it is required.

Sorry for speaking if I am speaking in lay terms, I’m not the brightest when it comes to FreeBSD despite running Freenas for a few years for JBOD and Plex

That’s not true, jails can’t work without vnet, for PMS that is a requirement, but if you created the jail manually it would let you unset it, or not even set it to begin with!

The plugin however does it for you!

If vnet is enabled this could be permissions too!

I was able to manually update PMS fine in FreeNAS 11.2 using WinSCP but its directory changed in 11.3.

Why/How did you update using WinSCP? The standard way to update is via the plugin it self, or using pkg install/upgrade/using the ports system inside a jail shell.

If you mean you copied over files over scp that wouldn’t be a proper way to upgrade and surely lead to problems, and also make it harder to help now :smiley:

So lets start with the basics, if PMS starts you at least have that data(I mean the pms data not media) still in the same place and the binaries/rc.d script still work!

So its likely just a corrupt installation, to confirm we can try a few cmds:

  1. Open a SHELL in the JAIL!
  2. run pkg info |grep plex

Post the output here.

1 Like

Thank you for making this simple for me. You were right, it is a user error and is permissions.

pkg: /var/db/pkg permissions (0775) too lax

Any tips on how to how to revert it back to 755?

its the opposite its telling you its “755” and shouldn’t! The problem is if stuff like this has borken perms this jail might be busted in more places! I would honestly start a new one, but lets fix the perms there so I can help with backup/move over to new jail!

chown -R root:wheel /var/db/pkg
chmod -R 700 /var/db/pkg
pkg info|grep plex
1 Like

plexmediaserver-plexpass-1.18.3.2129 Plex Media Server component

Ran a package upgrade in the jail and says all is up to date.

I rebooted FreeNAS and opened Plex to see that I still have no access to server settings and no new metadata, even with a refresh.

Yeah this wouldn’t fix it we are just checking the system for now!

You won’t see an upgrade if you’re not using the “latest” channel for pkgng!

You can do that by editing /etc/pkg/FreeBSD.conf OR even better create this file /usr/local/etc/pkg/repos/FreeBSD.conf

With this contents:

FreeBSD: {
  url: "http://pkg.FreeBSD.org/${ABI}/latest",
  mirror_type: "srv",
  enabled: "yes"
}

Then: pkg update; pkg upgrade

1 Like

Sorry, I cannot figure out how to use the code boxes.

You can do that by editing /etc/pkg/FreeBSD.conf OR even better create this file /usr/local/etc/pkg/repos/FreeBSD.conf

Both of these files already existed, so I edited them using the code above.

I then ran pkg update; pkg upgrade

Here is a screenshot of shell:

hum this jail was created from the pluign so its pointing to other repos!

Btw a few tricks:
for code here wrap up lines on ` or for multiline ``` of those before 1st line and after first line.

EX: line

multiline

To enter a jail shell with iocage you can just use the ui option (in the jail) or from the host shell run:
iocage console JAIL_NAME

As for the main issue if you want to stay up to date with pkgng/ports and avoid potentials future issues form the existing setup I would just create a new “CUSTOM JAIL” and update the repo file I mentioned!

However if you’re not to familiar with all this its best to stick with the plugin and the standard update method!

Thank you for your help.

Yes, this was created using the plugin but after the FreeNAS and iocage upgrades my Plex has never been the same. I am unsure I can keep using it like this is no metadata updates, forced or not.

It appears that I either nuke my jail and Plex install or just walk away from Plex Lifetime.

I will look into building a custom jail but yes I am unfamiliar with most of this but willing to try.

Don’t nuke it yet! this is what I would do in you’re position, and if I want to get updates as soon as they are available on ports/freebsd repos (NOTE: It can still take a bit from the type they are published by us; but this is similar with many vendors; and shouldn’t take to much anyway).

  1. Stop the current jail/plugin ; DO NOT NUKE IT!

  2. Create a new jail but manually (make sure VNET/DHCP is enabled)

  3. Enter the jail shell:

  4. Create the /usr/local/etc/pkg/repos/FreeBSD.conf has before (don’t edit the /etc/ one since this is lost on jail upgrades; this is why FreeBSD is smart and lets you override on /usr/local

  5. pkg update -f

  6. pkg install plexmediaserver OR -plexpass (there’s actually no difference in plexpass status here and they shouldn’t provide both but if you want the beta builds go for plexmediaserver-plexpass

  7. `sysrc plexmediaserver-plexpass_enabled=“YES” (PMS will now always start with the jail)

  8. DON’T start PMS yet!

  9. Go to the HOST shell!

  10. jls(to get the path to jails, but in the screenshot above looks like /mnt/FreeNAS/iocage/jails/)

  11. note the path to the new jail too

  12. mv /mnt/FreeNAS/iocage/jails/plexmediaserver-plexpass/root/usr/local/plexdata-plexpass /mnt/FreeNAS/iocage/jails/NEW_JAIL_NAME/root/usr/local/

now you can just restart the new jail or open a shell to it again and:
service plexmediaserver-plexpass start

If you do this you will have a new clean instlal env, but also move all you’re data over from the old one :slight_smile:

Mike, first off, thank you for being so accessible. I really like Plex a lot and I appreciate you and your availability and willingness to help.

I have a few simple questions as I read through your instructions.

  1. When I create a new jail since “plexmediaserver-plexpass” is taken does it matter what I call it? I can change the name later, correct?

  2. When you say " Create the /usr/local/etc/pkg/repos/FreeBSD.conf as before (don’t edit the /etc/ one since this is lost on jail upgrades; this is why FreeBSD is smart and lets you override on /usr/local:"

How exactly I do that? Can I copy the one in the old jail using WinSCP since it does is what I need? I think that I know you will say to use shell but I need my handheld a little more than normal BSD users. Sorry, for not knowing much.

  1. Once I have this manually created jail up and running how do I keep it updated with the newer version of Plex?

I cannot wait to get this all resolved. I use Plex every single day to play my live concert recordings during the daytime and movies at night.

Thank you again!

Keith

Nope and yes you can rename but I would just call it “plex”

I assumed you’d be familiar with shell commands, my bad. there’s actually instructions for that in the orginal file, but here it goes:
mkdir -p /usr/local/etc/pkg/repos
echo 'FreeBSD: { url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest" }' > /usr/local/etc/pkg/repos/FreeBSD.conf

Just the url should do!

simple, run pkg upgrade

When I try and move I am told that /mnt/FreeNAS/iocage/jails/plexmediaserver-plexpass/root/usr/local/plexdata-plexpass
is not a directory that exists.

I do have /mnt/FreeNAS/iocage/jails/plexmediaserver-plexpass/root/usr/local/share/plexmediaserver-plexpass
in my old jail but do not see one that says plexdata-plexpass specifically.

Is that the one I should move?

No that’s the install dir!

What’s the output of:
ls -l /mnt/FreeNAS/iocage/jails/plexmediaserver-plexpass/root/usr/local/

root@freenas:~ # ls -l /mnt/FreeNAS/iocage/jails/plexmediaserver-plexpass/root/usr/local/
total 125
drwxr-xr-x   2 root  wheel   60 Mar 19 17:37 bin
drwxr-xr-x   8 root  wheel   14 Mar 19 17:37 etc
drwxr-xr-x  45 root  wheel  109 Mar 19 17:37 include
drwxr-xr-x  10 root  wheel  470 Mar 19 17:37 lib
drwxr-xr-x   3 root  wheel    3 Mar 19 17:37 libdata
drwxr-xr-x   3 root  wheel    3 Mar 19 17:37 libexec
drwxr-xr-x   7 root  wheel    8 Mar 19 17:37 man
drwxr-xr-x   2 root  wheel    4 Mar 19 17:37 openssl
drwxr-xr-x   2 root  wheel    6 Mar 19 17:37 sbin
drwxr-xr-x  21 root  wheel   21 Mar 19 17:37 share
drwxr-xr-x   4 root  wheel    4 Mar 19 17:37 var

oh I suppose that’s still the old style…

In the old jail can you?
cat /etc/rc.conf |grep plex

or from the host:
cat /mnt/FreeNAS/iocage/jails/plexmediaserver-plexpass/root/etc/rc.conf |grep plex

It is the same result from both

hostname="plex-plexpass"
plexmediaserver_plexpass_enable="YES"
plexmediaserver_plexpass_support_path="/"

“/”? wth… but ok!

lets try:
ls -lah /mnt/FreeNAS/iocage/jails/plexmediaserver-plexpass/root/