Updated my plex plugin - here's how

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
I got my Plex Media Server plugin updated. This wasn't entirely intuitive, so here's the process I followed.

https://www.ixsystems.com/blog/december-freenas-plugins-updates/ is the blog post that mentions update from CLI.

Update March 2020: The jail name seems to be incidental, it's the plugin name that matters. Ignore the original post, which applied to 11.2 only. If you're creating the plugin in 11.3-U1 or later, you'll be fine.

If it was created before that, you should be able to 'iocage set plugin_name="plexmediaserver" plex_jail_name' or, of course, 'iocage set plugin_name="plexmediaserver-plexpass" plex_jail_name' if you're running the "beta" code.

If iocage set doesn't do the trick, look at /mnt/MYPOOL/iocage/jails/MYPLEXJAIL and edit config.json and make sure the plugin_name is set to either "plexmediaserver" or "plexmediaserver-plexpass", depending on which package you are using in the plugin.

If there is a plex.json in the same location as config.json, rename it to plexmediaserver.json, or plexmediaserver-plexpass.json if you use the beta code.

And that should resolve all your upgrade woes. I think 11.2 might have done that behind the scenes when renaming a plugin jail, and that's why what I describe below worked for me.

--

If you are on 11.3 stop here and read above, the below is not expected to help in 11.3.

In my case, I had Plex Media Server (Plexpass) installed, and it came in as a jail named "plex". TL;DR: That naming was the problem.

Attempting to update from UI (11.2-U1) claimed it was successful, but the Plex version hadn't changed.
Attempting to update from CLI complained about a missing plex.json, which was the required clue.

To fix:

Edit: I stopped the jail before doing this, and started it after. I'm assuming it needs to be stopped, but I didn't try it while running.

Open CLI from UI
# Ctrl-Insert and Shift-Insert are your friend to avoid excessive typing - allows copy/paste in the web CLI window
iocage list
# Get the name of your jail. In my case it was plex, adjust as necessary on your system
iocage rename plex plexmediaserver-plexpass
# That step will differ depending on which you want: Rename to plexmediaserver or to plexmediaserver-plexpass
# The goal here is to match the json. See also /mnt/MYMOUNTPOINT/iocage/.plugin_index
# Edit: On 11.3 the json files are in /mnt/MYMOUNTPOINT/iocage/.plugins/github_com_freenas_iocage-ix-plugins_git/
iocage list
# Just to verify that worked
iocage snaplist plexmediaserver-plexpass
# Or indeed plexmediaserver, whichever one you have. If this is empty great; if not, we need to remove a snapshot first
iocage snapremove plexmediaserver-plexpass -n NAME_THAT_SNAPLIST_SHOWED_YOU
# Otherwise you just get "we already have a snapshot" on update attempt, not very helpful.
iocage update plexmediaserver-plexpass
# Or plexmediaserver, if that's what you have. This should now show messages about updating your plex plugin, as the name matches the .json

Edit: "iocage upgrade plexmediaserver-plexpass -r 11.3-RELEASE" worked for me after moving from 11.2 to 11.3

It's quite possible that after rename and removal of previous-failed-attempt snapshot, the UI update button would have worked just as well. I didn't test that.
Edit: UI update works with renamed jail in 11.3; no luck for me in 11.2
 
Last edited:

Marcel Horst

Cadet
Joined
Apr 17, 2016
Messages
1
Great set of instructions! Thanks Yorick.

UI update button did not work, but may work again for future updates now all back to how its intended.

Took a good 20 minutes to update, so don't be impatient.
 

Lothian

Dabbler
Joined
May 12, 2018
Messages
41
Worked great. Rename of the jail on mine worked in just seconds. I had no snapshots though so that was a help. I then did the plexpass update and that service is now running on my jail. However, the Plex app still says that version 1.14.1.5488 is current, not the plexpass version 1.15.1, that is available from the Plex server download page. Does this indicate that Plex thinks I am running the non-plexpass version?
 
Last edited:

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
That indicates that the plugin available in FreeNAS hasn’t yet been updated. The FreeNAS plugin takes a little while before it catches up to the downloadable version. It’s a manual process, the maintainer has to go and create a new plugin version when a new Plex version is released.
 

bbenz3

Explorer
Joined
Jan 22, 2012
Messages
70
Looking at http://pkg.cdn.trueos.org/iocage/unstable/All/ it appears that the plexpass version was updated to 1.15.1.707 on March 5th.
However even after changing the plugin name and doing the update listed in the thread I am still on the older 1.14... version. I am getting a potential minor error that I don't understand
iocage update plexmediaserver-plexpass
Snapshotting plexmediaserver-plexpass...
Updating plugin INDEX...
Removing old pkgs...
Installing new pkgs...

Testing SRV response to iocage-plugins
Testing DNSSEC response to iocage-plugins

Installing plugin packages:
- multimedia/plexmediaserver-plexpass...
- multimedia/ffmpeg...
Updating plugin artifact...

Branch 11.2-RELEASE does not exist at https://github.com/freenas/iocage-plugin-plexmediaserver-plexpass.git!
Using "master" branch for plugin, this may not work with your RELEASE

plexmediaserver-plexpass has been updated successfully.

Also of note, the file at https://github.com/freenas/iocage-p...y/usr/local/etc/rc.d/plexmediaserver_plexpass has a variable for "plexmediaserver_plexpass_enable" and it is set to "NO". I attempted to change this to "YES" and rerun the update with no success.
 

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
It’s not about what FreeBSD is doing, it’s about what the FreeNAS plugin version is: And that’s at 1.14.1.5488. As others have said, if you need your Plex updated more often than the plugin does, then create your own jail, don’t rely on the plugin.
 

bbenz3

Explorer
Joined
Jan 22, 2012
Messages
70
It’s not about what FreeBSD is doing, it’s about what the FreeNAS plugin version is: And that’s at 1.14.1.5488. As others have said, if you need your Plex updated more often than the plugin does, then create your own jail, don’t rely on the plugin.
Do you know where the FreeNAS plugins are hosted? I was only trying to ensure my system was up to date and thought I was missing something.
 

bbenz3

Explorer
Joined
Jan 22, 2012
Messages
70
So back to my previous post, I looked at the FreeNAS iocage github repo and it appears that they are pulling from http://pkg.cdn.trueos.org/iocage/unstable/All/ so maybe there is an issue with my Plex install that isn't allowing me to update to the latest PlexPass version of the server. Is there a way to convert your plugin from the non pass version to the pass version?
 

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
I'll take this at face value.

<your-freenas-fqdn>/ui/plugins/available

Whatever repo is being pulled from -- this one btw: http://pkg.cdn.trueos.org/iocage/11.2-RELEASE/All/ -- doesn't have the 1.15 plugin yet. The UI is your guide to what's available.

You can switch to the Plexpass plugin or your own jail, it involves backing up and moving the plex configuration. I've not done that, but I do remember seeing threads in the forum about it. A search will likely find it.
 

bbenz3

Explorer
Joined
Jan 22, 2012
Messages
70
I am supposedly running the Plexpass plugin and that site does show the Plexpass version being 1.15 which is why I'm not sure what is going on when I try to update.
 

bbenz3

Explorer
Joined
Jan 22, 2012
Messages
70
So I see what you are saying with the UI now. It does indeed show 1.14 for both versions. I don't know why because when you look into the install files they point to the current repositories with the newer version for Plexpass. Oh well at least now I know that my system is "working" like it's expected to.
 

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912

bbenz3

Explorer
Joined
Jan 22, 2012
Messages
70
I'm not totally concerned right now with being in the lastest as it is working and getting the job done. I just wanted to make sure mine was actually working.
 
Last edited:

marcevan

Patron
Joined
Dec 15, 2013
Messages
432
While I'm not overly concerned with always being on the latest, it's when the latest has a bug fix (in my case the few seconds of audio issue in directplay) that I'd like fixed.

TrueOS iocage 11.2 release has PlexPass at 1.14.1.5488 since 21 Feb. It's 26 March but I'm inclined to think that when 11.3 is released there will be a fairly robust update of the Iocage catalog.
 

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
FreeBSD 11.2 is still at 1.14, tested in a FreeBSD jail.

Code:
pkg update
pkg upgrade
root@transcode:~ # pkg info plexmediaserver-plexpass
plexmediaserver-plexpass-1.14.1.5488
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,462
FreeBSD 11.2 is still at 1.14, tested in a FreeBSD jail.
...but if you set /etc/pkg/FreeBSD.conf to use "latest" rather than "quarterly", it will be somewhere in the 1.15 range.
 

marcevan

Patron
Joined
Dec 15, 2013
Messages
432
Switched to latest and to no avail. Still pkg update && upgrade yield no updates and that was after name change of the jail from plex to plexmediaserver-plexpass
 

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
@marcevan, that was for a manually created jail, not a plugin. The plugin hasn't been updated.

I feel like a broken record here :).
 

marcevan

Patron
Joined
Dec 15, 2013
Messages
432
Ah gotcha... yeah thinking about spinning up a jail just for plex so I can just download the tar file when Plex tell's me there's a new update (and if I like the release notes) and upgrade the old fashioned way to match your analogy (broken record, sic).
 

bbenz3

Explorer
Joined
Jan 22, 2012
Messages
70
So I wasn't concerned with updating at all until I read about all the changes that have been made with the release of the 1.15 code baseline. I still don't plan on changing my setup as I am really looking for the KISS method but it does seem like the Plex group has made some good changes (much of it is the code baseline changes). I look forward to when the plugin gets updated.
 
Top